• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 #ifndef FLATBUFFERS_GENERATED_FLOAT_TESTING_H_
4 #define FLATBUFFERS_GENERATED_FLOAT_TESTING_H_
5 
6 #include "flatbuffers/flatbuffers.h"
7 
8 namespace testing {
9 
10 struct TestTableFloat;
11 struct TestTableFloatBuilder;
12 
13 struct TestTableFloat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
14   typedef TestTableFloatBuilder Builder;
15   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_TEST_FLOAT = 4 };
test_floatFLATBUFFERS_FINAL_CLASS16   float test_float() const {
17     return GetField<float>(VT_TEST_FLOAT, 0.0f);
18   }
VerifyFLATBUFFERS_FINAL_CLASS19   bool Verify(flatbuffers::Verifier& verifier) const {
20     return VerifyTableStart(verifier) && VerifyField<float>(verifier, VT_TEST_FLOAT) && verifier.EndTable();
21   }
22 };
23 
24 struct TestTableFloatBuilder {
25   typedef TestTableFloat Table;
26   flatbuffers::FlatBufferBuilder& fbb_;
27   flatbuffers::uoffset_t start_;
add_test_floatTestTableFloatBuilder28   void add_test_float(float test_float) {
29     fbb_.AddElement<float>(TestTableFloat::VT_TEST_FLOAT, test_float, 0.0f);
30   }
TestTableFloatBuilderTestTableFloatBuilder31   explicit TestTableFloatBuilder(flatbuffers::FlatBufferBuilder& _fbb) : fbb_(_fbb) {
32     start_ = fbb_.StartTable();
33   }
34   TestTableFloatBuilder& operator=(const TestTableFloatBuilder&);
FinishTestTableFloatBuilder35   flatbuffers::Offset<TestTableFloat> Finish() {
36     const auto end = fbb_.EndTable(start_);
37     auto o = flatbuffers::Offset<TestTableFloat>(end);
38     return o;
39   }
40 };
41 
42 inline flatbuffers::Offset<TestTableFloat> CreateTestTableFloat(
43     flatbuffers::FlatBufferBuilder& _fbb, float test_float = 0.0f) {
44   TestTableFloatBuilder builder_(_fbb);
45   builder_.add_test_float(test_float);
46   return builder_.Finish();
47 }
48 
GetTestTableFloat(const void * buf)49 inline const testing::TestTableFloat* GetTestTableFloat(const void* buf) {
50   return flatbuffers::GetRoot<testing::TestTableFloat>(buf);
51 }
52 
GetSizePrefixedTestTableFloat(const void * buf)53 inline const testing::TestTableFloat* GetSizePrefixedTestTableFloat(const void* buf) {
54   return flatbuffers::GetSizePrefixedRoot<testing::TestTableFloat>(buf);
55 }
56 
VerifyTestTableFloatBuffer(flatbuffers::Verifier & verifier)57 inline bool VerifyTestTableFloatBuffer(flatbuffers::Verifier& verifier) {
58   return verifier.VerifyBuffer<testing::TestTableFloat>(nullptr);
59 }
60 
VerifySizePrefixedTestTableFloatBuffer(flatbuffers::Verifier & verifier)61 inline bool VerifySizePrefixedTestTableFloatBuffer(flatbuffers::Verifier& verifier) {
62   return verifier.VerifySizePrefixedBuffer<testing::TestTableFloat>(nullptr);
63 }
64 
TestTableFloatExtension()65 inline const char* TestTableFloatExtension() {
66   return "bfbs";
67 }
68 
FinishTestTableFloatBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<testing::TestTableFloat> root)69 inline void FinishTestTableFloatBuffer(
70     flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<testing::TestTableFloat> root) {
71   fbb.Finish(root);
72 }
73 
FinishSizePrefixedTestTableFloatBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<testing::TestTableFloat> root)74 inline void FinishSizePrefixedTestTableFloatBuffer(
75     flatbuffers::FlatBufferBuilder& fbb, flatbuffers::Offset<testing::TestTableFloat> root) {
76   fbb.FinishSizePrefixed(root);
77 }
78 
79 }  // namespace testing
80 
81 #endif  // FLATBUFFERS_GENERATED_FLOAT_TESTING_H_
82