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
EnumNamesEnumInNestedNS()24 inline const char **EnumNamesEnumInNestedNS() {
25 static const char *names[] = {
26 "A",
27 "B",
28 "C",
29 nullptr
30 };
31 return names;
32 }
33
EnumNameEnumInNestedNS(EnumInNestedNS e)34 inline const char *EnumNameEnumInNestedNS(EnumInNestedNS e) {
35 const size_t index = static_cast<int>(e);
36 return EnumNamesEnumInNestedNS()[index];
37 }
38
39 MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS {
40 private:
41 int32_t a_;
42 int32_t b_;
43
44 public:
StructInNestedNS()45 StructInNestedNS() {
46 memset(this, 0, sizeof(StructInNestedNS));
47 }
StructInNestedNS(const StructInNestedNS & _o)48 StructInNestedNS(const StructInNestedNS &_o) {
49 memcpy(this, &_o, sizeof(StructInNestedNS));
50 }
StructInNestedNS(int32_t _a,int32_t _b)51 StructInNestedNS(int32_t _a, int32_t _b)
52 : a_(flatbuffers::EndianScalar(_a)),
53 b_(flatbuffers::EndianScalar(_b)) {
54 }
a()55 int32_t a() const {
56 return flatbuffers::EndianScalar(a_);
57 }
mutate_a(int32_t _a)58 void mutate_a(int32_t _a) {
59 flatbuffers::WriteScalar(&a_, _a);
60 }
b()61 int32_t b() const {
62 return flatbuffers::EndianScalar(b_);
63 }
mutate_b(int32_t _b)64 void mutate_b(int32_t _b) {
65 flatbuffers::WriteScalar(&b_, _b);
66 }
67 };
68 STRUCT_END(StructInNestedNS, 8);
69
70 struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
71 enum {
72 VT_FOO = 4
73 };
fooFLATBUFFERS_FINAL_CLASS74 int32_t foo() const {
75 return GetField<int32_t>(VT_FOO, 0);
76 }
mutate_fooFLATBUFFERS_FINAL_CLASS77 bool mutate_foo(int32_t _foo) {
78 return SetField(VT_FOO, _foo);
79 }
VerifyFLATBUFFERS_FINAL_CLASS80 bool Verify(flatbuffers::Verifier &verifier) const {
81 return VerifyTableStart(verifier) &&
82 VerifyField<int32_t>(verifier, VT_FOO) &&
83 verifier.EndTable();
84 }
85 };
86
87 struct TableInNestedNSBuilder {
88 flatbuffers::FlatBufferBuilder &fbb_;
89 flatbuffers::uoffset_t start_;
add_fooTableInNestedNSBuilder90 void add_foo(int32_t foo) {
91 fbb_.AddElement<int32_t>(TableInNestedNS::VT_FOO, foo, 0);
92 }
TableInNestedNSBuilderTableInNestedNSBuilder93 TableInNestedNSBuilder(flatbuffers::FlatBufferBuilder &_fbb)
94 : fbb_(_fbb) {
95 start_ = fbb_.StartTable();
96 }
97 TableInNestedNSBuilder &operator=(const TableInNestedNSBuilder &);
FinishTableInNestedNSBuilder98 flatbuffers::Offset<TableInNestedNS> Finish() {
99 const auto end = fbb_.EndTable(start_, 1);
100 auto o = flatbuffers::Offset<TableInNestedNS>(end);
101 return o;
102 }
103 };
104
105 inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(
106 flatbuffers::FlatBufferBuilder &_fbb,
107 int32_t foo = 0) {
108 TableInNestedNSBuilder builder_(_fbb);
109 builder_.add_foo(foo);
110 return builder_.Finish();
111 }
112
113 } // namespace NamespaceB
114 } // namespace NamespaceA
115
116 #endif // FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
117