1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_NAMESPACETEST2_NAMESPACEA_H_
5 #define FLATBUFFERS_GENERATED_NAMESPACETEST2_NAMESPACEA_H_
6
7 #include "flatbuffers/flatbuffers.h"
8
9 namespace NamespaceA {
10
11 struct TableInFirstNS;
12 struct TableInFirstNSBuilder;
13 struct TableInFirstNST;
14
15 } // namespace NamespaceA
16
17 namespace NamespaceC {
18
19 struct TableInC;
20 struct TableInCBuilder;
21 struct TableInCT;
22
23 } // namespace NamespaceC
24
25 namespace NamespaceA {
26
27 struct SecondTableInA;
28 struct SecondTableInABuilder;
29 struct SecondTableInAT;
30
31 bool operator==(const TableInFirstNST &lhs, const TableInFirstNST &rhs);
32 bool operator!=(const TableInFirstNST &lhs, const TableInFirstNST &rhs);
33 } // namespace NamespaceA
34
35 namespace NamespaceC {
36
37 bool operator==(const TableInCT &lhs, const TableInCT &rhs);
38 bool operator!=(const TableInCT &lhs, const TableInCT &rhs);
39 } // namespace NamespaceC
40
41 namespace NamespaceA {
42
43 bool operator==(const SecondTableInAT &lhs, const SecondTableInAT &rhs);
44 bool operator!=(const SecondTableInAT &lhs, const SecondTableInAT &rhs);
45
46 inline const flatbuffers::TypeTable *TableInFirstNSTypeTable();
47
48 } // namespace NamespaceA
49
50 namespace NamespaceC {
51
52 inline const flatbuffers::TypeTable *TableInCTypeTable();
53
54 } // namespace NamespaceC
55
56 namespace NamespaceA {
57
58 inline const flatbuffers::TypeTable *SecondTableInATypeTable();
59
60 struct TableInFirstNST : public flatbuffers::NativeTable {
61 typedef TableInFirstNS TableType;
GetFullyQualifiedNameTableInFirstNST62 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
63 return "NamespaceA.TableInFirstNST";
64 }
65 flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST> foo_table{};
66 NamespaceA::NamespaceB::EnumInNestedNS foo_enum = NamespaceA::NamespaceB::EnumInNestedNS_A;
67 NamespaceA::NamespaceB::UnionInNestedNSUnion foo_union{};
68 flatbuffers::unique_ptr<NamespaceA::NamespaceB::StructInNestedNS> foo_struct{};
69 };
70
71 inline bool operator==(const TableInFirstNST &lhs, const TableInFirstNST &rhs) {
72 return
73 (lhs.foo_table == rhs.foo_table) &&
74 (lhs.foo_enum == rhs.foo_enum) &&
75 (lhs.foo_union == rhs.foo_union) &&
76 (lhs.foo_struct == rhs.foo_struct);
77 }
78
79 inline bool operator!=(const TableInFirstNST &lhs, const TableInFirstNST &rhs) {
80 return !(lhs == rhs);
81 }
82
83
84 struct TableInFirstNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
85 typedef TableInFirstNST NativeTableType;
86 typedef TableInFirstNSBuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS87 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
88 return TableInFirstNSTypeTable();
89 }
GetFullyQualifiedNameFLATBUFFERS_FINAL_CLASS90 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
91 return "NamespaceA.TableInFirstNS";
92 }
93 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
94 VT_FOO_TABLE = 4,
95 VT_FOO_ENUM = 6,
96 VT_FOO_UNION_TYPE = 8,
97 VT_FOO_UNION = 10,
98 VT_FOO_STRUCT = 12
99 };
foo_tableFLATBUFFERS_FINAL_CLASS100 const NamespaceA::NamespaceB::TableInNestedNS *foo_table() const {
101 return GetPointer<const NamespaceA::NamespaceB::TableInNestedNS *>(VT_FOO_TABLE);
102 }
mutable_foo_tableFLATBUFFERS_FINAL_CLASS103 NamespaceA::NamespaceB::TableInNestedNS *mutable_foo_table() {
104 return GetPointer<NamespaceA::NamespaceB::TableInNestedNS *>(VT_FOO_TABLE);
105 }
foo_enumFLATBUFFERS_FINAL_CLASS106 NamespaceA::NamespaceB::EnumInNestedNS foo_enum() const {
107 return static_cast<NamespaceA::NamespaceB::EnumInNestedNS>(GetField<int8_t>(VT_FOO_ENUM, 0));
108 }
mutate_foo_enumFLATBUFFERS_FINAL_CLASS109 bool mutate_foo_enum(NamespaceA::NamespaceB::EnumInNestedNS _foo_enum) {
110 return SetField<int8_t>(VT_FOO_ENUM, static_cast<int8_t>(_foo_enum), 0);
111 }
foo_union_typeFLATBUFFERS_FINAL_CLASS112 NamespaceA::NamespaceB::UnionInNestedNS foo_union_type() const {
113 return static_cast<NamespaceA::NamespaceB::UnionInNestedNS>(GetField<uint8_t>(VT_FOO_UNION_TYPE, 0));
114 }
foo_unionFLATBUFFERS_FINAL_CLASS115 const void *foo_union() const {
116 return GetPointer<const void *>(VT_FOO_UNION);
117 }
118 template<typename T> const T *foo_union_as() const;
foo_union_as_TableInNestedNSFLATBUFFERS_FINAL_CLASS119 const NamespaceA::NamespaceB::TableInNestedNS *foo_union_as_TableInNestedNS() const {
120 return foo_union_type() == NamespaceA::NamespaceB::UnionInNestedNS_TableInNestedNS ? static_cast<const NamespaceA::NamespaceB::TableInNestedNS *>(foo_union()) : nullptr;
121 }
mutable_foo_unionFLATBUFFERS_FINAL_CLASS122 void *mutable_foo_union() {
123 return GetPointer<void *>(VT_FOO_UNION);
124 }
foo_structFLATBUFFERS_FINAL_CLASS125 const NamespaceA::NamespaceB::StructInNestedNS *foo_struct() const {
126 return GetStruct<const NamespaceA::NamespaceB::StructInNestedNS *>(VT_FOO_STRUCT);
127 }
mutable_foo_structFLATBUFFERS_FINAL_CLASS128 NamespaceA::NamespaceB::StructInNestedNS *mutable_foo_struct() {
129 return GetStruct<NamespaceA::NamespaceB::StructInNestedNS *>(VT_FOO_STRUCT);
130 }
VerifyFLATBUFFERS_FINAL_CLASS131 bool Verify(flatbuffers::Verifier &verifier) const {
132 return VerifyTableStart(verifier) &&
133 VerifyOffset(verifier, VT_FOO_TABLE) &&
134 verifier.VerifyTable(foo_table()) &&
135 VerifyField<int8_t>(verifier, VT_FOO_ENUM) &&
136 VerifyField<uint8_t>(verifier, VT_FOO_UNION_TYPE) &&
137 VerifyOffset(verifier, VT_FOO_UNION) &&
138 VerifyUnionInNestedNS(verifier, foo_union(), foo_union_type()) &&
139 VerifyField<NamespaceA::NamespaceB::StructInNestedNS>(verifier, VT_FOO_STRUCT) &&
140 verifier.EndTable();
141 }
142 TableInFirstNST *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
143 void UnPackTo(TableInFirstNST *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
144 static flatbuffers::Offset<TableInFirstNS> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInFirstNST* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
145 };
146
147 template<> inline const NamespaceA::NamespaceB::TableInNestedNS *TableInFirstNS::foo_union_as<NamespaceA::NamespaceB::TableInNestedNS>() const {
148 return foo_union_as_TableInNestedNS();
149 }
150
151 struct TableInFirstNSBuilder {
152 typedef TableInFirstNS Table;
153 flatbuffers::FlatBufferBuilder &fbb_;
154 flatbuffers::uoffset_t start_;
add_foo_tableTableInFirstNSBuilder155 void add_foo_table(flatbuffers::Offset<NamespaceA::NamespaceB::TableInNestedNS> foo_table) {
156 fbb_.AddOffset(TableInFirstNS::VT_FOO_TABLE, foo_table);
157 }
add_foo_enumTableInFirstNSBuilder158 void add_foo_enum(NamespaceA::NamespaceB::EnumInNestedNS foo_enum) {
159 fbb_.AddElement<int8_t>(TableInFirstNS::VT_FOO_ENUM, static_cast<int8_t>(foo_enum), 0);
160 }
add_foo_union_typeTableInFirstNSBuilder161 void add_foo_union_type(NamespaceA::NamespaceB::UnionInNestedNS foo_union_type) {
162 fbb_.AddElement<uint8_t>(TableInFirstNS::VT_FOO_UNION_TYPE, static_cast<uint8_t>(foo_union_type), 0);
163 }
add_foo_unionTableInFirstNSBuilder164 void add_foo_union(flatbuffers::Offset<void> foo_union) {
165 fbb_.AddOffset(TableInFirstNS::VT_FOO_UNION, foo_union);
166 }
add_foo_structTableInFirstNSBuilder167 void add_foo_struct(const NamespaceA::NamespaceB::StructInNestedNS *foo_struct) {
168 fbb_.AddStruct(TableInFirstNS::VT_FOO_STRUCT, foo_struct);
169 }
TableInFirstNSBuilderTableInFirstNSBuilder170 explicit TableInFirstNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
171 : fbb_(_fbb) {
172 start_ = fbb_.StartTable();
173 }
FinishTableInFirstNSBuilder174 flatbuffers::Offset<TableInFirstNS> Finish() {
175 const auto end = fbb_.EndTable(start_);
176 auto o = flatbuffers::Offset<TableInFirstNS>(end);
177 return o;
178 }
179 };
180
181 inline flatbuffers::Offset<TableInFirstNS> CreateTableInFirstNS(
182 flatbuffers::FlatBufferBuilder &_fbb,
183 flatbuffers::Offset<NamespaceA::NamespaceB::TableInNestedNS> foo_table = 0,
184 NamespaceA::NamespaceB::EnumInNestedNS foo_enum = NamespaceA::NamespaceB::EnumInNestedNS_A,
185 NamespaceA::NamespaceB::UnionInNestedNS foo_union_type = NamespaceA::NamespaceB::UnionInNestedNS_NONE,
186 flatbuffers::Offset<void> foo_union = 0,
187 const NamespaceA::NamespaceB::StructInNestedNS *foo_struct = 0) {
188 TableInFirstNSBuilder builder_(_fbb);
189 builder_.add_foo_struct(foo_struct);
190 builder_.add_foo_union(foo_union);
191 builder_.add_foo_table(foo_table);
192 builder_.add_foo_union_type(foo_union_type);
193 builder_.add_foo_enum(foo_enum);
194 return builder_.Finish();
195 }
196
197 flatbuffers::Offset<TableInFirstNS> CreateTableInFirstNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInFirstNST *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
198
199 } // namespace NamespaceA
200
201 namespace NamespaceC {
202
203 struct TableInCT : public flatbuffers::NativeTable {
204 typedef TableInC TableType;
GetFullyQualifiedNameTableInCT205 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
206 return "NamespaceC.TableInCT";
207 }
208 flatbuffers::unique_ptr<NamespaceA::TableInFirstNST> refer_to_a1{};
209 flatbuffers::unique_ptr<NamespaceA::SecondTableInAT> refer_to_a2{};
210 };
211
212 inline bool operator==(const TableInCT &lhs, const TableInCT &rhs) {
213 return
214 (lhs.refer_to_a1 == rhs.refer_to_a1) &&
215 (lhs.refer_to_a2 == rhs.refer_to_a2);
216 }
217
218 inline bool operator!=(const TableInCT &lhs, const TableInCT &rhs) {
219 return !(lhs == rhs);
220 }
221
222
223 struct TableInC FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
224 typedef TableInCT NativeTableType;
225 typedef TableInCBuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS226 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
227 return TableInCTypeTable();
228 }
GetFullyQualifiedNameFLATBUFFERS_FINAL_CLASS229 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
230 return "NamespaceC.TableInC";
231 }
232 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
233 VT_REFER_TO_A1 = 4,
234 VT_REFER_TO_A2 = 6
235 };
refer_to_a1FLATBUFFERS_FINAL_CLASS236 const NamespaceA::TableInFirstNS *refer_to_a1() const {
237 return GetPointer<const NamespaceA::TableInFirstNS *>(VT_REFER_TO_A1);
238 }
mutable_refer_to_a1FLATBUFFERS_FINAL_CLASS239 NamespaceA::TableInFirstNS *mutable_refer_to_a1() {
240 return GetPointer<NamespaceA::TableInFirstNS *>(VT_REFER_TO_A1);
241 }
refer_to_a2FLATBUFFERS_FINAL_CLASS242 const NamespaceA::SecondTableInA *refer_to_a2() const {
243 return GetPointer<const NamespaceA::SecondTableInA *>(VT_REFER_TO_A2);
244 }
mutable_refer_to_a2FLATBUFFERS_FINAL_CLASS245 NamespaceA::SecondTableInA *mutable_refer_to_a2() {
246 return GetPointer<NamespaceA::SecondTableInA *>(VT_REFER_TO_A2);
247 }
VerifyFLATBUFFERS_FINAL_CLASS248 bool Verify(flatbuffers::Verifier &verifier) const {
249 return VerifyTableStart(verifier) &&
250 VerifyOffset(verifier, VT_REFER_TO_A1) &&
251 verifier.VerifyTable(refer_to_a1()) &&
252 VerifyOffset(verifier, VT_REFER_TO_A2) &&
253 verifier.VerifyTable(refer_to_a2()) &&
254 verifier.EndTable();
255 }
256 TableInCT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
257 void UnPackTo(TableInCT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
258 static flatbuffers::Offset<TableInC> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInCT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
259 };
260
261 struct TableInCBuilder {
262 typedef TableInC Table;
263 flatbuffers::FlatBufferBuilder &fbb_;
264 flatbuffers::uoffset_t start_;
add_refer_to_a1TableInCBuilder265 void add_refer_to_a1(flatbuffers::Offset<NamespaceA::TableInFirstNS> refer_to_a1) {
266 fbb_.AddOffset(TableInC::VT_REFER_TO_A1, refer_to_a1);
267 }
add_refer_to_a2TableInCBuilder268 void add_refer_to_a2(flatbuffers::Offset<NamespaceA::SecondTableInA> refer_to_a2) {
269 fbb_.AddOffset(TableInC::VT_REFER_TO_A2, refer_to_a2);
270 }
TableInCBuilderTableInCBuilder271 explicit TableInCBuilder(flatbuffers::FlatBufferBuilder &_fbb)
272 : fbb_(_fbb) {
273 start_ = fbb_.StartTable();
274 }
FinishTableInCBuilder275 flatbuffers::Offset<TableInC> Finish() {
276 const auto end = fbb_.EndTable(start_);
277 auto o = flatbuffers::Offset<TableInC>(end);
278 return o;
279 }
280 };
281
282 inline flatbuffers::Offset<TableInC> CreateTableInC(
283 flatbuffers::FlatBufferBuilder &_fbb,
284 flatbuffers::Offset<NamespaceA::TableInFirstNS> refer_to_a1 = 0,
285 flatbuffers::Offset<NamespaceA::SecondTableInA> refer_to_a2 = 0) {
286 TableInCBuilder builder_(_fbb);
287 builder_.add_refer_to_a2(refer_to_a2);
288 builder_.add_refer_to_a1(refer_to_a1);
289 return builder_.Finish();
290 }
291
292 flatbuffers::Offset<TableInC> CreateTableInC(flatbuffers::FlatBufferBuilder &_fbb, const TableInCT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
293
294 } // namespace NamespaceC
295
296 namespace NamespaceA {
297
298 struct SecondTableInAT : public flatbuffers::NativeTable {
299 typedef SecondTableInA TableType;
GetFullyQualifiedNameSecondTableInAT300 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
301 return "NamespaceA.SecondTableInAT";
302 }
303 flatbuffers::unique_ptr<NamespaceC::TableInCT> refer_to_c{};
304 };
305
306 inline bool operator==(const SecondTableInAT &lhs, const SecondTableInAT &rhs) {
307 return
308 (lhs.refer_to_c == rhs.refer_to_c);
309 }
310
311 inline bool operator!=(const SecondTableInAT &lhs, const SecondTableInAT &rhs) {
312 return !(lhs == rhs);
313 }
314
315
316 struct SecondTableInA FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
317 typedef SecondTableInAT NativeTableType;
318 typedef SecondTableInABuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS319 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
320 return SecondTableInATypeTable();
321 }
GetFullyQualifiedNameFLATBUFFERS_FINAL_CLASS322 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
323 return "NamespaceA.SecondTableInA";
324 }
325 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
326 VT_REFER_TO_C = 4
327 };
refer_to_cFLATBUFFERS_FINAL_CLASS328 const NamespaceC::TableInC *refer_to_c() const {
329 return GetPointer<const NamespaceC::TableInC *>(VT_REFER_TO_C);
330 }
mutable_refer_to_cFLATBUFFERS_FINAL_CLASS331 NamespaceC::TableInC *mutable_refer_to_c() {
332 return GetPointer<NamespaceC::TableInC *>(VT_REFER_TO_C);
333 }
VerifyFLATBUFFERS_FINAL_CLASS334 bool Verify(flatbuffers::Verifier &verifier) const {
335 return VerifyTableStart(verifier) &&
336 VerifyOffset(verifier, VT_REFER_TO_C) &&
337 verifier.VerifyTable(refer_to_c()) &&
338 verifier.EndTable();
339 }
340 SecondTableInAT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
341 void UnPackTo(SecondTableInAT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
342 static flatbuffers::Offset<SecondTableInA> Pack(flatbuffers::FlatBufferBuilder &_fbb, const SecondTableInAT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
343 };
344
345 struct SecondTableInABuilder {
346 typedef SecondTableInA Table;
347 flatbuffers::FlatBufferBuilder &fbb_;
348 flatbuffers::uoffset_t start_;
add_refer_to_cSecondTableInABuilder349 void add_refer_to_c(flatbuffers::Offset<NamespaceC::TableInC> refer_to_c) {
350 fbb_.AddOffset(SecondTableInA::VT_REFER_TO_C, refer_to_c);
351 }
SecondTableInABuilderSecondTableInABuilder352 explicit SecondTableInABuilder(flatbuffers::FlatBufferBuilder &_fbb)
353 : fbb_(_fbb) {
354 start_ = fbb_.StartTable();
355 }
FinishSecondTableInABuilder356 flatbuffers::Offset<SecondTableInA> Finish() {
357 const auto end = fbb_.EndTable(start_);
358 auto o = flatbuffers::Offset<SecondTableInA>(end);
359 return o;
360 }
361 };
362
363 inline flatbuffers::Offset<SecondTableInA> CreateSecondTableInA(
364 flatbuffers::FlatBufferBuilder &_fbb,
365 flatbuffers::Offset<NamespaceC::TableInC> refer_to_c = 0) {
366 SecondTableInABuilder builder_(_fbb);
367 builder_.add_refer_to_c(refer_to_c);
368 return builder_.Finish();
369 }
370
371 flatbuffers::Offset<SecondTableInA> CreateSecondTableInA(flatbuffers::FlatBufferBuilder &_fbb, const SecondTableInAT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
372
UnPack(const flatbuffers::resolver_function_t * _resolver)373 inline TableInFirstNST *TableInFirstNS::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
374 auto _o = std::unique_ptr<TableInFirstNST>(new TableInFirstNST());
375 UnPackTo(_o.get(), _resolver);
376 return _o.release();
377 }
378
UnPackTo(TableInFirstNST * _o,const flatbuffers::resolver_function_t * _resolver)379 inline void TableInFirstNS::UnPackTo(TableInFirstNST *_o, const flatbuffers::resolver_function_t *_resolver) const {
380 (void)_o;
381 (void)_resolver;
382 { auto _e = foo_table(); if (_e) _o->foo_table = flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST>(_e->UnPack(_resolver)); }
383 { auto _e = foo_enum(); _o->foo_enum = _e; }
384 { auto _e = foo_union_type(); _o->foo_union.type = _e; }
385 { auto _e = foo_union(); if (_e) _o->foo_union.value = NamespaceA::NamespaceB::UnionInNestedNSUnion::UnPack(_e, foo_union_type(), _resolver); }
386 { auto _e = foo_struct(); if (_e) _o->foo_struct = flatbuffers::unique_ptr<NamespaceA::NamespaceB::StructInNestedNS>(new NamespaceA::NamespaceB::StructInNestedNS(*_e)); }
387 }
388
Pack(flatbuffers::FlatBufferBuilder & _fbb,const TableInFirstNST * _o,const flatbuffers::rehasher_function_t * _rehasher)389 inline flatbuffers::Offset<TableInFirstNS> TableInFirstNS::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInFirstNST* _o, const flatbuffers::rehasher_function_t *_rehasher) {
390 return CreateTableInFirstNS(_fbb, _o, _rehasher);
391 }
392
CreateTableInFirstNS(flatbuffers::FlatBufferBuilder & _fbb,const TableInFirstNST * _o,const flatbuffers::rehasher_function_t * _rehasher)393 inline flatbuffers::Offset<TableInFirstNS> CreateTableInFirstNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInFirstNST *_o, const flatbuffers::rehasher_function_t *_rehasher) {
394 (void)_rehasher;
395 (void)_o;
396 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TableInFirstNST* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
397 auto _foo_table = _o->foo_table ? CreateTableInNestedNS(_fbb, _o->foo_table.get(), _rehasher) : 0;
398 auto _foo_enum = _o->foo_enum;
399 auto _foo_union_type = _o->foo_union.type;
400 auto _foo_union = _o->foo_union.Pack(_fbb);
401 auto _foo_struct = _o->foo_struct ? _o->foo_struct.get() : 0;
402 return NamespaceA::CreateTableInFirstNS(
403 _fbb,
404 _foo_table,
405 _foo_enum,
406 _foo_union_type,
407 _foo_union,
408 _foo_struct);
409 }
410
411 } // namespace NamespaceA
412
413 namespace NamespaceC {
414
UnPack(const flatbuffers::resolver_function_t * _resolver)415 inline TableInCT *TableInC::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
416 auto _o = std::unique_ptr<TableInCT>(new TableInCT());
417 UnPackTo(_o.get(), _resolver);
418 return _o.release();
419 }
420
UnPackTo(TableInCT * _o,const flatbuffers::resolver_function_t * _resolver)421 inline void TableInC::UnPackTo(TableInCT *_o, const flatbuffers::resolver_function_t *_resolver) const {
422 (void)_o;
423 (void)_resolver;
424 { auto _e = refer_to_a1(); if (_e) _o->refer_to_a1 = flatbuffers::unique_ptr<NamespaceA::TableInFirstNST>(_e->UnPack(_resolver)); }
425 { auto _e = refer_to_a2(); if (_e) _o->refer_to_a2 = flatbuffers::unique_ptr<NamespaceA::SecondTableInAT>(_e->UnPack(_resolver)); }
426 }
427
Pack(flatbuffers::FlatBufferBuilder & _fbb,const TableInCT * _o,const flatbuffers::rehasher_function_t * _rehasher)428 inline flatbuffers::Offset<TableInC> TableInC::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInCT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
429 return CreateTableInC(_fbb, _o, _rehasher);
430 }
431
CreateTableInC(flatbuffers::FlatBufferBuilder & _fbb,const TableInCT * _o,const flatbuffers::rehasher_function_t * _rehasher)432 inline flatbuffers::Offset<TableInC> CreateTableInC(flatbuffers::FlatBufferBuilder &_fbb, const TableInCT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
433 (void)_rehasher;
434 (void)_o;
435 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TableInCT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
436 auto _refer_to_a1 = _o->refer_to_a1 ? CreateTableInFirstNS(_fbb, _o->refer_to_a1.get(), _rehasher) : 0;
437 auto _refer_to_a2 = _o->refer_to_a2 ? CreateSecondTableInA(_fbb, _o->refer_to_a2.get(), _rehasher) : 0;
438 return NamespaceC::CreateTableInC(
439 _fbb,
440 _refer_to_a1,
441 _refer_to_a2);
442 }
443
444 } // namespace NamespaceC
445
446 namespace NamespaceA {
447
UnPack(const flatbuffers::resolver_function_t * _resolver)448 inline SecondTableInAT *SecondTableInA::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
449 auto _o = std::unique_ptr<SecondTableInAT>(new SecondTableInAT());
450 UnPackTo(_o.get(), _resolver);
451 return _o.release();
452 }
453
UnPackTo(SecondTableInAT * _o,const flatbuffers::resolver_function_t * _resolver)454 inline void SecondTableInA::UnPackTo(SecondTableInAT *_o, const flatbuffers::resolver_function_t *_resolver) const {
455 (void)_o;
456 (void)_resolver;
457 { auto _e = refer_to_c(); if (_e) _o->refer_to_c = flatbuffers::unique_ptr<NamespaceC::TableInCT>(_e->UnPack(_resolver)); }
458 }
459
Pack(flatbuffers::FlatBufferBuilder & _fbb,const SecondTableInAT * _o,const flatbuffers::rehasher_function_t * _rehasher)460 inline flatbuffers::Offset<SecondTableInA> SecondTableInA::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SecondTableInAT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
461 return CreateSecondTableInA(_fbb, _o, _rehasher);
462 }
463
CreateSecondTableInA(flatbuffers::FlatBufferBuilder & _fbb,const SecondTableInAT * _o,const flatbuffers::rehasher_function_t * _rehasher)464 inline flatbuffers::Offset<SecondTableInA> CreateSecondTableInA(flatbuffers::FlatBufferBuilder &_fbb, const SecondTableInAT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
465 (void)_rehasher;
466 (void)_o;
467 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SecondTableInAT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
468 auto _refer_to_c = _o->refer_to_c ? CreateTableInC(_fbb, _o->refer_to_c.get(), _rehasher) : 0;
469 return NamespaceA::CreateSecondTableInA(
470 _fbb,
471 _refer_to_c);
472 }
473
TableInFirstNSTypeTable()474 inline const flatbuffers::TypeTable *TableInFirstNSTypeTable() {
475 static const flatbuffers::TypeCode type_codes[] = {
476 { flatbuffers::ET_SEQUENCE, 0, 0 },
477 { flatbuffers::ET_CHAR, 0, 1 },
478 { flatbuffers::ET_UTYPE, 0, 2 },
479 { flatbuffers::ET_SEQUENCE, 0, 2 },
480 { flatbuffers::ET_SEQUENCE, 0, 3 }
481 };
482 static const flatbuffers::TypeFunction type_refs[] = {
483 NamespaceA::NamespaceB::TableInNestedNSTypeTable,
484 NamespaceA::NamespaceB::EnumInNestedNSTypeTable,
485 NamespaceA::NamespaceB::UnionInNestedNSTypeTable,
486 NamespaceA::NamespaceB::StructInNestedNSTypeTable
487 };
488 static const char * const names[] = {
489 "foo_table",
490 "foo_enum",
491 "foo_union_type",
492 "foo_union",
493 "foo_struct"
494 };
495 static const flatbuffers::TypeTable tt = {
496 flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names
497 };
498 return &tt;
499 }
500
501 } // namespace NamespaceA
502
503 namespace NamespaceC {
504
TableInCTypeTable()505 inline const flatbuffers::TypeTable *TableInCTypeTable() {
506 static const flatbuffers::TypeCode type_codes[] = {
507 { flatbuffers::ET_SEQUENCE, 0, 0 },
508 { flatbuffers::ET_SEQUENCE, 0, 1 }
509 };
510 static const flatbuffers::TypeFunction type_refs[] = {
511 NamespaceA::TableInFirstNSTypeTable,
512 NamespaceA::SecondTableInATypeTable
513 };
514 static const char * const names[] = {
515 "refer_to_a1",
516 "refer_to_a2"
517 };
518 static const flatbuffers::TypeTable tt = {
519 flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names
520 };
521 return &tt;
522 }
523
524 } // namespace NamespaceC
525
526 namespace NamespaceA {
527
SecondTableInATypeTable()528 inline const flatbuffers::TypeTable *SecondTableInATypeTable() {
529 static const flatbuffers::TypeCode type_codes[] = {
530 { flatbuffers::ET_SEQUENCE, 0, 0 }
531 };
532 static const flatbuffers::TypeFunction type_refs[] = {
533 NamespaceC::TableInCTypeTable
534 };
535 static const char * const names[] = {
536 "refer_to_c"
537 };
538 static const flatbuffers::TypeTable tt = {
539 flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names
540 };
541 return &tt;
542 }
543
544 } // namespace NamespaceA
545
546 #endif // FLATBUFFERS_GENERATED_NAMESPACETEST2_NAMESPACEA_H_
547