add flatbuffers support and initial rewrite
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
b5852698e3
commit
70820129ae
72 changed files with 3929 additions and 1403 deletions
153
include/ikarus/models/blueprint_generated.h
Normal file
153
include/ikarus/models/blueprint_generated.h
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_BLUEPRINT_IKARUS_H_
|
||||
#define FLATBUFFERS_GENERATED_BLUEPRINT_IKARUS_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "property_generated.h"
|
||||
|
||||
namespace Ikarus {
|
||||
|
||||
struct Blueprint;
|
||||
struct BlueprintBuilder;
|
||||
|
||||
struct Blueprint FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef BlueprintBuilder Builder;
|
||||
struct Traits;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ID = 4,
|
||||
VT_NAME = 6,
|
||||
VT_DESCRIPTION = 8,
|
||||
VT_TAGS = 10
|
||||
};
|
||||
int64_t id() const {
|
||||
return GetField<int64_t>(VT_ID, 0);
|
||||
}
|
||||
const ::flatbuffers::String *name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
||||
}
|
||||
const ::flatbuffers::String *description() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_DESCRIPTION);
|
||||
}
|
||||
const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *tags() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_TAGS);
|
||||
}
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<int64_t>(verifier, VT_ID, 8) &&
|
||||
VerifyOffset(verifier, VT_NAME) &&
|
||||
verifier.VerifyString(name()) &&
|
||||
VerifyOffset(verifier, VT_DESCRIPTION) &&
|
||||
verifier.VerifyString(description()) &&
|
||||
VerifyOffset(verifier, VT_TAGS) &&
|
||||
verifier.VerifyVector(tags()) &&
|
||||
verifier.VerifyVectorOfStrings(tags()) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
};
|
||||
|
||||
struct BlueprintBuilder {
|
||||
typedef Blueprint Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_id(int64_t id) {
|
||||
fbb_.AddElement<int64_t>(Blueprint::VT_ID, id, 0);
|
||||
}
|
||||
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
||||
fbb_.AddOffset(Blueprint::VT_NAME, name);
|
||||
}
|
||||
void add_description(::flatbuffers::Offset<::flatbuffers::String> description) {
|
||||
fbb_.AddOffset(Blueprint::VT_DESCRIPTION, description);
|
||||
}
|
||||
void add_tags(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> tags) {
|
||||
fbb_.AddOffset(Blueprint::VT_TAGS, tags);
|
||||
}
|
||||
explicit BlueprintBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<Blueprint> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<Blueprint>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<Blueprint> CreateBlueprint(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
int64_t id = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> description = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>>> tags = 0) {
|
||||
BlueprintBuilder builder_(_fbb);
|
||||
builder_.add_id(id);
|
||||
builder_.add_tags(tags);
|
||||
builder_.add_description(description);
|
||||
builder_.add_name(name);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct Blueprint::Traits {
|
||||
using type = Blueprint;
|
||||
static auto constexpr Create = CreateBlueprint;
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<Blueprint> CreateBlueprintDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
int64_t id = 0,
|
||||
const char *name = nullptr,
|
||||
const char *description = nullptr,
|
||||
const std::vector<::flatbuffers::Offset<::flatbuffers::String>> *tags = nullptr) {
|
||||
auto name__ = name ? _fbb.CreateString(name) : 0;
|
||||
auto description__ = description ? _fbb.CreateString(description) : 0;
|
||||
auto tags__ = tags ? _fbb.CreateVector<::flatbuffers::Offset<::flatbuffers::String>>(*tags) : 0;
|
||||
return Ikarus::CreateBlueprint(
|
||||
_fbb,
|
||||
id,
|
||||
name__,
|
||||
description__,
|
||||
tags__);
|
||||
}
|
||||
|
||||
inline const Ikarus::Blueprint *GetBlueprint(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Ikarus::Blueprint>(buf);
|
||||
}
|
||||
|
||||
inline const Ikarus::Blueprint *GetSizePrefixedBlueprint(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Ikarus::Blueprint>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyBlueprintBuffer(
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<Ikarus::Blueprint>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedBlueprintBuffer(
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<Ikarus::Blueprint>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishBlueprintBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Ikarus::Blueprint> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedBlueprintBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Ikarus::Blueprint> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
} // namespace Ikarus
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_BLUEPRINT_IKARUS_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue