• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "namespace_test1_generated.h"
10 
11 namespace NamespaceA {
12 
13 struct TableInFirstNS;
14 
15 }  // namespace NamespaceA
16 
17 namespace NamespaceC {
18 
19 struct TableInC;
20 
21 }  // namespace NamespaceC
22 
23 namespace NamespaceA {
24 
25 struct SecondTableInA;
26 
27 struct TableInFirstNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
28   enum {
29     VT_FOO_TABLE = 4,
30     VT_FOO_ENUM = 6,
31     VT_FOO_STRUCT = 8
32   };
foo_tableFLATBUFFERS_FINAL_CLASS33   const NamespaceA::NamespaceB::TableInNestedNS *foo_table() const {
34     return GetPointer<const NamespaceA::NamespaceB::TableInNestedNS *>(VT_FOO_TABLE);
35   }
mutable_foo_tableFLATBUFFERS_FINAL_CLASS36   NamespaceA::NamespaceB::TableInNestedNS *mutable_foo_table() {
37     return GetPointer<NamespaceA::NamespaceB::TableInNestedNS *>(VT_FOO_TABLE);
38   }
foo_enumFLATBUFFERS_FINAL_CLASS39   NamespaceA::NamespaceB::EnumInNestedNS foo_enum() const {
40     return static_cast<NamespaceA::NamespaceB::EnumInNestedNS>(GetField<int8_t>(VT_FOO_ENUM, 0));
41   }
mutate_foo_enumFLATBUFFERS_FINAL_CLASS42   bool mutate_foo_enum(NamespaceA::NamespaceB::EnumInNestedNS _foo_enum) {
43     return SetField(VT_FOO_ENUM, static_cast<int8_t>(_foo_enum));
44   }
foo_structFLATBUFFERS_FINAL_CLASS45   const NamespaceA::NamespaceB::StructInNestedNS *foo_struct() const {
46     return GetStruct<const NamespaceA::NamespaceB::StructInNestedNS *>(VT_FOO_STRUCT);
47   }
mutable_foo_structFLATBUFFERS_FINAL_CLASS48   NamespaceA::NamespaceB::StructInNestedNS *mutable_foo_struct() {
49     return GetStruct<NamespaceA::NamespaceB::StructInNestedNS *>(VT_FOO_STRUCT);
50   }
VerifyFLATBUFFERS_FINAL_CLASS51   bool Verify(flatbuffers::Verifier &verifier) const {
52     return VerifyTableStart(verifier) &&
53            VerifyField<flatbuffers::uoffset_t>(verifier, VT_FOO_TABLE) &&
54            verifier.VerifyTable(foo_table()) &&
55            VerifyField<int8_t>(verifier, VT_FOO_ENUM) &&
56            VerifyField<NamespaceA::NamespaceB::StructInNestedNS>(verifier, VT_FOO_STRUCT) &&
57            verifier.EndTable();
58   }
59 };
60 
61 struct TableInFirstNSBuilder {
62   flatbuffers::FlatBufferBuilder &fbb_;
63   flatbuffers::uoffset_t start_;
add_foo_tableTableInFirstNSBuilder64   void add_foo_table(flatbuffers::Offset<NamespaceA::NamespaceB::TableInNestedNS> foo_table) {
65     fbb_.AddOffset(TableInFirstNS::VT_FOO_TABLE, foo_table);
66   }
add_foo_enumTableInFirstNSBuilder67   void add_foo_enum(NamespaceA::NamespaceB::EnumInNestedNS foo_enum) {
68     fbb_.AddElement<int8_t>(TableInFirstNS::VT_FOO_ENUM, static_cast<int8_t>(foo_enum), 0);
69   }
add_foo_structTableInFirstNSBuilder70   void add_foo_struct(const NamespaceA::NamespaceB::StructInNestedNS *foo_struct) {
71     fbb_.AddStruct(TableInFirstNS::VT_FOO_STRUCT, foo_struct);
72   }
TableInFirstNSBuilderTableInFirstNSBuilder73   TableInFirstNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
74         : fbb_(_fbb) {
75     start_ = fbb_.StartTable();
76   }
77   TableInFirstNSBuilder &operator=(const TableInFirstNSBuilder &);
FinishTableInFirstNSBuilder78   flatbuffers::Offset<TableInFirstNS> Finish() {
79     const auto end = fbb_.EndTable(start_, 3);
80     auto o = flatbuffers::Offset<TableInFirstNS>(end);
81     return o;
82   }
83 };
84 
85 inline flatbuffers::Offset<TableInFirstNS> CreateTableInFirstNS(
86     flatbuffers::FlatBufferBuilder &_fbb,
87     flatbuffers::Offset<NamespaceA::NamespaceB::TableInNestedNS> foo_table = 0,
88     NamespaceA::NamespaceB::EnumInNestedNS foo_enum = NamespaceA::NamespaceB::EnumInNestedNS_A,
89     const NamespaceA::NamespaceB::StructInNestedNS *foo_struct = 0) {
90   TableInFirstNSBuilder builder_(_fbb);
91   builder_.add_foo_struct(foo_struct);
92   builder_.add_foo_table(foo_table);
93   builder_.add_foo_enum(foo_enum);
94   return builder_.Finish();
95 }
96 
97 }  // namespace NamespaceA
98 
99 namespace NamespaceC {
100 
101 struct TableInC FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
102   enum {
103     VT_REFER_TO_A1 = 4,
104     VT_REFER_TO_A2 = 6
105   };
refer_to_a1FLATBUFFERS_FINAL_CLASS106   const NamespaceA::TableInFirstNS *refer_to_a1() const {
107     return GetPointer<const NamespaceA::TableInFirstNS *>(VT_REFER_TO_A1);
108   }
mutable_refer_to_a1FLATBUFFERS_FINAL_CLASS109   NamespaceA::TableInFirstNS *mutable_refer_to_a1() {
110     return GetPointer<NamespaceA::TableInFirstNS *>(VT_REFER_TO_A1);
111   }
refer_to_a2FLATBUFFERS_FINAL_CLASS112   const NamespaceA::SecondTableInA *refer_to_a2() const {
113     return GetPointer<const NamespaceA::SecondTableInA *>(VT_REFER_TO_A2);
114   }
mutable_refer_to_a2FLATBUFFERS_FINAL_CLASS115   NamespaceA::SecondTableInA *mutable_refer_to_a2() {
116     return GetPointer<NamespaceA::SecondTableInA *>(VT_REFER_TO_A2);
117   }
VerifyFLATBUFFERS_FINAL_CLASS118   bool Verify(flatbuffers::Verifier &verifier) const {
119     return VerifyTableStart(verifier) &&
120            VerifyField<flatbuffers::uoffset_t>(verifier, VT_REFER_TO_A1) &&
121            verifier.VerifyTable(refer_to_a1()) &&
122            VerifyField<flatbuffers::uoffset_t>(verifier, VT_REFER_TO_A2) &&
123            verifier.VerifyTable(refer_to_a2()) &&
124            verifier.EndTable();
125   }
126 };
127 
128 struct TableInCBuilder {
129   flatbuffers::FlatBufferBuilder &fbb_;
130   flatbuffers::uoffset_t start_;
add_refer_to_a1TableInCBuilder131   void add_refer_to_a1(flatbuffers::Offset<NamespaceA::TableInFirstNS> refer_to_a1) {
132     fbb_.AddOffset(TableInC::VT_REFER_TO_A1, refer_to_a1);
133   }
add_refer_to_a2TableInCBuilder134   void add_refer_to_a2(flatbuffers::Offset<NamespaceA::SecondTableInA> refer_to_a2) {
135     fbb_.AddOffset(TableInC::VT_REFER_TO_A2, refer_to_a2);
136   }
TableInCBuilderTableInCBuilder137   TableInCBuilder(flatbuffers::FlatBufferBuilder &_fbb)
138         : fbb_(_fbb) {
139     start_ = fbb_.StartTable();
140   }
141   TableInCBuilder &operator=(const TableInCBuilder &);
FinishTableInCBuilder142   flatbuffers::Offset<TableInC> Finish() {
143     const auto end = fbb_.EndTable(start_, 2);
144     auto o = flatbuffers::Offset<TableInC>(end);
145     return o;
146   }
147 };
148 
149 inline flatbuffers::Offset<TableInC> CreateTableInC(
150     flatbuffers::FlatBufferBuilder &_fbb,
151     flatbuffers::Offset<NamespaceA::TableInFirstNS> refer_to_a1 = 0,
152     flatbuffers::Offset<NamespaceA::SecondTableInA> refer_to_a2 = 0) {
153   TableInCBuilder builder_(_fbb);
154   builder_.add_refer_to_a2(refer_to_a2);
155   builder_.add_refer_to_a1(refer_to_a1);
156   return builder_.Finish();
157 }
158 
159 }  // namespace NamespaceC
160 
161 namespace NamespaceA {
162 
163 struct SecondTableInA FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
164   enum {
165     VT_REFER_TO_C = 4
166   };
refer_to_cFLATBUFFERS_FINAL_CLASS167   const NamespaceC::TableInC *refer_to_c() const {
168     return GetPointer<const NamespaceC::TableInC *>(VT_REFER_TO_C);
169   }
mutable_refer_to_cFLATBUFFERS_FINAL_CLASS170   NamespaceC::TableInC *mutable_refer_to_c() {
171     return GetPointer<NamespaceC::TableInC *>(VT_REFER_TO_C);
172   }
VerifyFLATBUFFERS_FINAL_CLASS173   bool Verify(flatbuffers::Verifier &verifier) const {
174     return VerifyTableStart(verifier) &&
175            VerifyField<flatbuffers::uoffset_t>(verifier, VT_REFER_TO_C) &&
176            verifier.VerifyTable(refer_to_c()) &&
177            verifier.EndTable();
178   }
179 };
180 
181 struct SecondTableInABuilder {
182   flatbuffers::FlatBufferBuilder &fbb_;
183   flatbuffers::uoffset_t start_;
add_refer_to_cSecondTableInABuilder184   void add_refer_to_c(flatbuffers::Offset<NamespaceC::TableInC> refer_to_c) {
185     fbb_.AddOffset(SecondTableInA::VT_REFER_TO_C, refer_to_c);
186   }
SecondTableInABuilderSecondTableInABuilder187   SecondTableInABuilder(flatbuffers::FlatBufferBuilder &_fbb)
188         : fbb_(_fbb) {
189     start_ = fbb_.StartTable();
190   }
191   SecondTableInABuilder &operator=(const SecondTableInABuilder &);
FinishSecondTableInABuilder192   flatbuffers::Offset<SecondTableInA> Finish() {
193     const auto end = fbb_.EndTable(start_, 1);
194     auto o = flatbuffers::Offset<SecondTableInA>(end);
195     return o;
196   }
197 };
198 
199 inline flatbuffers::Offset<SecondTableInA> CreateSecondTableInA(
200     flatbuffers::FlatBufferBuilder &_fbb,
201     flatbuffers::Offset<NamespaceC::TableInC> refer_to_c = 0) {
202   SecondTableInABuilder builder_(_fbb);
203   builder_.add_refer_to_c(refer_to_c);
204   return builder_.Finish();
205 }
206 
207 }  // namespace NamespaceA
208 
209 namespace NamespaceC {
210 
211 }  // namespace NamespaceC
212 
213 namespace NamespaceA {
214 
215 }  // namespace NamespaceA
216 
217 #endif  // FLATBUFFERS_GENERATED_NAMESPACETEST2_NAMESPACEA_H_
218