1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 #ifndef FLATBUFFERS_GENERATED_STRUCT_TESTING_H_
4 #define FLATBUFFERS_GENERATED_STRUCT_TESTING_H_
5 
6 #include "flatbuffers/flatbuffers.h"
7 
8 namespace testing {
9 
10 struct TestSubTable;
11 struct TestSubTableBuilder;
12 
13 struct TestTableStruct;
14 struct TestTableStructBuilder;
15 
16 struct TestSubTable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
17   typedef TestSubTableBuilder Builder;
18   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_PLACEHOLDER = 4 };
placeholderFLATBUFFERS_FINAL_CLASS19   int32_t placeholder() const {
20     return GetField<int32_t>(VT_PLACEHOLDER, 0);
21   }
VerifyFLATBUFFERS_FINAL_CLASS22   bool Verify(flatbuffers::Verifier& verifier) const {
23     return VerifyTableStart(verifier) && VerifyField<int32_t>(verifier, VT_PLACEHOLDER) && verifier.EndTable();
24   }
25 };
26 
27 struct TestSubTableBuilder {
28   typedef TestSubTable Table;
29   flatbuffers::FlatBufferBuilder& fbb_;
30   flatbuffers::uoffset_t start_;
add_placeholderTestSubTableBuilder31   void add_placeholder(int32_t placeholder) {
32     fbb_.AddElement<int32_t>(TestSubTable::VT_PLACEHOLDER, placeholder, 0);
33   }
TestSubTableBuilderTestSubTableBuilder34   explicit TestSubTableBuilder(flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) {
35     start_ = fbb_.StartTable();
36   }
37   TestSubTableBuilder& operator=(const TestSubTableBuilder&);
FinishTestSubTableBuilder38   flatbuffers::Offset<TestSubTable> Finish() {
39     const auto end = fbb_.EndTable(start_);
40     auto o = flatbuffers::Offset<TestSubTable>(end);
41     return o;
42   }
43 };
44 
45 inline flatbuffers::Offset<TestSubTable> CreateTestSubTable(
46     flatbuffers::FlatBufferBuilder& _fbb, int32_t placeholder = 0) {
47   TestSubTableBuilder builder_(_fbb);
48   builder_.add_placeholder(placeholder);
49   return builder_.Finish();
50 }
51 
52 struct TestTableStruct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
53   typedef TestTableStructBuilder Builder;
54   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_SUB_TABLE = 4 };
sub_tableFLATBUFFERS_FINAL_CLASS55   const testing::TestSubTable* sub_table() const {
56     return GetPointer<const testing::TestSubTable*>(VT_SUB_TABLE);
57   }
VerifyFLATBUFFERS_FINAL_CLASS58   bool Verify(flatbuffers::Verifier& verifier) const {
59     return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_SUB_TABLE) && verifier.VerifyTable(sub_table()) &&
60            verifier.EndTable();
61   }
62 };
63 
64 struct TestTableStructBuilder {
65   typedef TestTableStruct Table;
66   flatbuffers::FlatBufferBuilder& fbb_;
67   flatbuffers::uoffset_t start_;
add_sub_tableTestTableStructBuilder68   void add_sub_table(flatbuffers::Offset<testing::TestSubTable> sub_table) {
69     fbb_.AddOffset(TestTableStruct::VT_SUB_TABLE, sub_table);
70   }
TestTableStructBuilderTestTableStructBuilder71   explicit TestTableStructBuilder(flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) {
72     start_ = fbb_.StartTable();
73   }
74   TestTableStructBuilder& operator=(const TestTableStructBuilder&);
FinishTestTableStructBuilder75   flatbuffers::Offset<TestTableStruct> Finish() {
76     const auto end = fbb_.EndTable(start_);
77     auto o = flatbuffers::Offset<TestTableStruct>(end);
78     return o;
79   }
80 };
81 
82 inline flatbuffers::Offset<TestTableStruct> CreateTestTableStruct(
83     flatbuffers::FlatBufferBuilder& _fbb, flatbuffers::Offset<testing::TestSubTable> sub_table = 0) {
84   TestTableStructBuilder builder_(_fbb);
85   builder_.add_sub_table(sub_table);
86   return builder_.Finish();
87 }
88 
GetTestTableStruct(const void * buf)89 inline const testing::TestTableStruct* GetTestTableStruct(const void* buf) {
90   return flatbuffers::GetRoot<testing::TestTableStruct>(buf);
91 }
92 
GetSizePrefixedTestTableStruct(const void * buf)93 inline const testing::TestTableStruct* GetSizePrefixedTestTableStruct(const void* buf) {
94   return flatbuffers::GetSizePrefixedRoot<testing::TestTableStruct>(buf);
95 }
96 
VerifyTestTableStructBuffer(flatbuffers::Verifier & verifier)97 inline bool VerifyTestTableStructBuffer(flatbuffers::Verifier& verifier) {
98   return verifier.VerifyBuffer<testing::TestTableStruct>(nullptr);
99 }
100 
VerifySizePrefixedTestTableStructBuffer(flatbuffers::Verifier & verifier)101 inline bool VerifySizePrefixedTestTableStructBuffer(flatbuffers::Verifier& verifier) {
102   return verifier.VerifySizePrefixedBuffer<testing::TestTableStruct>(nullptr);
103 }
104 
TestTableStructExtension()105 inline const char* TestTableStructExtension() {
106   return "bfbs";
107 }
108 
FinishTestTableStructBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<testing::TestTableStruct> root)109 inline void FinishTestTableStructBuffer(
110     flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<testing::TestTableStruct> root) {
111   fbb.Finish(root);
112 }
113 
FinishSizePrefixedTestTableStructBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<testing::TestTableStruct> root)114 inline void FinishSizePrefixedTestTableStructBuffer(
115     flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<testing::TestTableStruct> root) {
116   fbb.FinishSizePrefixed(root);
117 }
118 
119 }  // namespace testing
120 
121 #endif  // FLATBUFFERS_GENERATED_STRUCT_TESTING_H_
122