namespace gen {
struct RelSource_;
struct RelSource {
using _OBX_MetaInfo = RelSource_;
uint64_t id;
uint64_t typefulId;
};
struct RelSource_ {
static const obx_schema_id id = 1;
static const obx_schema_id typefulId = 2;
static constexpr obx_schema_id entityId() { return 2; }
static void setObjectId(RelSource& object, obx_id newId) { object.id = newId; }
/// Write given object to the FlatBufferBuilder
static void toFlatBuffer(flatbuffers::FlatBufferBuilder& fbb, const RelSource& object);
/// Read an object from a valid FlatBuffer
static RelSource fromFlatBuffer(const void* data, size_t size);
/// Read an object from a valid FlatBuffer
static std::unique_ptr<RelSource> newFromFlatBuffer(const void* data, size_t size);
/// Read an object from a valid FlatBuffer
static void fromFlatBuffer(const void* data, size_t size, RelSource& outObject);
};
} // namespace gen
Consider splitting out the "binding" methods to a separate class, leaving properties in the "underscore" one.
Reasons:
symbol naming overlap (what if anyone wants to name their property entityId?)
less mess when writing code: users usually either want to access properties (e.g. for queries) or they want to access FB conversion (for custom handling), either way, the other thing pollutes IDE code completion.
A generated code currently looks like this
Consider splitting out the "binding" methods to a separate class, leaving properties in the "underscore" one. Reasons:
entityId
?)