2019-06-17 22:15:13 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_H_
|
|
|
|
#define FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_H_
|
|
|
|
|
|
|
|
#include "flatbuffers/flatbuffers.h"
|
|
|
|
|
2022-04-01 03:56:41 +00:00
|
|
|
// Ensure the included flatbuffers.h is the same version as when this file was
|
|
|
|
// generated, otherwise it may not be compatible.
|
2023-01-04 23:22:46 +00:00
|
|
|
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
|
2023-03-03 19:46:55 +00:00
|
|
|
FLATBUFFERS_VERSION_MINOR == 3 &&
|
|
|
|
FLATBUFFERS_VERSION_REVISION == 3,
|
2022-04-01 03:56:41 +00:00
|
|
|
"Non-compatible flatbuffers version included");
|
|
|
|
|
2019-06-17 22:15:13 +00:00
|
|
|
namespace MyGame {
|
|
|
|
namespace Example {
|
|
|
|
|
|
|
|
struct NestedStruct;
|
|
|
|
|
|
|
|
struct ArrayStruct;
|
|
|
|
|
|
|
|
struct ArrayTable;
|
2019-12-26 22:56:46 +00:00
|
|
|
struct ArrayTableBuilder;
|
2019-06-17 22:15:13 +00:00
|
|
|
struct ArrayTableT;
|
|
|
|
|
2019-08-20 00:57:23 +00:00
|
|
|
bool operator==(const NestedStruct &lhs, const NestedStruct &rhs);
|
|
|
|
bool operator!=(const NestedStruct &lhs, const NestedStruct &rhs);
|
|
|
|
bool operator==(const ArrayStruct &lhs, const ArrayStruct &rhs);
|
|
|
|
bool operator!=(const ArrayStruct &lhs, const ArrayStruct &rhs);
|
|
|
|
bool operator==(const ArrayTableT &lhs, const ArrayTableT &rhs);
|
|
|
|
bool operator!=(const ArrayTableT &lhs, const ArrayTableT &rhs);
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *NestedStructTypeTable();
|
2019-06-17 22:15:13 +00:00
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *ArrayStructTypeTable();
|
2019-06-17 22:15:13 +00:00
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *ArrayTableTypeTable();
|
2019-06-17 22:15:13 +00:00
|
|
|
|
|
|
|
enum class TestEnum : int8_t {
|
|
|
|
A = 0,
|
|
|
|
B = 1,
|
|
|
|
C = 2,
|
|
|
|
MIN = A,
|
|
|
|
MAX = C
|
|
|
|
};
|
|
|
|
|
|
|
|
inline const TestEnum (&EnumValuesTestEnum())[3] {
|
|
|
|
static const TestEnum values[] = {
|
|
|
|
TestEnum::A,
|
|
|
|
TestEnum::B,
|
|
|
|
TestEnum::C
|
|
|
|
};
|
|
|
|
return values;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const char * const *EnumNamesTestEnum() {
|
|
|
|
static const char * const names[4] = {
|
|
|
|
"A",
|
|
|
|
"B",
|
|
|
|
"C",
|
|
|
|
nullptr
|
|
|
|
};
|
|
|
|
return names;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const char *EnumNameTestEnum(TestEnum e) {
|
2023-01-07 20:17:07 +00:00
|
|
|
if (::flatbuffers::IsOutRange(e, TestEnum::A, TestEnum::C)) return "";
|
2019-06-17 22:15:13 +00:00
|
|
|
const size_t index = static_cast<size_t>(e);
|
|
|
|
return EnumNamesTestEnum()[index];
|
|
|
|
}
|
|
|
|
|
2019-08-23 17:46:47 +00:00
|
|
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) NestedStruct FLATBUFFERS_FINAL_CLASS {
|
2019-06-17 22:15:13 +00:00
|
|
|
private:
|
|
|
|
int32_t a_[2];
|
|
|
|
int8_t b_;
|
|
|
|
int8_t c_[2];
|
2019-08-23 17:46:47 +00:00
|
|
|
int8_t padding0__; int32_t padding1__;
|
|
|
|
int64_t d_[2];
|
2019-06-17 22:15:13 +00:00
|
|
|
|
|
|
|
public:
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
2019-06-17 22:15:13 +00:00
|
|
|
return NestedStructTypeTable();
|
|
|
|
}
|
2020-06-02 00:58:52 +00:00
|
|
|
NestedStruct()
|
|
|
|
: a_(),
|
|
|
|
b_(0),
|
|
|
|
c_(),
|
|
|
|
padding0__(0),
|
|
|
|
padding1__(0),
|
|
|
|
d_() {
|
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
NestedStruct(MyGame::Example::TestEnum _b)
|
2020-06-02 00:58:52 +00:00
|
|
|
: a_(),
|
2023-01-07 20:17:07 +00:00
|
|
|
b_(::flatbuffers::EndianScalar(static_cast<int8_t>(_b))),
|
2020-06-02 00:58:52 +00:00
|
|
|
c_(),
|
|
|
|
padding0__(0),
|
|
|
|
padding1__(0),
|
|
|
|
d_() {
|
2020-10-12 19:24:18 +00:00
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
NestedStruct(::flatbuffers::span<const int32_t, 2> _a, MyGame::Example::TestEnum _b, ::flatbuffers::span<const MyGame::Example::TestEnum, 2> _c, ::flatbuffers::span<const int64_t, 2> _d)
|
|
|
|
: b_(::flatbuffers::EndianScalar(static_cast<int8_t>(_b))),
|
2020-10-12 19:24:18 +00:00
|
|
|
padding0__(0),
|
|
|
|
padding1__(0) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::CastToArray(a_).CopyFromSpan(_a);
|
|
|
|
::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_).CopyFromSpan(_c);
|
2020-10-12 19:24:18 +00:00
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::CastToArray(d_).CopyFromSpan(_d);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<int32_t, 2> *a() const {
|
|
|
|
return &::flatbuffers::CastToArray(a_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<int32_t, 2> *mutable_a() {
|
|
|
|
return &::flatbuffers::CastToArray(a_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
MyGame::Example::TestEnum b() const {
|
2023-01-07 20:17:07 +00:00
|
|
|
return static_cast<MyGame::Example::TestEnum>(::flatbuffers::EndianScalar(b_));
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
void mutate_b(MyGame::Example::TestEnum _b) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::WriteScalar(&b_, static_cast<int8_t>(_b));
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<MyGame::Example::TestEnum, 2> *c() const {
|
|
|
|
return &::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<MyGame::Example::TestEnum, 2> *mutable_c() {
|
|
|
|
return &::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<int64_t, 2> *d() const {
|
|
|
|
return &::flatbuffers::CastToArray(d_);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<int64_t, 2> *mutable_d() {
|
|
|
|
return &::flatbuffers::CastToArray(d_);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2019-08-23 17:46:47 +00:00
|
|
|
FLATBUFFERS_STRUCT_END(NestedStruct, 32);
|
2019-06-17 22:15:13 +00:00
|
|
|
|
2019-08-20 00:57:23 +00:00
|
|
|
inline bool operator==(const NestedStruct &lhs, const NestedStruct &rhs) {
|
|
|
|
return
|
2023-01-06 04:11:11 +00:00
|
|
|
(*lhs.a() == *rhs.a()) &&
|
2019-08-20 00:57:23 +00:00
|
|
|
(lhs.b() == rhs.b()) &&
|
2023-01-06 04:11:11 +00:00
|
|
|
(*lhs.c() == *rhs.c()) &&
|
|
|
|
(*lhs.d() == *rhs.d());
|
2019-08-20 00:57:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator!=(const NestedStruct &lhs, const NestedStruct &rhs) {
|
|
|
|
return !(lhs == rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-08-23 17:46:47 +00:00
|
|
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) ArrayStruct FLATBUFFERS_FINAL_CLASS {
|
2019-06-17 22:15:13 +00:00
|
|
|
private:
|
|
|
|
float a_;
|
|
|
|
int32_t b_[15];
|
|
|
|
int8_t c_;
|
2019-08-23 17:46:47 +00:00
|
|
|
int8_t padding0__; int16_t padding1__; int32_t padding2__;
|
2019-06-17 22:15:13 +00:00
|
|
|
MyGame::Example::NestedStruct d_[2];
|
2019-08-23 17:46:47 +00:00
|
|
|
int32_t e_;
|
|
|
|
int32_t padding3__;
|
|
|
|
int64_t f_[2];
|
2019-06-17 22:15:13 +00:00
|
|
|
|
|
|
|
public:
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
2019-06-17 22:15:13 +00:00
|
|
|
return ArrayStructTypeTable();
|
|
|
|
}
|
2020-06-02 00:58:52 +00:00
|
|
|
ArrayStruct()
|
|
|
|
: a_(0),
|
|
|
|
b_(),
|
|
|
|
c_(0),
|
|
|
|
padding0__(0),
|
|
|
|
padding1__(0),
|
|
|
|
padding2__(0),
|
|
|
|
d_(),
|
|
|
|
e_(0),
|
|
|
|
padding3__(0),
|
|
|
|
f_() {
|
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
|
|
|
(void)padding2__;
|
|
|
|
(void)padding3__;
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2019-08-23 17:46:47 +00:00
|
|
|
ArrayStruct(float _a, int8_t _c, int32_t _e)
|
2023-01-07 20:17:07 +00:00
|
|
|
: a_(::flatbuffers::EndianScalar(_a)),
|
2020-06-02 00:58:52 +00:00
|
|
|
b_(),
|
2023-01-07 20:17:07 +00:00
|
|
|
c_(::flatbuffers::EndianScalar(_c)),
|
2019-06-17 22:15:13 +00:00
|
|
|
padding0__(0),
|
2019-08-23 17:46:47 +00:00
|
|
|
padding1__(0),
|
|
|
|
padding2__(0),
|
2020-06-02 00:58:52 +00:00
|
|
|
d_(),
|
2023-01-07 20:17:07 +00:00
|
|
|
e_(::flatbuffers::EndianScalar(_e)),
|
2020-06-02 00:58:52 +00:00
|
|
|
padding3__(0),
|
|
|
|
f_() {
|
2020-10-12 19:24:18 +00:00
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
|
|
|
(void)padding2__;
|
|
|
|
(void)padding3__;
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
ArrayStruct(float _a, ::flatbuffers::span<const int32_t, 15> _b, int8_t _c, ::flatbuffers::span<const MyGame::Example::NestedStruct, 2> _d, int32_t _e, ::flatbuffers::span<const int64_t, 2> _f)
|
|
|
|
: a_(::flatbuffers::EndianScalar(_a)),
|
|
|
|
c_(::flatbuffers::EndianScalar(_c)),
|
2020-10-12 19:24:18 +00:00
|
|
|
padding0__(0),
|
|
|
|
padding1__(0),
|
|
|
|
padding2__(0),
|
2023-01-07 20:17:07 +00:00
|
|
|
e_(::flatbuffers::EndianScalar(_e)),
|
2020-10-12 19:24:18 +00:00
|
|
|
padding3__(0) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::CastToArray(b_).CopyFromSpan(_b);
|
2020-10-12 19:24:18 +00:00
|
|
|
(void)padding0__;
|
|
|
|
(void)padding1__;
|
|
|
|
(void)padding2__;
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::CastToArray(d_).CopyFromSpan(_d);
|
2020-10-12 19:24:18 +00:00
|
|
|
(void)padding3__;
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::CastToArray(f_).CopyFromSpan(_f);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
float a() const {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::EndianScalar(a_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
void mutate_a(float _a) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::WriteScalar(&a_, _a);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<int32_t, 15> *b() const {
|
|
|
|
return &::flatbuffers::CastToArray(b_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<int32_t, 15> *mutable_b() {
|
|
|
|
return &::flatbuffers::CastToArray(b_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
int8_t c() const {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::EndianScalar(c_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
void mutate_c(int8_t _c) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::WriteScalar(&c_, _c);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<MyGame::Example::NestedStruct, 2> *d() const {
|
|
|
|
return &::flatbuffers::CastToArray(d_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<MyGame::Example::NestedStruct, 2> *mutable_d() {
|
|
|
|
return &::flatbuffers::CastToArray(d_);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
2019-08-23 17:46:47 +00:00
|
|
|
int32_t e() const {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::EndianScalar(e_);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
|
|
|
void mutate_e(int32_t _e) {
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::WriteScalar(&e_, _e);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::Array<int64_t, 2> *f() const {
|
|
|
|
return &::flatbuffers::CastToArray(f_);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Array<int64_t, 2> *mutable_f() {
|
|
|
|
return &::flatbuffers::CastToArray(f_);
|
2019-08-23 17:46:47 +00:00
|
|
|
}
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2019-08-23 17:46:47 +00:00
|
|
|
FLATBUFFERS_STRUCT_END(ArrayStruct, 160);
|
2019-06-17 22:15:13 +00:00
|
|
|
|
2019-08-20 00:57:23 +00:00
|
|
|
inline bool operator==(const ArrayStruct &lhs, const ArrayStruct &rhs) {
|
|
|
|
return
|
|
|
|
(lhs.a() == rhs.a()) &&
|
2023-01-06 04:11:11 +00:00
|
|
|
(*lhs.b() == *rhs.b()) &&
|
2019-08-20 00:57:23 +00:00
|
|
|
(lhs.c() == rhs.c()) &&
|
2023-01-06 04:11:11 +00:00
|
|
|
(*lhs.d() == *rhs.d()) &&
|
2019-08-23 17:46:47 +00:00
|
|
|
(lhs.e() == rhs.e()) &&
|
2023-01-06 04:11:11 +00:00
|
|
|
(*lhs.f() == *rhs.f());
|
2019-08-20 00:57:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator!=(const ArrayStruct &lhs, const ArrayStruct &rhs) {
|
|
|
|
return !(lhs == rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
struct ArrayTableT : public ::flatbuffers::NativeTable {
|
2019-06-17 22:15:13 +00:00
|
|
|
typedef ArrayTable TableType;
|
2023-05-05 19:08:09 +00:00
|
|
|
std::unique_ptr<MyGame::Example::ArrayStruct> a{};
|
2022-01-29 22:24:24 +00:00
|
|
|
ArrayTableT() = default;
|
|
|
|
ArrayTableT(const ArrayTableT &o);
|
|
|
|
ArrayTableT(ArrayTableT&&) FLATBUFFERS_NOEXCEPT = default;
|
|
|
|
ArrayTableT &operator=(ArrayTableT o) FLATBUFFERS_NOEXCEPT;
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
struct ArrayTable FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
2019-06-17 22:15:13 +00:00
|
|
|
typedef ArrayTableT NativeTableType;
|
2019-12-26 22:56:46 +00:00
|
|
|
typedef ArrayTableBuilder Builder;
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
2019-06-17 22:15:13 +00:00
|
|
|
return ArrayTableTypeTable();
|
|
|
|
}
|
|
|
|
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
|
|
|
VT_A = 4
|
|
|
|
};
|
|
|
|
const MyGame::Example::ArrayStruct *a() const {
|
|
|
|
return GetStruct<const MyGame::Example::ArrayStruct *>(VT_A);
|
|
|
|
}
|
|
|
|
MyGame::Example::ArrayStruct *mutable_a() {
|
|
|
|
return GetStruct<MyGame::Example::ArrayStruct *>(VT_A);
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
bool Verify(::flatbuffers::Verifier &verifier) const {
|
2019-06-17 22:15:13 +00:00
|
|
|
return VerifyTableStart(verifier) &&
|
2022-01-14 22:39:15 +00:00
|
|
|
VerifyField<MyGame::Example::ArrayStruct>(verifier, VT_A, 8) &&
|
2019-06-17 22:15:13 +00:00
|
|
|
verifier.EndTable();
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
ArrayTableT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
|
|
|
void UnPackTo(ArrayTableT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
|
|
|
static ::flatbuffers::Offset<ArrayTable> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ArrayTableT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ArrayTableBuilder {
|
2019-12-26 22:56:46 +00:00
|
|
|
typedef ArrayTable Table;
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::FlatBufferBuilder &fbb_;
|
|
|
|
::flatbuffers::uoffset_t start_;
|
2019-06-17 22:15:13 +00:00
|
|
|
void add_a(const MyGame::Example::ArrayStruct *a) {
|
|
|
|
fbb_.AddStruct(ArrayTable::VT_A, a);
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
explicit ArrayTableBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
2019-06-17 22:15:13 +00:00
|
|
|
: fbb_(_fbb) {
|
|
|
|
start_ = fbb_.StartTable();
|
|
|
|
}
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Offset<ArrayTable> Finish() {
|
2019-06-17 22:15:13 +00:00
|
|
|
const auto end = fbb_.EndTable(start_);
|
2023-01-07 20:17:07 +00:00
|
|
|
auto o = ::flatbuffers::Offset<ArrayTable>(end);
|
2019-06-17 22:15:13 +00:00
|
|
|
return o;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline ::flatbuffers::Offset<ArrayTable> CreateArrayTable(
|
|
|
|
::flatbuffers::FlatBufferBuilder &_fbb,
|
2021-08-02 20:41:15 +00:00
|
|
|
const MyGame::Example::ArrayStruct *a = nullptr) {
|
2019-06-17 22:15:13 +00:00
|
|
|
ArrayTableBuilder builder_(_fbb);
|
|
|
|
builder_.add_a(a);
|
|
|
|
return builder_.Finish();
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Offset<ArrayTable> CreateArrayTable(::flatbuffers::FlatBufferBuilder &_fbb, const ArrayTableT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
2019-06-17 22:15:13 +00:00
|
|
|
|
2021-06-21 18:37:56 +00:00
|
|
|
|
|
|
|
inline bool operator==(const ArrayTableT &lhs, const ArrayTableT &rhs) {
|
|
|
|
return
|
|
|
|
((lhs.a == rhs.a) || (lhs.a && rhs.a && *lhs.a == *rhs.a));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator!=(const ArrayTableT &lhs, const ArrayTableT &rhs) {
|
|
|
|
return !(lhs == rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-01-29 22:24:24 +00:00
|
|
|
inline ArrayTableT::ArrayTableT(const ArrayTableT &o)
|
|
|
|
: a((o.a) ? new MyGame::Example::ArrayStruct(*o.a) : nullptr) {
|
|
|
|
}
|
|
|
|
|
|
|
|
inline ArrayTableT &ArrayTableT::operator=(ArrayTableT o) FLATBUFFERS_NOEXCEPT {
|
|
|
|
std::swap(a, o.a);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline ArrayTableT *ArrayTable::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
2020-12-07 19:19:36 +00:00
|
|
|
auto _o = std::unique_ptr<ArrayTableT>(new ArrayTableT());
|
2020-02-12 20:12:45 +00:00
|
|
|
UnPackTo(_o.get(), _resolver);
|
|
|
|
return _o.release();
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline void ArrayTable::UnPackTo(ArrayTableT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
2019-06-17 22:15:13 +00:00
|
|
|
(void)_o;
|
|
|
|
(void)_resolver;
|
2023-05-05 19:08:09 +00:00
|
|
|
{ auto _e = a(); if (_e) _o->a = std::unique_ptr<MyGame::Example::ArrayStruct>(new MyGame::Example::ArrayStruct(*_e)); }
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline ::flatbuffers::Offset<ArrayTable> ArrayTable::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ArrayTableT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
2019-06-17 22:15:13 +00:00
|
|
|
return CreateArrayTable(_fbb, _o, _rehasher);
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline ::flatbuffers::Offset<ArrayTable> CreateArrayTable(::flatbuffers::FlatBufferBuilder &_fbb, const ArrayTableT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
2019-06-17 22:15:13 +00:00
|
|
|
(void)_rehasher;
|
|
|
|
(void)_o;
|
2023-01-07 20:17:07 +00:00
|
|
|
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const ArrayTableT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
2022-08-09 04:32:13 +00:00
|
|
|
auto _a = _o->a ? _o->a.get() : nullptr;
|
2019-06-17 22:15:13 +00:00
|
|
|
return MyGame::Example::CreateArrayTable(
|
|
|
|
_fbb,
|
|
|
|
_a);
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *TestEnumTypeTable() {
|
|
|
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
|
|
{ ::flatbuffers::ET_CHAR, 0, 0 },
|
|
|
|
{ ::flatbuffers::ET_CHAR, 0, 0 },
|
|
|
|
{ ::flatbuffers::ET_CHAR, 0, 0 }
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeFunction type_refs[] = {
|
2019-06-17 22:15:13 +00:00
|
|
|
MyGame::Example::TestEnumTypeTable
|
|
|
|
};
|
|
|
|
static const char * const names[] = {
|
|
|
|
"A",
|
|
|
|
"B",
|
|
|
|
"C"
|
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable tt = {
|
|
|
|
::flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
return &tt;
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *NestedStructTypeTable() {
|
|
|
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
|
|
{ ::flatbuffers::ET_INT, 1, -1 },
|
|
|
|
{ ::flatbuffers::ET_CHAR, 0, 0 },
|
|
|
|
{ ::flatbuffers::ET_CHAR, 1, 0 },
|
|
|
|
{ ::flatbuffers::ET_LONG, 1, -1 }
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeFunction type_refs[] = {
|
2019-06-17 22:15:13 +00:00
|
|
|
MyGame::Example::TestEnumTypeTable
|
|
|
|
};
|
2020-09-23 00:57:01 +00:00
|
|
|
static const int16_t array_sizes[] = { 2, 2, 2, };
|
2019-08-23 17:46:47 +00:00
|
|
|
static const int64_t values[] = { 0, 8, 9, 16, 32 };
|
2019-06-17 22:15:13 +00:00
|
|
|
static const char * const names[] = {
|
|
|
|
"a",
|
|
|
|
"b",
|
2019-08-23 17:46:47 +00:00
|
|
|
"c",
|
|
|
|
"d"
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable tt = {
|
|
|
|
::flatbuffers::ST_STRUCT, 4, type_codes, type_refs, array_sizes, values, names
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
return &tt;
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *ArrayStructTypeTable() {
|
|
|
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
|
|
{ ::flatbuffers::ET_FLOAT, 0, -1 },
|
|
|
|
{ ::flatbuffers::ET_INT, 1, -1 },
|
|
|
|
{ ::flatbuffers::ET_CHAR, 0, -1 },
|
|
|
|
{ ::flatbuffers::ET_SEQUENCE, 1, 0 },
|
|
|
|
{ ::flatbuffers::ET_INT, 0, -1 },
|
|
|
|
{ ::flatbuffers::ET_LONG, 1, -1 }
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeFunction type_refs[] = {
|
2019-06-17 22:15:13 +00:00
|
|
|
MyGame::Example::NestedStructTypeTable
|
|
|
|
};
|
2020-09-23 00:57:01 +00:00
|
|
|
static const int16_t array_sizes[] = { 15, 2, 2, };
|
2019-08-23 17:46:47 +00:00
|
|
|
static const int64_t values[] = { 0, 4, 64, 72, 136, 144, 160 };
|
2019-06-17 22:15:13 +00:00
|
|
|
static const char * const names[] = {
|
|
|
|
"a",
|
|
|
|
"b",
|
|
|
|
"c",
|
2019-08-23 17:46:47 +00:00
|
|
|
"d",
|
|
|
|
"e",
|
|
|
|
"f"
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable tt = {
|
|
|
|
::flatbuffers::ST_STRUCT, 6, type_codes, type_refs, array_sizes, values, names
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
return &tt;
|
|
|
|
}
|
|
|
|
|
2023-01-07 20:17:07 +00:00
|
|
|
inline const ::flatbuffers::TypeTable *ArrayTableTypeTable() {
|
|
|
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
|
|
|
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeFunction type_refs[] = {
|
2019-06-17 22:15:13 +00:00
|
|
|
MyGame::Example::ArrayStructTypeTable
|
|
|
|
};
|
|
|
|
static const char * const names[] = {
|
|
|
|
"a"
|
|
|
|
};
|
2023-01-07 20:17:07 +00:00
|
|
|
static const ::flatbuffers::TypeTable tt = {
|
|
|
|
::flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names
|
2019-06-17 22:15:13 +00:00
|
|
|
};
|
|
|
|
return &tt;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const MyGame::Example::ArrayTable *GetArrayTable(const void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::GetRoot<MyGame::Example::ArrayTable>(buf);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline const MyGame::Example::ArrayTable *GetSizePrefixedArrayTable(const void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::GetSizePrefixedRoot<MyGame::Example::ArrayTable>(buf);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline ArrayTable *GetMutableArrayTable(void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::GetMutableRoot<ArrayTable>(buf);
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
2021-08-30 22:34:42 +00:00
|
|
|
inline MyGame::Example::ArrayTable *GetMutableSizePrefixedArrayTable(void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::GetMutableSizePrefixedRoot<MyGame::Example::ArrayTable>(buf);
|
2021-08-30 22:34:42 +00:00
|
|
|
}
|
|
|
|
|
2019-06-17 22:15:13 +00:00
|
|
|
inline const char *ArrayTableIdentifier() {
|
|
|
|
return "ARRT";
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool ArrayTableBufferHasIdentifier(const void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::BufferHasIdentifier(
|
2019-06-17 22:15:13 +00:00
|
|
|
buf, ArrayTableIdentifier());
|
|
|
|
}
|
|
|
|
|
2022-01-29 04:52:32 +00:00
|
|
|
inline bool SizePrefixedArrayTableBufferHasIdentifier(const void *buf) {
|
2023-01-07 20:17:07 +00:00
|
|
|
return ::flatbuffers::BufferHasIdentifier(
|
2022-01-29 04:52:32 +00:00
|
|
|
buf, ArrayTableIdentifier(), true);
|
|
|
|
}
|
|
|
|
|
2019-06-17 22:15:13 +00:00
|
|
|
inline bool VerifyArrayTableBuffer(
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Verifier &verifier) {
|
2019-06-17 22:15:13 +00:00
|
|
|
return verifier.VerifyBuffer<MyGame::Example::ArrayTable>(ArrayTableIdentifier());
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool VerifySizePrefixedArrayTableBuffer(
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::Verifier &verifier) {
|
2019-06-17 22:15:13 +00:00
|
|
|
return verifier.VerifySizePrefixedBuffer<MyGame::Example::ArrayTable>(ArrayTableIdentifier());
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const char *ArrayTableExtension() {
|
|
|
|
return "mon";
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void FinishArrayTableBuffer(
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::FlatBufferBuilder &fbb,
|
|
|
|
::flatbuffers::Offset<MyGame::Example::ArrayTable> root) {
|
2019-06-17 22:15:13 +00:00
|
|
|
fbb.Finish(root, ArrayTableIdentifier());
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void FinishSizePrefixedArrayTableBuffer(
|
2023-01-07 20:17:07 +00:00
|
|
|
::flatbuffers::FlatBufferBuilder &fbb,
|
|
|
|
::flatbuffers::Offset<MyGame::Example::ArrayTable> root) {
|
2019-06-17 22:15:13 +00:00
|
|
|
fbb.FinishSizePrefixed(root, ArrayTableIdentifier());
|
|
|
|
}
|
|
|
|
|
2023-05-05 19:08:09 +00:00
|
|
|
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackArrayTable(
|
2019-06-17 22:15:13 +00:00
|
|
|
const void *buf,
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
2023-05-05 19:08:09 +00:00
|
|
|
return std::unique_ptr<MyGame::Example::ArrayTableT>(GetArrayTable(buf)->UnPack(res));
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
2023-05-05 19:08:09 +00:00
|
|
|
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackSizePrefixedArrayTable(
|
2019-06-17 22:15:13 +00:00
|
|
|
const void *buf,
|
2023-01-07 20:17:07 +00:00
|
|
|
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
2023-05-05 19:08:09 +00:00
|
|
|
return std::unique_ptr<MyGame::Example::ArrayTableT>(GetSizePrefixedArrayTable(buf)->UnPack(res));
|
2019-06-17 22:15:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Example
|
|
|
|
} // namespace MyGame
|
|
|
|
|
|
|
|
#endif // FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_H_
|