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 
14 struct StructInNestedNS;
15 
16 enum EnumInNestedNS {
17   EnumInNestedNS_A = 0,
18   EnumInNestedNS_B = 1,
19   EnumInNestedNS_C = 2,
20   EnumInNestedNS_MIN = EnumInNestedNS_A,
21   EnumInNestedNS_MAX = EnumInNestedNS_C
22 };
23 
EnumValuesEnumInNestedNS()24 inline EnumInNestedNS (&EnumValuesEnumInNestedNS())[3] {
25   static EnumInNestedNS values[] = {
26     EnumInNestedNS_A,
27     EnumInNestedNS_B,
28     EnumInNestedNS_C
29   };
30   return values;
31 }
32 
EnumNamesEnumInNestedNS()33 inline const char **EnumNamesEnumInNestedNS() {
34   static const char *names[] = {
35     "A",
36     "B",
37     "C",
38     nullptr
39   };
40   return names;
41 }
42 
EnumNameEnumInNestedNS(EnumInNestedNS e)43 inline const char *EnumNameEnumInNestedNS(EnumInNestedNS e) {
44   const size_t index = static_cast<int>(e);
45   return EnumNamesEnumInNestedNS()[index];
46 }
47 
48 MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS {
49  private:
50   int32_t a_;
51   int32_t b_;
52 
53  public:
StructInNestedNS()54   StructInNestedNS() {
55     memset(this, 0, sizeof(StructInNestedNS));
56   }
StructInNestedNS(int32_t _a,int32_t _b)57   StructInNestedNS(int32_t _a, int32_t _b)
58       : a_(flatbuffers::EndianScalar(_a)),
59         b_(flatbuffers::EndianScalar(_b)) {
60   }
a()61   int32_t a() const {
62     return flatbuffers::EndianScalar(a_);
63   }
mutate_a(int32_t _a)64   void mutate_a(int32_t _a) {
65     flatbuffers::WriteScalar(&a_, _a);
66   }
b()67   int32_t b() const {
68     return flatbuffers::EndianScalar(b_);
69   }
mutate_b(int32_t _b)70   void mutate_b(int32_t _b) {
71     flatbuffers::WriteScalar(&b_, _b);
72   }
73 };
74 STRUCT_END(StructInNestedNS, 8);
75 
76 struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
77   enum {
78     VT_FOO = 4
79   };
fooFLATBUFFERS_FINAL_CLASS80   int32_t foo() const {
81     return GetField<int32_t>(VT_FOO, 0);
82   }
mutate_fooFLATBUFFERS_FINAL_CLASS83   bool mutate_foo(int32_t _foo) {
84     return SetField<int32_t>(VT_FOO, _foo, 0);
85   }
VerifyFLATBUFFERS_FINAL_CLASS86   bool Verify(flatbuffers::Verifier &verifier) const {
87     return VerifyTableStart(verifier) &&
88            VerifyField<int32_t>(verifier, VT_FOO) &&
89            verifier.EndTable();
90   }
91 };
92 
93 struct TableInNestedNSBuilder {
94   flatbuffers::FlatBufferBuilder &fbb_;
95   flatbuffers::uoffset_t start_;
add_fooTableInNestedNSBuilder96   void add_foo(int32_t foo) {
97     fbb_.AddElement<int32_t>(TableInNestedNS::VT_FOO, foo, 0);
98   }
TableInNestedNSBuilderTableInNestedNSBuilder99   explicit TableInNestedNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
100         : fbb_(_fbb) {
101     start_ = fbb_.StartTable();
102   }
103   TableInNestedNSBuilder &operator=(const TableInNestedNSBuilder &);
FinishTableInNestedNSBuilder104   flatbuffers::Offset<TableInNestedNS> Finish() {
105     const auto end = fbb_.EndTable(start_);
106     auto o = flatbuffers::Offset<TableInNestedNS>(end);
107     return o;
108   }
109 };
110 
111 inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(
112     flatbuffers::FlatBufferBuilder &_fbb,
113     int32_t foo = 0) {
114   TableInNestedNSBuilder builder_(_fbb);
115   builder_.add_foo(foo);
116   return builder_.Finish();
117 }
118 
119 inline flatbuffers::TypeTable *TableInNestedNSTypeTable();
120 
121 inline flatbuffers::TypeTable *StructInNestedNSTypeTable();
122 
EnumInNestedNSTypeTable()123 inline flatbuffers::TypeTable *EnumInNestedNSTypeTable() {
124   static flatbuffers::TypeCode type_codes[] = {
125     { flatbuffers::ET_CHAR, 0, 0 },
126     { flatbuffers::ET_CHAR, 0, 0 },
127     { flatbuffers::ET_CHAR, 0, 0 }
128   };
129   static flatbuffers::TypeFunction type_refs[] = {
130     EnumInNestedNSTypeTable
131   };
132   static const char *names[] = {
133     "A",
134     "B",
135     "C"
136   };
137   static flatbuffers::TypeTable tt = {
138     flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names
139   };
140   return &tt;
141 }
142 
TableInNestedNSTypeTable()143 inline flatbuffers::TypeTable *TableInNestedNSTypeTable() {
144   static flatbuffers::TypeCode type_codes[] = {
145     { flatbuffers::ET_INT, 0, -1 }
146   };
147   static const char *names[] = {
148     "foo"
149   };
150   static flatbuffers::TypeTable tt = {
151     flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names
152   };
153   return &tt;
154 }
155 
StructInNestedNSTypeTable()156 inline flatbuffers::TypeTable *StructInNestedNSTypeTable() {
157   static flatbuffers::TypeCode type_codes[] = {
158     { flatbuffers::ET_INT, 0, -1 },
159     { flatbuffers::ET_INT, 0, -1 }
160   };
161   static const int32_t values[] = { 0, 4, 8 };
162   static const char *names[] = {
163     "a",
164     "b"
165   };
166   static flatbuffers::TypeTable tt = {
167     flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
168   };
169   return &tt;
170 }
171 
172 }  // namespace NamespaceB
173 }  // namespace NamespaceA
174 
175 #endif  // FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
176