-
Notifications
You must be signed in to change notification settings - Fork 89
/
feature_generated.h
285 lines (261 loc) · 10.1 KB
/
feature_generated.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_FEATURE_FLATGEOBUF_H_
#define FLATBUFFERS_GENERATED_FEATURE_FLATGEOBUF_H_
#include "flatbuffers/flatbuffers.h"
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 22 &&
FLATBUFFERS_VERSION_MINOR == 9 &&
FLATBUFFERS_VERSION_REVISION == 29,
"Non-compatible flatbuffers version included");
#include "header_generated.h"
namespace FlatGeobuf {
struct Geometry;
struct GeometryBuilder;
struct Feature;
struct FeatureBuilder;
struct Geometry FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef GeometryBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_ENDS = 4,
VT_XY = 6,
VT_Z = 8,
VT_M = 10,
VT_T = 12,
VT_TM = 14,
VT_TYPE = 16,
VT_PARTS = 18
};
const flatbuffers::Vector<uint32_t> *ends() const {
return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_ENDS);
}
const flatbuffers::Vector<double> *xy() const {
return GetPointer<const flatbuffers::Vector<double> *>(VT_XY);
}
const flatbuffers::Vector<double> *z() const {
return GetPointer<const flatbuffers::Vector<double> *>(VT_Z);
}
const flatbuffers::Vector<double> *m() const {
return GetPointer<const flatbuffers::Vector<double> *>(VT_M);
}
const flatbuffers::Vector<double> *t() const {
return GetPointer<const flatbuffers::Vector<double> *>(VT_T);
}
const flatbuffers::Vector<uint64_t> *tm() const {
return GetPointer<const flatbuffers::Vector<uint64_t> *>(VT_TM);
}
FlatGeobuf::GeometryType type() const {
return static_cast<FlatGeobuf::GeometryType>(GetField<uint8_t>(VT_TYPE, 0));
}
const flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Geometry>> *parts() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Geometry>> *>(VT_PARTS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_ENDS) &&
verifier.VerifyVector(ends()) &&
VerifyOffset(verifier, VT_XY) &&
verifier.VerifyVector(xy()) &&
VerifyOffset(verifier, VT_Z) &&
verifier.VerifyVector(z()) &&
VerifyOffset(verifier, VT_M) &&
verifier.VerifyVector(m()) &&
VerifyOffset(verifier, VT_T) &&
verifier.VerifyVector(t()) &&
VerifyOffset(verifier, VT_TM) &&
verifier.VerifyVector(tm()) &&
VerifyField<uint8_t>(verifier, VT_TYPE, 1) &&
VerifyOffset(verifier, VT_PARTS) &&
verifier.VerifyVector(parts()) &&
verifier.VerifyVectorOfTables(parts()) &&
verifier.EndTable();
}
};
struct GeometryBuilder {
typedef Geometry Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_ends(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> ends) {
fbb_.AddOffset(Geometry::VT_ENDS, ends);
}
void add_xy(flatbuffers::Offset<flatbuffers::Vector<double>> xy) {
fbb_.AddOffset(Geometry::VT_XY, xy);
}
void add_z(flatbuffers::Offset<flatbuffers::Vector<double>> z) {
fbb_.AddOffset(Geometry::VT_Z, z);
}
void add_m(flatbuffers::Offset<flatbuffers::Vector<double>> m) {
fbb_.AddOffset(Geometry::VT_M, m);
}
void add_t(flatbuffers::Offset<flatbuffers::Vector<double>> t) {
fbb_.AddOffset(Geometry::VT_T, t);
}
void add_tm(flatbuffers::Offset<flatbuffers::Vector<uint64_t>> tm) {
fbb_.AddOffset(Geometry::VT_TM, tm);
}
void add_type(FlatGeobuf::GeometryType type) {
fbb_.AddElement<uint8_t>(Geometry::VT_TYPE, static_cast<uint8_t>(type), 0);
}
void add_parts(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Geometry>>> parts) {
fbb_.AddOffset(Geometry::VT_PARTS, parts);
}
explicit GeometryBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Geometry> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Geometry>(end);
return o;
}
};
inline flatbuffers::Offset<Geometry> CreateGeometry(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<uint32_t>> ends = 0,
flatbuffers::Offset<flatbuffers::Vector<double>> xy = 0,
flatbuffers::Offset<flatbuffers::Vector<double>> z = 0,
flatbuffers::Offset<flatbuffers::Vector<double>> m = 0,
flatbuffers::Offset<flatbuffers::Vector<double>> t = 0,
flatbuffers::Offset<flatbuffers::Vector<uint64_t>> tm = 0,
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType_Unknown,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Geometry>>> parts = 0) {
GeometryBuilder builder_(_fbb);
builder_.add_parts(parts);
builder_.add_tm(tm);
builder_.add_t(t);
builder_.add_m(m);
builder_.add_z(z);
builder_.add_xy(xy);
builder_.add_ends(ends);
builder_.add_type(type);
return builder_.Finish();
}
inline flatbuffers::Offset<Geometry> CreateGeometryDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<uint32_t> *ends = nullptr,
const std::vector<double> *xy = nullptr,
const std::vector<double> *z = nullptr,
const std::vector<double> *m = nullptr,
const std::vector<double> *t = nullptr,
const std::vector<uint64_t> *tm = nullptr,
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType_Unknown,
const std::vector<flatbuffers::Offset<FlatGeobuf::Geometry>> *parts = nullptr) {
auto ends__ = ends ? _fbb.CreateVector<uint32_t>(*ends) : 0;
auto xy__ = xy ? _fbb.CreateVector<double>(*xy) : 0;
auto z__ = z ? _fbb.CreateVector<double>(*z) : 0;
auto m__ = m ? _fbb.CreateVector<double>(*m) : 0;
auto t__ = t ? _fbb.CreateVector<double>(*t) : 0;
auto tm__ = tm ? _fbb.CreateVector<uint64_t>(*tm) : 0;
auto parts__ = parts ? _fbb.CreateVector<flatbuffers::Offset<FlatGeobuf::Geometry>>(*parts) : 0;
return FlatGeobuf::CreateGeometry(
_fbb,
ends__,
xy__,
z__,
m__,
t__,
tm__,
type,
parts__);
}
struct Feature FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef FeatureBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_GEOMETRY = 4,
VT_PROPERTIES = 6,
VT_COLUMNS = 8
};
const FlatGeobuf::Geometry *geometry() const {
return GetPointer<const FlatGeobuf::Geometry *>(VT_GEOMETRY);
}
const flatbuffers::Vector<uint8_t> *properties() const {
return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_PROPERTIES);
}
const flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Column>> *columns() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Column>> *>(VT_COLUMNS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_GEOMETRY) &&
verifier.VerifyTable(geometry()) &&
VerifyOffset(verifier, VT_PROPERTIES) &&
verifier.VerifyVector(properties()) &&
VerifyOffset(verifier, VT_COLUMNS) &&
verifier.VerifyVector(columns()) &&
verifier.VerifyVectorOfTables(columns()) &&
verifier.EndTable();
}
};
struct FeatureBuilder {
typedef Feature Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_geometry(flatbuffers::Offset<FlatGeobuf::Geometry> geometry) {
fbb_.AddOffset(Feature::VT_GEOMETRY, geometry);
}
void add_properties(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> properties) {
fbb_.AddOffset(Feature::VT_PROPERTIES, properties);
}
void add_columns(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Column>>> columns) {
fbb_.AddOffset(Feature::VT_COLUMNS, columns);
}
explicit FeatureBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Feature> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Feature>(end);
return o;
}
};
inline flatbuffers::Offset<Feature> CreateFeature(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<FlatGeobuf::Geometry> geometry = 0,
flatbuffers::Offset<flatbuffers::Vector<uint8_t>> properties = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Column>>> columns = 0) {
FeatureBuilder builder_(_fbb);
builder_.add_columns(columns);
builder_.add_properties(properties);
builder_.add_geometry(geometry);
return builder_.Finish();
}
inline flatbuffers::Offset<Feature> CreateFeatureDirect(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<FlatGeobuf::Geometry> geometry = 0,
const std::vector<uint8_t> *properties = nullptr,
const std::vector<flatbuffers::Offset<FlatGeobuf::Column>> *columns = nullptr) {
auto properties__ = properties ? _fbb.CreateVector<uint8_t>(*properties) : 0;
auto columns__ = columns ? _fbb.CreateVector<flatbuffers::Offset<FlatGeobuf::Column>>(*columns) : 0;
return FlatGeobuf::CreateFeature(
_fbb,
geometry,
properties__,
columns__);
}
inline const FlatGeobuf::Feature *GetFeature(const void *buf) {
return flatbuffers::GetRoot<FlatGeobuf::Feature>(buf);
}
inline const FlatGeobuf::Feature *GetSizePrefixedFeature(const void *buf) {
return flatbuffers::GetSizePrefixedRoot<FlatGeobuf::Feature>(buf);
}
inline bool VerifyFeatureBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<FlatGeobuf::Feature>(nullptr);
}
inline bool VerifySizePrefixedFeatureBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<FlatGeobuf::Feature>(nullptr);
}
inline void FinishFeatureBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<FlatGeobuf::Feature> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedFeatureBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<FlatGeobuf::Feature> root) {
fbb.FinishSizePrefixed(root);
}
} // namespace FlatGeobuf
#endif // FLATBUFFERS_GENERATED_FEATURE_FLATGEOBUF_H_