1 | // automatically generated by the FlatBuffers compiler, do not modify |
2 | |
3 | |
4 | #ifndef FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_ |
5 | #define FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_ |
6 | |
7 | #include "flatbuffers/flatbuffers.h" |
8 | |
9 | #include "Schema_generated.h" |
10 | |
11 | namespace org { |
12 | namespace apache { |
13 | namespace arrow { |
14 | namespace flatbuf { |
15 | |
16 | struct Footer; |
17 | |
18 | struct Block; |
19 | |
20 | FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Block FLATBUFFERS_FINAL_CLASS { |
21 | private: |
22 | int64_t offset_; |
23 | int32_t metaDataLength_; |
24 | int32_t padding0__; |
25 | int64_t bodyLength_; |
26 | |
27 | public: |
28 | Block() { |
29 | memset(static_cast<void *>(this), 0, sizeof(Block)); |
30 | } |
31 | Block(int64_t _offset, int32_t _metaDataLength, int64_t _bodyLength) |
32 | : offset_(flatbuffers::EndianScalar(_offset)), |
33 | metaDataLength_(flatbuffers::EndianScalar(_metaDataLength)), |
34 | padding0__(0), |
35 | bodyLength_(flatbuffers::EndianScalar(_bodyLength)) { |
36 | (void)padding0__; |
37 | } |
38 | /// Index to the start of the RecordBlock (note this is past the Message header) |
39 | int64_t offset() const { |
40 | return flatbuffers::EndianScalar(offset_); |
41 | } |
42 | /// Length of the metadata |
43 | int32_t metaDataLength() const { |
44 | return flatbuffers::EndianScalar(metaDataLength_); |
45 | } |
46 | /// Length of the data (this is aligned so there can be a gap between this and |
47 | /// the metatdata). |
48 | int64_t bodyLength() const { |
49 | return flatbuffers::EndianScalar(bodyLength_); |
50 | } |
51 | }; |
52 | FLATBUFFERS_STRUCT_END(Block, 24); |
53 | |
54 | /// ---------------------------------------------------------------------- |
55 | /// Arrow File metadata |
56 | /// |
57 | struct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { |
58 | enum FLATBUFFERS_VTABLE_UNDERLYING_TYPE { |
59 | = 4, |
60 | = 6, |
61 | = 8, |
62 | = 10 |
63 | }; |
64 | MetadataVersion () const { |
65 | return static_cast<MetadataVersion>(GetField<int16_t>(VT_VERSION, 0)); |
66 | } |
67 | const Schema *() const { |
68 | return GetPointer<const Schema *>(VT_SCHEMA); |
69 | } |
70 | const flatbuffers::Vector<const Block *> *() const { |
71 | return GetPointer<const flatbuffers::Vector<const Block *> *>(VT_DICTIONARIES); |
72 | } |
73 | const flatbuffers::Vector<const Block *> *() const { |
74 | return GetPointer<const flatbuffers::Vector<const Block *> *>(VT_RECORDBATCHES); |
75 | } |
76 | bool (flatbuffers::Verifier &verifier) const { |
77 | return VerifyTableStart(verifier) && |
78 | VerifyField<int16_t>(verifier, VT_VERSION) && |
79 | VerifyOffset(verifier, VT_SCHEMA) && |
80 | verifier.VerifyTable(schema()) && |
81 | VerifyOffset(verifier, VT_DICTIONARIES) && |
82 | verifier.VerifyVector(dictionaries()) && |
83 | VerifyOffset(verifier, VT_RECORDBATCHES) && |
84 | verifier.VerifyVector(recordBatches()) && |
85 | verifier.EndTable(); |
86 | } |
87 | }; |
88 | |
89 | struct { |
90 | flatbuffers::FlatBufferBuilder &; |
91 | flatbuffers::uoffset_t ; |
92 | void (MetadataVersion version) { |
93 | fbb_.AddElement<int16_t>(Footer::VT_VERSION, static_cast<int16_t>(version), 0); |
94 | } |
95 | void (flatbuffers::Offset<Schema> schema) { |
96 | fbb_.AddOffset(Footer::VT_SCHEMA, schema); |
97 | } |
98 | void (flatbuffers::Offset<flatbuffers::Vector<const Block *>> dictionaries) { |
99 | fbb_.AddOffset(Footer::VT_DICTIONARIES, dictionaries); |
100 | } |
101 | void (flatbuffers::Offset<flatbuffers::Vector<const Block *>> recordBatches) { |
102 | fbb_.AddOffset(Footer::VT_RECORDBATCHES, recordBatches); |
103 | } |
104 | explicit (flatbuffers::FlatBufferBuilder &_fbb) |
105 | : fbb_(_fbb) { |
106 | start_ = fbb_.StartTable(); |
107 | } |
108 | FooterBuilder &(const FooterBuilder &); |
109 | flatbuffers::Offset<Footer> () { |
110 | const auto end = fbb_.EndTable(start_); |
111 | auto o = flatbuffers::Offset<Footer>(end); |
112 | return o; |
113 | } |
114 | }; |
115 | |
116 | inline flatbuffers::Offset<Footer> ( |
117 | flatbuffers::FlatBufferBuilder &_fbb, |
118 | MetadataVersion version = MetadataVersion_V1, |
119 | flatbuffers::Offset<Schema> schema = 0, |
120 | flatbuffers::Offset<flatbuffers::Vector<const Block *>> dictionaries = 0, |
121 | flatbuffers::Offset<flatbuffers::Vector<const Block *>> recordBatches = 0) { |
122 | FooterBuilder builder_(_fbb); |
123 | builder_.add_recordBatches(recordBatches); |
124 | builder_.add_dictionaries(dictionaries); |
125 | builder_.add_schema(schema); |
126 | builder_.add_version(version); |
127 | return builder_.Finish(); |
128 | } |
129 | |
130 | inline flatbuffers::Offset<Footer> ( |
131 | flatbuffers::FlatBufferBuilder &_fbb, |
132 | MetadataVersion version = MetadataVersion_V1, |
133 | flatbuffers::Offset<Schema> schema = 0, |
134 | const std::vector<Block> *dictionaries = nullptr, |
135 | const std::vector<Block> *recordBatches = nullptr) { |
136 | auto dictionaries__ = dictionaries ? _fbb.CreateVectorOfStructs<Block>(*dictionaries) : 0; |
137 | auto recordBatches__ = recordBatches ? _fbb.CreateVectorOfStructs<Block>(*recordBatches) : 0; |
138 | return org::apache::arrow::flatbuf::CreateFooter( |
139 | _fbb, |
140 | version, |
141 | schema, |
142 | dictionaries__, |
143 | recordBatches__); |
144 | } |
145 | |
146 | inline const org::apache::arrow::flatbuf::Footer *(const void *buf) { |
147 | return flatbuffers::GetRoot<org::apache::arrow::flatbuf::Footer>(buf); |
148 | } |
149 | |
150 | inline const org::apache::arrow::flatbuf::Footer *(const void *buf) { |
151 | return flatbuffers::GetSizePrefixedRoot<org::apache::arrow::flatbuf::Footer>(buf); |
152 | } |
153 | |
154 | inline bool ( |
155 | flatbuffers::Verifier &verifier) { |
156 | return verifier.VerifyBuffer<org::apache::arrow::flatbuf::Footer>(nullptr); |
157 | } |
158 | |
159 | inline bool ( |
160 | flatbuffers::Verifier &verifier) { |
161 | return verifier.VerifySizePrefixedBuffer<org::apache::arrow::flatbuf::Footer>(nullptr); |
162 | } |
163 | |
164 | inline void ( |
165 | flatbuffers::FlatBufferBuilder &fbb, |
166 | flatbuffers::Offset<org::apache::arrow::flatbuf::Footer> root) { |
167 | fbb.Finish(root); |
168 | } |
169 | |
170 | inline void ( |
171 | flatbuffers::FlatBufferBuilder &fbb, |
172 | flatbuffers::Offset<org::apache::arrow::flatbuf::Footer> root) { |
173 | fbb.FinishSizePrefixed(root); |
174 | } |
175 | |
176 | } // namespace flatbuf |
177 | } // namespace arrow |
178 | } // namespace apache |
179 | } // namespace org |
180 | |
181 | #endif // FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_ |
182 | |