// automatically generated by the FlatBuffers compiler, do not modify #ifndef FLATBUFFERS_GENERATED_UNIONVECTOR_H_ #define FLATBUFFERS_GENERATED_UNIONVECTOR_H_ #include "flatbuffers/flatbuffers.h" struct Attacker; struct AttackerT; struct Rapunzel; struct BookReader; struct Movie; struct MovieT; bool operator==(const AttackerT &lhs, const AttackerT &rhs); bool operator==(const Rapunzel &lhs, const Rapunzel &rhs); bool operator==(const BookReader &lhs, const BookReader &rhs); bool operator==(const MovieT &lhs, const MovieT &rhs); inline const flatbuffers::TypeTable *AttackerTypeTable(); inline const flatbuffers::TypeTable *RapunzelTypeTable(); inline const flatbuffers::TypeTable *BookReaderTypeTable(); inline const flatbuffers::TypeTable *MovieTypeTable(); enum Character { Character_NONE = 0, Character_MuLan = 1, Character_Rapunzel = 2, Character_Belle = 3, Character_BookFan = 4, Character_Other = 5, Character_Unused = 6, Character_MIN = Character_NONE, Character_MAX = Character_Unused }; inline const Character (&EnumValuesCharacter())[7] { static const Character values[] = { Character_NONE, Character_MuLan, Character_Rapunzel, Character_Belle, Character_BookFan, Character_Other, Character_Unused }; return values; } inline const char * const *EnumNamesCharacter() { static const char * const names[] = { "NONE", "MuLan", "Rapunzel", "Belle", "BookFan", "Other", "Unused", nullptr }; return names; } inline const char *EnumNameCharacter(Character e) { if (e < Character_NONE || e > Character_Unused) return ""; const size_t index = static_cast(e); return EnumNamesCharacter()[index]; } struct CharacterUnion { Character type; void *value; CharacterUnion() : type(Character_NONE), value(nullptr) {} CharacterUnion(CharacterUnion&& u) FLATBUFFERS_NOEXCEPT : type(Character_NONE), value(nullptr) { std::swap(type, u.type); std::swap(value, u.value); } CharacterUnion(const CharacterUnion &) FLATBUFFERS_NOEXCEPT; CharacterUnion &operator=(const CharacterUnion &u) FLATBUFFERS_NOEXCEPT { CharacterUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } CharacterUnion &operator=(CharacterUnion &&u) FLATBUFFERS_NOEXCEPT { std::swap(type, u.type); std::swap(value, u.value); return *this; } ~CharacterUnion() { Reset(); } void Reset(); static void *UnPack(const void *obj, Character type, const flatbuffers::resolver_function_t *resolver); flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; AttackerT *AsMuLan() { return type == Character_MuLan ? reinterpret_cast(value) : nullptr; } const AttackerT *AsMuLan() const { return type == Character_MuLan ? reinterpret_cast(value) : nullptr; } Rapunzel *AsRapunzel() { return type == Character_Rapunzel ? reinterpret_cast(value) : nullptr; } const Rapunzel *AsRapunzel() const { return type == Character_Rapunzel ? reinterpret_cast(value) : nullptr; } BookReader *AsBelle() { return type == Character_Belle ? reinterpret_cast(value) : nullptr; } const BookReader *AsBelle() const { return type == Character_Belle ? reinterpret_cast(value) : nullptr; } BookReader *AsBookFan() { return type == Character_BookFan ? reinterpret_cast(value) : nullptr; } const BookReader *AsBookFan() const { return type == Character_BookFan ? reinterpret_cast(value) : nullptr; } std::string *AsOther() { return type == Character_Other ? reinterpret_cast(value) : nullptr; } const std::string *AsOther() const { return type == Character_Other ? reinterpret_cast(value) : nullptr; } std::string *AsUnused() { return type == Character_Unused ? reinterpret_cast(value) : nullptr; } const std::string *AsUnused() const { return type == Character_Unused ? reinterpret_cast(value) : nullptr; } }; inline bool operator==(const CharacterUnion &lhs, const CharacterUnion &rhs) { if (lhs.type != rhs.type) return false; switch (lhs.type) { case Character_NONE: { return true; } case Character_MuLan: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } case Character_Rapunzel: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } case Character_Belle: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } case Character_BookFan: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } case Character_Other: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } case Character_Unused: { return *(reinterpret_cast(lhs.value)) == *(reinterpret_cast(rhs.value)); } default: { return false; } } } bool VerifyCharacter(flatbuffers::Verifier &verifier, const void *obj, Character type); bool VerifyCharacterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Rapunzel FLATBUFFERS_FINAL_CLASS { private: int32_t hair_length_; public: Rapunzel() { memset(static_cast(this), 0, sizeof(Rapunzel)); } Rapunzel(int32_t _hair_length) : hair_length_(flatbuffers::EndianScalar(_hair_length)) { } int32_t hair_length() const { return flatbuffers::EndianScalar(hair_length_); } void mutate_hair_length(int32_t _hair_length) { flatbuffers::WriteScalar(&hair_length_, _hair_length); } }; FLATBUFFERS_STRUCT_END(Rapunzel, 4); inline bool operator==(const Rapunzel &lhs, const Rapunzel &rhs) { return (lhs.hair_length() == rhs.hair_length()); } FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS { private: int32_t books_read_; public: BookReader() { memset(static_cast(this), 0, sizeof(BookReader)); } BookReader(int32_t _books_read) : books_read_(flatbuffers::EndianScalar(_books_read)) { } int32_t books_read() const { return flatbuffers::EndianScalar(books_read_); } void mutate_books_read(int32_t _books_read) { flatbuffers::WriteScalar(&books_read_, _books_read); } }; FLATBUFFERS_STRUCT_END(BookReader, 4); inline bool operator==(const BookReader &lhs, const BookReader &rhs) { return (lhs.books_read() == rhs.books_read()); } struct AttackerT : public flatbuffers::NativeTable { typedef Attacker TableType; int32_t sword_attack_damage; AttackerT() : sword_attack_damage(0) { } }; inline bool operator==(const AttackerT &lhs, const AttackerT &rhs) { return (lhs.sword_attack_damage == rhs.sword_attack_damage); } struct Attacker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef AttackerT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return AttackerTypeTable(); } enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_SWORD_ATTACK_DAMAGE = 4 }; int32_t sword_attack_damage() const { return GetField(VT_SWORD_ATTACK_DAMAGE, 0); } bool mutate_sword_attack_damage(int32_t _sword_attack_damage) { return SetField(VT_SWORD_ATTACK_DAMAGE, _sword_attack_damage, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_SWORD_ATTACK_DAMAGE) && verifier.EndTable(); } AttackerT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(AttackerT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttackerT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct AttackerBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_sword_attack_damage(int32_t sword_attack_damage) { fbb_.AddElement(Attacker::VT_SWORD_ATTACK_DAMAGE, sword_attack_damage, 0); } explicit AttackerBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } AttackerBuilder &operator=(const AttackerBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateAttacker( flatbuffers::FlatBufferBuilder &_fbb, int32_t sword_attack_damage = 0) { AttackerBuilder builder_(_fbb); builder_.add_sword_attack_damage(sword_attack_damage); return builder_.Finish(); } flatbuffers::Offset CreateAttacker(flatbuffers::FlatBufferBuilder &_fbb, const AttackerT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct MovieT : public flatbuffers::NativeTable { typedef Movie TableType; CharacterUnion main_character; std::vector characters; MovieT() { } }; inline bool operator==(const MovieT &lhs, const MovieT &rhs) { return (lhs.main_character == rhs.main_character) && (lhs.characters == rhs.characters); } struct Movie FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef MovieT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return MovieTypeTable(); } enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_MAIN_CHARACTER_TYPE = 4, VT_MAIN_CHARACTER = 6, VT_CHARACTERS_TYPE = 8, VT_CHARACTERS = 10 }; Character main_character_type() const { return static_cast(GetField(VT_MAIN_CHARACTER_TYPE, 0)); } bool mutate_main_character_type(Character _main_character_type) { return SetField(VT_MAIN_CHARACTER_TYPE, static_cast(_main_character_type), 0); } const void *main_character() const { return GetPointer(VT_MAIN_CHARACTER); } const Attacker *main_character_as_MuLan() const { return main_character_type() == Character_MuLan ? static_cast(main_character()) : nullptr; } const Rapunzel *main_character_as_Rapunzel() const { return main_character_type() == Character_Rapunzel ? static_cast(main_character()) : nullptr; } const BookReader *main_character_as_Belle() const { return main_character_type() == Character_Belle ? static_cast(main_character()) : nullptr; } const BookReader *main_character_as_BookFan() const { return main_character_type() == Character_BookFan ? static_cast(main_character()) : nullptr; } const flatbuffers::String *main_character_as_Other() const { return main_character_type() == Character_Other ? static_cast(main_character()) : nullptr; } const flatbuffers::String *main_character_as_Unused() const { return main_character_type() == Character_Unused ? static_cast(main_character()) : nullptr; } void *mutable_main_character() { return GetPointer(VT_MAIN_CHARACTER); } const flatbuffers::Vector *characters_type() const { return GetPointer *>(VT_CHARACTERS_TYPE); } flatbuffers::Vector *mutable_characters_type() { return GetPointer *>(VT_CHARACTERS_TYPE); } const flatbuffers::Vector> *characters() const { return GetPointer> *>(VT_CHARACTERS); } flatbuffers::Vector> *mutable_characters() { return GetPointer> *>(VT_CHARACTERS); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_MAIN_CHARACTER_TYPE) && VerifyOffset(verifier, VT_MAIN_CHARACTER) && VerifyCharacter(verifier, main_character(), main_character_type()) && VerifyOffset(verifier, VT_CHARACTERS_TYPE) && verifier.VerifyVector(characters_type()) && VerifyOffset(verifier, VT_CHARACTERS) && verifier.VerifyVector(characters()) && VerifyCharacterVector(verifier, characters(), characters_type()) && verifier.EndTable(); } MovieT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(MovieT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MovieT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct MovieBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_main_character_type(Character main_character_type) { fbb_.AddElement(Movie::VT_MAIN_CHARACTER_TYPE, static_cast(main_character_type), 0); } void add_main_character(flatbuffers::Offset main_character) { fbb_.AddOffset(Movie::VT_MAIN_CHARACTER, main_character); } void add_characters_type(flatbuffers::Offset> characters_type) { fbb_.AddOffset(Movie::VT_CHARACTERS_TYPE, characters_type); } void add_characters(flatbuffers::Offset>> characters) { fbb_.AddOffset(Movie::VT_CHARACTERS, characters); } explicit MovieBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } MovieBuilder &operator=(const MovieBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateMovie( flatbuffers::FlatBufferBuilder &_fbb, Character main_character_type = Character_NONE, flatbuffers::Offset main_character = 0, flatbuffers::Offset> characters_type = 0, flatbuffers::Offset>> characters = 0) { MovieBuilder builder_(_fbb); builder_.add_characters(characters); builder_.add_characters_type(characters_type); builder_.add_main_character(main_character); builder_.add_main_character_type(main_character_type); return builder_.Finish(); } inline flatbuffers::Offset CreateMovieDirect( flatbuffers::FlatBufferBuilder &_fbb, Character main_character_type = Character_NONE, flatbuffers::Offset main_character = 0, const std::vector *characters_type = nullptr, const std::vector> *characters = nullptr) { auto characters_type__ = characters_type ? _fbb.CreateVector(*characters_type) : 0; auto characters__ = characters ? _fbb.CreateVector>(*characters) : 0; return CreateMovie( _fbb, main_character_type, main_character, characters_type__, characters__); } flatbuffers::Offset CreateMovie(flatbuffers::FlatBufferBuilder &_fbb, const MovieT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); inline AttackerT *Attacker::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new AttackerT(); UnPackTo(_o, _resolver); return _o; } inline void Attacker::UnPackTo(AttackerT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = sword_attack_damage(); _o->sword_attack_damage = _e; }; } inline flatbuffers::Offset Attacker::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttackerT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAttacker(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateAttacker(flatbuffers::FlatBufferBuilder &_fbb, const AttackerT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AttackerT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _sword_attack_damage = _o->sword_attack_damage; return CreateAttacker( _fbb, _sword_attack_damage); } inline MovieT *Movie::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new MovieT(); UnPackTo(_o, _resolver); return _o; } inline void Movie::UnPackTo(MovieT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = main_character_type(); _o->main_character.type = _e; }; { auto _e = main_character(); if (_e) _o->main_character.value = CharacterUnion::UnPack(_e, main_character_type(), _resolver); }; { auto _e = characters_type(); if (_e) { _o->characters.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->characters[_i].type = static_cast(_e->Get(_i)); } } }; { auto _e = characters(); if (_e) { _o->characters.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->characters[_i].value = CharacterUnion::UnPack(_e->Get(_i), characters_type()->GetEnum(_i), _resolver); } } }; } inline flatbuffers::Offset Movie::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MovieT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMovie(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateMovie(flatbuffers::FlatBufferBuilder &_fbb, const MovieT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MovieT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _main_character_type = _o->main_character.type; auto _main_character = _o->main_character.Pack(_fbb); auto _characters_type = _o->characters.size() ? _fbb.CreateVector(_o->characters.size(), [](size_t i, _VectorArgs *__va) { return static_cast(__va->__o->characters[i].type); }, &_va) : 0; auto _characters = _o->characters.size() ? _fbb.CreateVector>(_o->characters.size(), [](size_t i, _VectorArgs *__va) { return __va->__o->characters[i].Pack(*__va->__fbb, __va->__rehasher); }, &_va) : 0; return CreateMovie( _fbb, _main_character_type, _main_character, _characters_type, _characters); } inline bool VerifyCharacter(flatbuffers::Verifier &verifier, const void *obj, Character type) { switch (type) { case Character_NONE: { return true; } case Character_MuLan: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case Character_Rapunzel: { return true; } case Character_Belle: { return true; } case Character_BookFan: { return true; } case Character_Other: { auto ptr = reinterpret_cast(obj); return verifier.VerifyString(ptr); } case Character_Unused: { auto ptr = reinterpret_cast(obj); return verifier.VerifyString(ptr); } default: return false; } } inline bool VerifyCharacterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { if (!values || !types) return !values && !types; if (values->size() != types->size()) return false; for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { if (!VerifyCharacter( verifier, values->Get(i), types->GetEnum(i))) { return false; } } return true; } inline void *CharacterUnion::UnPack(const void *obj, Character type, const flatbuffers::resolver_function_t *resolver) { switch (type) { case Character_MuLan: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case Character_Rapunzel: { auto ptr = reinterpret_cast(obj); return new Rapunzel(*ptr); } case Character_Belle: { auto ptr = reinterpret_cast(obj); return new BookReader(*ptr); } case Character_BookFan: { auto ptr = reinterpret_cast(obj); return new BookReader(*ptr); } case Character_Other: { auto ptr = reinterpret_cast(obj); return new std::string(ptr->c_str(), ptr->size()); } case Character_Unused: { auto ptr = reinterpret_cast(obj); return new std::string(ptr->c_str(), ptr->size()); } default: return nullptr; } } inline flatbuffers::Offset CharacterUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { switch (type) { case Character_MuLan: { auto ptr = reinterpret_cast(value); return CreateAttacker(_fbb, ptr, _rehasher).Union(); } case Character_Rapunzel: { auto ptr = reinterpret_cast(value); return _fbb.CreateStruct(*ptr).Union(); } case Character_Belle: { auto ptr = reinterpret_cast(value); return _fbb.CreateStruct(*ptr).Union(); } case Character_BookFan: { auto ptr = reinterpret_cast(value); return _fbb.CreateStruct(*ptr).Union(); } case Character_Other: { auto ptr = reinterpret_cast(value); return _fbb.CreateString(*ptr).Union(); } case Character_Unused: { auto ptr = reinterpret_cast(value); return _fbb.CreateString(*ptr).Union(); } default: return 0; } } inline CharacterUnion::CharacterUnion(const CharacterUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { switch (type) { case Character_MuLan: { value = new AttackerT(*reinterpret_cast(u.value)); break; } case Character_Rapunzel: { value = new Rapunzel(*reinterpret_cast(u.value)); break; } case Character_Belle: { value = new BookReader(*reinterpret_cast(u.value)); break; } case Character_BookFan: { value = new BookReader(*reinterpret_cast(u.value)); break; } case Character_Other: { value = new std::string(*reinterpret_cast(u.value)); break; } case Character_Unused: { value = new std::string(*reinterpret_cast(u.value)); break; } default: break; } } inline void CharacterUnion::Reset() { switch (type) { case Character_MuLan: { auto ptr = reinterpret_cast(value); delete ptr; break; } case Character_Rapunzel: { auto ptr = reinterpret_cast(value); delete ptr; break; } case Character_Belle: { auto ptr = reinterpret_cast(value); delete ptr; break; } case Character_BookFan: { auto ptr = reinterpret_cast(value); delete ptr; break; } case Character_Other: { auto ptr = reinterpret_cast(value); delete ptr; break; } case Character_Unused: { auto ptr = reinterpret_cast(value); delete ptr; break; } default: break; } value = nullptr; type = Character_NONE; } inline const flatbuffers::TypeTable *CharacterTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_SEQUENCE, 0, -1 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 1 }, { flatbuffers::ET_SEQUENCE, 0, 2 }, { flatbuffers::ET_SEQUENCE, 0, 2 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { AttackerTypeTable, RapunzelTypeTable, BookReaderTypeTable }; static const char * const names[] = { "NONE", "MuLan", "Rapunzel", "Belle", "BookFan", "Other", "Unused" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_UNION, 7, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *AttackerTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 } }; static const char * const names[] = { "sword_attack_damage" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *RapunzelTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 } }; static const int64_t values[] = { 0, 4 }; static const char * const names[] = { "hair_length" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_STRUCT, 1, type_codes, nullptr, values, names }; return &tt; } inline const flatbuffers::TypeTable *BookReaderTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 } }; static const int64_t values[] = { 0, 4 }; static const char * const names[] = { "books_read" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_STRUCT, 1, type_codes, nullptr, values, names }; return &tt; } inline const flatbuffers::TypeTable *MovieTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_UTYPE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_UTYPE, 1, 0 }, { flatbuffers::ET_SEQUENCE, 1, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { CharacterTypeTable }; static const char * const names[] = { "main_character_type", "main_character", "characters_type", "characters" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names }; return &tt; } inline const Movie *GetMovie(const void *buf) { return flatbuffers::GetRoot(buf); } inline const Movie *GetSizePrefixedMovie(const void *buf) { return flatbuffers::GetSizePrefixedRoot(buf); } inline Movie *GetMutableMovie(void *buf) { return flatbuffers::GetMutableRoot(buf); } inline const char *MovieIdentifier() { return "MOVI"; } inline bool MovieBufferHasIdentifier(const void *buf) { return flatbuffers::BufferHasIdentifier( buf, MovieIdentifier()); } inline bool VerifyMovieBuffer( flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer(MovieIdentifier()); } inline bool VerifySizePrefixedMovieBuffer( flatbuffers::Verifier &verifier) { return verifier.VerifySizePrefixedBuffer(MovieIdentifier()); } inline void FinishMovieBuffer( flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset root) { fbb.Finish(root, MovieIdentifier()); } inline void FinishSizePrefixedMovieBuffer( flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset root) { fbb.FinishSizePrefixed(root, MovieIdentifier()); } inline flatbuffers::unique_ptr UnPackMovie( const void *buf, const flatbuffers::resolver_function_t *res = nullptr) { return flatbuffers::unique_ptr(GetMovie(buf)->UnPack(res)); } #endif // FLATBUFFERS_GENERATED_UNIONVECTOR_H_