2023-10-24 14:54:00 -07:00
|
|
|
// Generated file - DO NOT MODIFY
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <glacier/buffer/byte_buffer.h>
|
|
|
|
#include <glacier/buffer/cap_buffer.h>
|
|
|
|
#include <glacier/string/string.h>
|
|
|
|
#include <ztypes.h>
|
|
|
|
|
|
|
|
|
|
|
|
{%- for message in messages %}
|
|
|
|
class {{message.name}} {
|
|
|
|
public:
|
|
|
|
{{message.name}}() {}
|
|
|
|
// Delete copy and move until implemented.
|
|
|
|
{{message.name}}(const {{message.name}}&) = delete;
|
|
|
|
{{message.name}}({{message.name}}&&) = delete;
|
|
|
|
|
|
|
|
void ParseFromBytes(const glcr::ByteBuffer&, uint64_t offset);
|
|
|
|
void ParseFromBytes(const glcr::ByteBuffer&, uint64_t offset, const glcr::CapBuffer&);
|
2023-10-24 18:19:12 -07:00
|
|
|
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset) const;
|
|
|
|
uint64_t SerializeToBytes(glcr::ByteBuffer&, uint64_t offset, glcr::CapBuffer&) const;
|
2023-10-24 14:54:00 -07:00
|
|
|
|
|
|
|
{%- for field in message.fields %}
|
2023-10-24 18:19:12 -07:00
|
|
|
{{field.cpp_type()}} {{field.name}}() const { return {{field.name}}_; }
|
2023-10-24 14:54:00 -07:00
|
|
|
void set_{{field.name}}(const {{field.cpp_type()}}& value) { {{field.name}}_ = value; }
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
private:
|
|
|
|
{%- for field in message.fields %}
|
|
|
|
{{field.cpp_type()}} {{field.name}}_;
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
};
|
|
|
|
{%- endfor %}
|