[Yunq] Clean up codegen issues for client and server.

This commit is contained in:
Drew Galbraith 2023-10-24 18:19:12 -07:00
parent 71e3521b87
commit 9c9fd167cd
15 changed files with 216 additions and 111 deletions

View file

@ -17,11 +17,11 @@ class {{message.name}} {
void ParseFromBytes(const glcr::ByteBuffer&, uint64_t offset);
void ParseFromBytes(const glcr::ByteBuffer&, uint64_t offset, const glcr::CapBuffer&);
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset);
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset, glcr::CapBuffer&);
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset) const;
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset, glcr::CapBuffer&) const;
{%- for field in message.fields %}
{{field.cpp_type()}} {{field.name}}() { return {{field.name}}_; }
{{field.cpp_type()}} {{field.name}}() const { return {{field.name}}_; }
void set_{{field.name}}(const {{field.cpp_type()}}& value) { {{field.name}}_ = value; }
{%- endfor %}