blob: 5ec21f81a551b9e79ca99ceeda202e30ffb505af [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// 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
9namespace NamespaceA {
10namespace NamespaceB {
11
12struct TableInNestedNS;
Austin Schuh272c6132020-11-14 16:37:52 -080013struct TableInNestedNSBuilder;
14struct TableInNestedNST;
Austin Schuhe89fa2d2019-08-14 20:24:23 -070015
16struct StructInNestedNS;
17
Austin Schuh272c6132020-11-14 16:37:52 -080018bool operator==(const TableInNestedNST &lhs, const TableInNestedNST &rhs);
19bool operator!=(const TableInNestedNST &lhs, const TableInNestedNST &rhs);
20bool operator==(const StructInNestedNS &lhs, const StructInNestedNS &rhs);
21bool operator!=(const StructInNestedNS &lhs, const StructInNestedNS &rhs);
22
Austin Schuhe89fa2d2019-08-14 20:24:23 -070023inline const flatbuffers::TypeTable *TableInNestedNSTypeTable();
24
25inline const flatbuffers::TypeTable *StructInNestedNSTypeTable();
26
27enum 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
35inline const EnumInNestedNS (&EnumValuesEnumInNestedNS())[3] {
36 static const EnumInNestedNS values[] = {
37 EnumInNestedNS_A,
38 EnumInNestedNS_B,
39 EnumInNestedNS_C
40 };
41 return values;
42}
43
44inline 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
54inline const char *EnumNameEnumInNestedNS(EnumInNestedNS e) {
Austin Schuh272c6132020-11-14 16:37:52 -080055 if (flatbuffers::IsOutRange(e, EnumInNestedNS_A, EnumInNestedNS_C)) return "";
Austin Schuhe89fa2d2019-08-14 20:24:23 -070056 const size_t index = static_cast<size_t>(e);
57 return EnumNamesEnumInNestedNS()[index];
58}
59
60FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS {
61 private:
62 int32_t a_;
63 int32_t b_;
64
65 public:
66 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
67 return StructInNestedNSTypeTable();
68 }
Austin Schuh272c6132020-11-14 16:37:52 -080069 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
70 return "NamespaceA.NamespaceB.StructInNestedNS";
71 }
72 StructInNestedNS()
73 : a_(0),
74 b_(0) {
Austin Schuhe89fa2d2019-08-14 20:24:23 -070075 }
76 StructInNestedNS(int32_t _a, int32_t _b)
77 : a_(flatbuffers::EndianScalar(_a)),
78 b_(flatbuffers::EndianScalar(_b)) {
79 }
80 int32_t a() const {
81 return flatbuffers::EndianScalar(a_);
82 }
83 void mutate_a(int32_t _a) {
84 flatbuffers::WriteScalar(&a_, _a);
85 }
86 int32_t b() const {
87 return flatbuffers::EndianScalar(b_);
88 }
89 void mutate_b(int32_t _b) {
90 flatbuffers::WriteScalar(&b_, _b);
91 }
92};
93FLATBUFFERS_STRUCT_END(StructInNestedNS, 8);
94
Austin Schuh272c6132020-11-14 16:37:52 -080095inline bool operator==(const StructInNestedNS &lhs, const StructInNestedNS &rhs) {
96 return
97 (lhs.a() == rhs.a()) &&
98 (lhs.b() == rhs.b());
99}
100
101inline bool operator!=(const StructInNestedNS &lhs, const StructInNestedNS &rhs) {
102 return !(lhs == rhs);
103}
104
105
106struct TableInNestedNST : public flatbuffers::NativeTable {
107 typedef TableInNestedNS TableType;
108 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
109 return "NamespaceA.NamespaceB.TableInNestedNST";
110 }
111 int32_t foo;
112 TableInNestedNST()
113 : foo(0) {
114 }
115};
116
117inline bool operator==(const TableInNestedNST &lhs, const TableInNestedNST &rhs) {
118 return
119 (lhs.foo == rhs.foo);
120}
121
122inline bool operator!=(const TableInNestedNST &lhs, const TableInNestedNST &rhs) {
123 return !(lhs == rhs);
124}
125
126
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700127struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
Austin Schuh272c6132020-11-14 16:37:52 -0800128 typedef TableInNestedNST NativeTableType;
129 typedef TableInNestedNSBuilder Builder;
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700130 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
131 return TableInNestedNSTypeTable();
132 }
Austin Schuh272c6132020-11-14 16:37:52 -0800133 static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
134 return "NamespaceA.NamespaceB.TableInNestedNS";
135 }
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700136 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
137 VT_FOO = 4
138 };
139 int32_t foo() const {
140 return GetField<int32_t>(VT_FOO, 0);
141 }
142 bool mutate_foo(int32_t _foo) {
143 return SetField<int32_t>(VT_FOO, _foo, 0);
144 }
145 bool Verify(flatbuffers::Verifier &verifier) const {
146 return VerifyTableStart(verifier) &&
147 VerifyField<int32_t>(verifier, VT_FOO) &&
148 verifier.EndTable();
149 }
Austin Schuh272c6132020-11-14 16:37:52 -0800150 TableInNestedNST *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
151 void UnPackTo(TableInNestedNST *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
152 static flatbuffers::Offset<TableInNestedNS> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700153};
154
155struct TableInNestedNSBuilder {
Austin Schuh272c6132020-11-14 16:37:52 -0800156 typedef TableInNestedNS Table;
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700157 flatbuffers::FlatBufferBuilder &fbb_;
158 flatbuffers::uoffset_t start_;
159 void add_foo(int32_t foo) {
160 fbb_.AddElement<int32_t>(TableInNestedNS::VT_FOO, foo, 0);
161 }
162 explicit TableInNestedNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
163 : fbb_(_fbb) {
164 start_ = fbb_.StartTable();
165 }
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700166 flatbuffers::Offset<TableInNestedNS> Finish() {
167 const auto end = fbb_.EndTable(start_);
168 auto o = flatbuffers::Offset<TableInNestedNS>(end);
169 return o;
170 }
171};
172
173inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(
174 flatbuffers::FlatBufferBuilder &_fbb,
175 int32_t foo = 0) {
176 TableInNestedNSBuilder builder_(_fbb);
177 builder_.add_foo(foo);
178 return builder_.Finish();
179}
180
Austin Schuh272c6132020-11-14 16:37:52 -0800181flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
182
183inline TableInNestedNST *TableInNestedNS::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
184 flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST> _o = flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST>(new TableInNestedNST());
185 UnPackTo(_o.get(), _resolver);
186 return _o.release();
187}
188
189inline void TableInNestedNS::UnPackTo(TableInNestedNST *_o, const flatbuffers::resolver_function_t *_resolver) const {
190 (void)_o;
191 (void)_resolver;
192 { auto _e = foo(); _o->foo = _e; }
193}
194
195inline flatbuffers::Offset<TableInNestedNS> TableInNestedNS::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST* _o, const flatbuffers::rehasher_function_t *_rehasher) {
196 return CreateTableInNestedNS(_fbb, _o, _rehasher);
197}
198
199inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(flatbuffers::FlatBufferBuilder &_fbb, const TableInNestedNST *_o, const flatbuffers::rehasher_function_t *_rehasher) {
200 (void)_rehasher;
201 (void)_o;
202 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TableInNestedNST* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
203 auto _foo = _o->foo;
204 return NamespaceA::NamespaceB::CreateTableInNestedNS(
205 _fbb,
206 _foo);
207}
208
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700209inline const flatbuffers::TypeTable *EnumInNestedNSTypeTable() {
210 static const flatbuffers::TypeCode type_codes[] = {
211 { flatbuffers::ET_CHAR, 0, 0 },
212 { flatbuffers::ET_CHAR, 0, 0 },
213 { flatbuffers::ET_CHAR, 0, 0 }
214 };
215 static const flatbuffers::TypeFunction type_refs[] = {
216 NamespaceA::NamespaceB::EnumInNestedNSTypeTable
217 };
218 static const char * const names[] = {
219 "A",
220 "B",
221 "C"
222 };
223 static const flatbuffers::TypeTable tt = {
Austin Schuh272c6132020-11-14 16:37:52 -0800224 flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700225 };
226 return &tt;
227}
228
229inline const flatbuffers::TypeTable *TableInNestedNSTypeTable() {
230 static const flatbuffers::TypeCode type_codes[] = {
231 { flatbuffers::ET_INT, 0, -1 }
232 };
233 static const char * const names[] = {
234 "foo"
235 };
236 static const flatbuffers::TypeTable tt = {
Austin Schuh272c6132020-11-14 16:37:52 -0800237 flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700238 };
239 return &tt;
240}
241
242inline const flatbuffers::TypeTable *StructInNestedNSTypeTable() {
243 static const flatbuffers::TypeCode type_codes[] = {
244 { flatbuffers::ET_INT, 0, -1 },
245 { flatbuffers::ET_INT, 0, -1 }
246 };
247 static const int64_t values[] = { 0, 4, 8 };
248 static const char * const names[] = {
249 "a",
250 "b"
251 };
252 static const flatbuffers::TypeTable tt = {
Austin Schuh272c6132020-11-14 16:37:52 -0800253 flatbuffers::ST_STRUCT, 2, type_codes, nullptr, nullptr, values, names
Austin Schuhe89fa2d2019-08-14 20:24:23 -0700254 };
255 return &tt;
256}
257
258} // namespace NamespaceB
259} // namespace NamespaceA
260
261#endif // FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_