1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
5 #define FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
6
7 #include "flatbuffers/flatbuffers.h"
8
9 namespace NamespaceA {
10 namespace NamespaceB {
11
12 struct TableInNestedNS;
13 struct TableInNestedNSBuilder;
14 struct TableInNestedNST;
15
16 struct StructInNestedNS;
17
18 bool operator==(const TableInNestedNST &lhs, const TableInNestedNST &rhs);
19 bool operator!=(const TableInNestedNST &lhs, const TableInNestedNST &rhs);
20 bool operator==(const StructInNestedNS &lhs, const StructInNestedNS &rhs);
21 bool operator!=(const StructInNestedNS &lhs, const StructInNestedNS &rhs);
22
23 inline const flatbuffers::TypeTable *TableInNestedNSTypeTable();
24
25 inline const flatbuffers::TypeTable *StructInNestedNSTypeTable();
26
27 enum EnumInNestedNS {
28 EnumInNestedNS_A = 0,
29 EnumInNestedNS_B = 1,
30 EnumInNestedNS_C = 2,
31 EnumInNestedNS_MIN = EnumInNestedNS_A,
32 EnumInNestedNS_MAX = EnumInNestedNS_C
33 };
34
EnumValuesEnumInNestedNS()35 inline const EnumInNestedNS (&EnumValuesEnumInNestedNS())[3] {
36 static const EnumInNestedNS values[] = {
37 EnumInNestedNS_A,
38 EnumInNestedNS_B,
39 EnumInNestedNS_C
40 };
41 return values;
42 }
43
EnumNamesEnumInNestedNS()44 inline const char * const *EnumNamesEnumInNestedNS() {
45 static const char * const names[4] = {
46 "A",
47 "B",
48 "C",
49 nullptr
50 };
51 return names;
52 }
53
EnumNameEnumInNestedNS(EnumInNestedNS e)54 inline const char *EnumNameEnumInNestedNS(EnumInNestedNS e) {
55 if (flatbuffers::IsOutRange(e, EnumInNestedNS_A, EnumInNestedNS_C)) return "";
56 const size_t index = static_cast<size_t>(e);
57 return EnumNamesEnumInNestedNS()[index];
58 }
59
60 FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS {
61 private:
62 int32_t a_;
63 int32_t b_;
64
65 public:
MiniReflectTypeTable()66 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
67 return StructInNestedNSTypeTable();
68 }
StructInNestedNS()69 StructInNestedNS() {
70 memset(static_cast<void *>(this), 0, sizeof(StructInNestedNS));
71 }
StructInNestedNS(int32_t _a,int32_t _b)72 StructInNestedNS(int32_t _a, int32_t _b)
73 : a_(flatbuffers::EndianScalar(_a)),
74 b_(flatbuffers::EndianScalar(_b)) {
75 }
a()76 int32_t a() const {
77 return flatbuffers::EndianScalar(a_);
78 }
mutate_a(int32_t _a)79 void mutate_a(int32_t _a) {
80 flatbuffers::WriteScalar(&a_, _a);
81 }
b()82 int32_t b() const {
83 return flatbuffers::EndianScalar(b_);
84 }
mutate_b(int32_t _b)85 void mutate_b(int32_t _b) {
86 flatbuffers::WriteScalar(&b_, _b);
87 }
88 };
89 FLATBUFFERS_STRUCT_END(StructInNestedNS, 8);
90
91 inline bool operator==(const StructInNestedNS &lhs, const StructInNestedNS &rhs) {
92 return
93 (lhs.a() == rhs.a()) &&
94 (lhs.b() == rhs.b());
95 }
96
97 inline bool operator!=(const StructInNestedNS &lhs, const StructInNestedNS &rhs) {
98 return !(lhs == rhs);
99 }
100
101
102 struct TableInNestedNST : public flatbuffers::NativeTable {
103 typedef TableInNestedNS TableType;
104 int32_t foo;
TableInNestedNSTTableInNestedNST105 TableInNestedNST()
106 : foo(0) {
107 }
108 };
109
110 inline bool operator==(const TableInNestedNST &lhs, const TableInNestedNST &rhs) {
111 return
112 (lhs.foo == rhs.foo);
113 }
114
115 inline bool operator!=(const TableInNestedNST &lhs, const TableInNestedNST &rhs) {
116 return !(lhs == rhs);
117 }
118
119
120 struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
121 typedef TableInNestedNST NativeTableType;
122 typedef TableInNestedNSBuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS123 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
124 return TableInNestedNSTypeTable();
125 }
126 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
127 VT_FOO = 4
128 };
fooFLATBUFFERS_FINAL_CLASS129 int32_t foo() const {
130 return GetField<int32_t>(VT_FOO, 0);
131 }
mutate_fooFLATBUFFERS_FINAL_CLASS132 bool mutate_foo(int32_t _foo) {
133 return SetField<int32_t>(VT_FOO, _foo, 0);
134 }
VerifyFLATBUFFERS_FINAL_CLASS135 bool Verify(flatbuffers::Verifier &verifier) const {
136 return VerifyTableStart(verifier) &&
137 VerifyField<int32_t>(verifier, VT_FOO) &&
138 verifier.EndTable();
139 }
140 TableInNestedNST *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
141 void UnPackTo(TableInNestedNST *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
142 static flatbuffers::Offset<TableInNestedNS> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
143 };
144
145 struct TableInNestedNSBuilder {
146 typedef TableInNestedNS Table;
147 flatbuffers::FlatBufferBuilder &fbb_;
148 flatbuffers::uoffset_t start_;
add_fooTableInNestedNSBuilder149 void add_foo(int32_t foo) {
150 fbb_.AddElement<int32_t>(TableInNestedNS::VT_FOO, foo, 0);
151 }
TableInNestedNSBuilderTableInNestedNSBuilder152 explicit TableInNestedNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
153 : fbb_(_fbb) {
154 start_ = fbb_.StartTable();
155 }
156 TableInNestedNSBuilder &operator=(const TableInNestedNSBuilder &);
FinishTableInNestedNSBuilder157 flatbuffers::Offset<TableInNestedNS> Finish() {
158 const auto end = fbb_.EndTable(start_);
159 auto o = flatbuffers::Offset<TableInNestedNS>(end);
160 return o;
161 }
162 };
163
164 inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(
165 flatbuffers::FlatBufferBuilder &_fbb,
166 int32_t foo = 0) {
167 TableInNestedNSBuilder builder_(_fbb);
168 builder_.add_foo(foo);
169 return builder_.Finish();
170 }
171
172 flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
173
UnPack(const flatbuffers::resolver_function_t * _resolver)174 inline TableInNestedNST *TableInNestedNS::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
175 flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST> _o = flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST>(new TableInNestedNST());
176 UnPackTo(_o.get(), _resolver);
177 return _o.release();
178 }
179
UnPackTo(TableInNestedNST * _o,const flatbuffers::resolver_function_t * _resolver)180 inline void TableInNestedNS::UnPackTo(TableInNestedNST *_o, const flatbuffers::resolver_function_t *_resolver) const {
181 (void)_o;
182 (void)_resolver;
183 { auto _e = foo(); _o->foo = _e; }
184 }
185
Pack(flatbuffers::FlatBufferBuilder & _fbb,const TableInNestedNST * _o,const flatbuffers::rehasher_function_t * _rehasher)186 inline flatbuffers::Offset<TableInNestedNS> TableInNestedNS::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST* _o, const flatbuffers::rehasher_function_t *_rehasher) {
187 return CreateTableInNestedNS(_fbb, _o, _rehasher);
188 }
189
CreateTableInNestedNS(flatbuffers::FlatBufferBuilder & _fbb,const TableInNestedNST * _o,const flatbuffers::rehasher_function_t * _rehasher)190 inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST *_o, const flatbuffers::rehasher_function_t *_rehasher) {
191 (void)_rehasher;
192 (void)_o;
193 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TableInNestedNST* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
194 auto _foo = _o->foo;
195 return NamespaceA::NamespaceB::CreateTableInNestedNS(
196 _fbb,
197 _foo);
198 }
199
EnumInNestedNSTypeTable()200 inline const flatbuffers::TypeTable *EnumInNestedNSTypeTable() {
201 static const flatbuffers::TypeCode type_codes[] = {
202 { flatbuffers::ET_CHAR, 0, 0 },
203 { flatbuffers::ET_CHAR, 0, 0 },
204 { flatbuffers::ET_CHAR, 0, 0 }
205 };
206 static const flatbuffers::TypeFunction type_refs[] = {
207 NamespaceA::NamespaceB::EnumInNestedNSTypeTable
208 };
209 static const char * const names[] = {
210 "A",
211 "B",
212 "C"
213 };
214 static const flatbuffers::TypeTable tt = {
215 flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names
216 };
217 return &tt;
218 }
219
TableInNestedNSTypeTable()220 inline const flatbuffers::TypeTable *TableInNestedNSTypeTable() {
221 static const flatbuffers::TypeCode type_codes[] = {
222 { flatbuffers::ET_INT, 0, -1 }
223 };
224 static const char * const names[] = {
225 "foo"
226 };
227 static const flatbuffers::TypeTable tt = {
228 flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names
229 };
230 return &tt;
231 }
232
StructInNestedNSTypeTable()233 inline const flatbuffers::TypeTable *StructInNestedNSTypeTable() {
234 static const flatbuffers::TypeCode type_codes[] = {
235 { flatbuffers::ET_INT, 0, -1 },
236 { flatbuffers::ET_INT, 0, -1 }
237 };
238 static const int64_t values[] = { 0, 4, 8 };
239 static const char * const names[] = {
240 "a",
241 "b"
242 };
243 static const flatbuffers::TypeTable tt = {
244 flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
245 };
246 return &tt;
247 }
248
249 } // namespace NamespaceB
250 } // namespace NamespaceA
251
252 #endif // FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
253