-
Notifications
You must be signed in to change notification settings - Fork 0
/
CityJSONFeature_generated.h
942 lines (856 loc) · 32.4 KB
/
CityJSONFeature_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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_CITYJSONFEATURE_CITYFB_H_
#define FLATBUFFERS_GENERATED_CITYJSONFEATURE_CITYFB_H_
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/flexbuffers.h"
#include "flatbuffers/flex_flat_util.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 == 12 &&
FLATBUFFERS_VERSION_REVISION == 6,
"Non-compatible flatbuffers version included");
namespace CityFB {
struct Vertex;
struct CityJSONFeature;
struct CityJSONFeatureBuilder;
struct CityObject;
struct CityObjectBuilder;
struct Geometry;
struct GeometryBuilder;
struct MultiSurface;
struct MultiSurfaceBuilder;
struct Solid;
struct SolidBuilder;
struct Shell;
struct ShellBuilder;
struct Surface;
struct SurfaceBuilder;
struct Ring;
struct RingBuilder;
struct GeometrySemantics;
struct GeometrySemanticsBuilder;
struct SemanticSurface;
struct SemanticSurfaceBuilder;
enum CityObjectType : int16_t {
CityObjectType_Building = 0,
CityObjectType_BuildingPart = 1,
CityObjectType_MIN = CityObjectType_Building,
CityObjectType_MAX = CityObjectType_BuildingPart
};
inline const CityObjectType (&EnumValuesCityObjectType())[2] {
static const CityObjectType values[] = {
CityObjectType_Building,
CityObjectType_BuildingPart
};
return values;
}
inline const char * const *EnumNamesCityObjectType() {
static const char * const names[3] = {
"Building",
"BuildingPart",
nullptr
};
return names;
}
inline const char *EnumNameCityObjectType(CityObjectType e) {
if (flatbuffers::IsOutRange(e, CityObjectType_Building, CityObjectType_BuildingPart)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesCityObjectType()[index];
}
enum Boundaries : uint8_t {
Boundaries_NONE = 0,
Boundaries_Solid = 1,
Boundaries_MultiSurface = 2,
Boundaries_MIN = Boundaries_NONE,
Boundaries_MAX = Boundaries_MultiSurface
};
inline const Boundaries (&EnumValuesBoundaries())[3] {
static const Boundaries values[] = {
Boundaries_NONE,
Boundaries_Solid,
Boundaries_MultiSurface
};
return values;
}
inline const char * const *EnumNamesBoundaries() {
static const char * const names[4] = {
"NONE",
"Solid",
"MultiSurface",
nullptr
};
return names;
}
inline const char *EnumNameBoundaries(Boundaries e) {
if (flatbuffers::IsOutRange(e, Boundaries_NONE, Boundaries_MultiSurface)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesBoundaries()[index];
}
template<typename T> struct BoundariesTraits {
static const Boundaries enum_value = Boundaries_NONE;
};
template<> struct BoundariesTraits<CityFB::Solid> {
static const Boundaries enum_value = Boundaries_Solid;
};
template<> struct BoundariesTraits<CityFB::MultiSurface> {
static const Boundaries enum_value = Boundaries_MultiSurface;
};
bool VerifyBoundaries(flatbuffers::Verifier &verifier, const void *obj, Boundaries type);
bool VerifyBoundariesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vertex FLATBUFFERS_FINAL_CLASS {
private:
uint32_t x_;
uint32_t y_;
uint32_t z_;
public:
Vertex()
: x_(0),
y_(0),
z_(0) {
}
Vertex(uint32_t _x, uint32_t _y, uint32_t _z)
: x_(flatbuffers::EndianScalar(_x)),
y_(flatbuffers::EndianScalar(_y)),
z_(flatbuffers::EndianScalar(_z)) {
}
uint32_t x() const {
return flatbuffers::EndianScalar(x_);
}
uint32_t y() const {
return flatbuffers::EndianScalar(y_);
}
uint32_t z() const {
return flatbuffers::EndianScalar(z_);
}
};
FLATBUFFERS_STRUCT_END(Vertex, 12);
struct CityJSONFeature FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef CityJSONFeatureBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_ID = 4,
VT_CITY_OBJECTS = 6,
VT_VERTICES = 8
};
const flatbuffers::String *id() const {
return GetPointer<const flatbuffers::String *>(VT_ID);
}
const flatbuffers::Vector<flatbuffers::Offset<CityFB::CityObject>> *city_objects() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::CityObject>> *>(VT_CITY_OBJECTS);
}
const flatbuffers::Vector<const CityFB::Vertex *> *vertices() const {
return GetPointer<const flatbuffers::Vector<const CityFB::Vertex *> *>(VT_VERTICES);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_ID) &&
verifier.VerifyString(id()) &&
VerifyOffset(verifier, VT_CITY_OBJECTS) &&
verifier.VerifyVector(city_objects()) &&
verifier.VerifyVectorOfTables(city_objects()) &&
VerifyOffset(verifier, VT_VERTICES) &&
verifier.VerifyVector(vertices()) &&
verifier.EndTable();
}
};
struct CityJSONFeatureBuilder {
typedef CityJSONFeature Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_id(flatbuffers::Offset<flatbuffers::String> id) {
fbb_.AddOffset(CityJSONFeature::VT_ID, id);
}
void add_city_objects(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::CityObject>>> city_objects) {
fbb_.AddOffset(CityJSONFeature::VT_CITY_OBJECTS, city_objects);
}
void add_vertices(flatbuffers::Offset<flatbuffers::Vector<const CityFB::Vertex *>> vertices) {
fbb_.AddOffset(CityJSONFeature::VT_VERTICES, vertices);
}
explicit CityJSONFeatureBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<CityJSONFeature> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<CityJSONFeature>(end);
return o;
}
};
inline flatbuffers::Offset<CityJSONFeature> CreateCityJSONFeature(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> id = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::CityObject>>> city_objects = 0,
flatbuffers::Offset<flatbuffers::Vector<const CityFB::Vertex *>> vertices = 0) {
CityJSONFeatureBuilder builder_(_fbb);
builder_.add_vertices(vertices);
builder_.add_city_objects(city_objects);
builder_.add_id(id);
return builder_.Finish();
}
inline flatbuffers::Offset<CityJSONFeature> CreateCityJSONFeatureDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const char *id = nullptr,
std::vector<flatbuffers::Offset<CityFB::CityObject>> *city_objects = nullptr,
const std::vector<CityFB::Vertex> *vertices = nullptr) {
auto id__ = id ? _fbb.CreateString(id) : 0;
auto city_objects__ = city_objects ? _fbb.CreateVectorOfSortedTables<CityFB::CityObject>(city_objects) : 0;
auto vertices__ = vertices ? _fbb.CreateVectorOfStructs<CityFB::Vertex>(*vertices) : 0;
return CityFB::CreateCityJSONFeature(
_fbb,
id__,
city_objects__,
vertices__);
}
struct CityObject FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef CityObjectBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_TYPE = 4,
VT_ID = 6,
VT_ATTRIBUTES = 8,
VT_GEOMETRY = 10,
VT_CHILDREN = 12,
VT_PARENT = 14
};
CityFB::CityObjectType type() const {
return static_cast<CityFB::CityObjectType>(GetField<int16_t>(VT_TYPE, 0));
}
const flatbuffers::String *id() const {
return GetPointer<const flatbuffers::String *>(VT_ID);
}
bool KeyCompareLessThan(const CityObject * const o) const {
return *id() < *o->id();
}
int KeyCompareWithValue(const char *_id) const {
return strcmp(id()->c_str(), _id);
}
const flatbuffers::Vector<uint8_t> *attributes() const {
return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_ATTRIBUTES);
}
flexbuffers::Reference attributes_flexbuffer_root() const {
return flexbuffers::GetRoot(attributes()->Data(), attributes()->size());
}
const flatbuffers::Vector<flatbuffers::Offset<CityFB::Geometry>> *geometry() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::Geometry>> *>(VT_GEOMETRY);
}
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *children() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_CHILDREN);
}
const flatbuffers::String *parent() const {
return GetPointer<const flatbuffers::String *>(VT_PARENT);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int16_t>(verifier, VT_TYPE, 2) &&
VerifyOffsetRequired(verifier, VT_ID) &&
verifier.VerifyString(id()) &&
VerifyOffset(verifier, VT_ATTRIBUTES) &&
verifier.VerifyVector(attributes()) &&
flexbuffers::VerifyNestedFlexBuffer(attributes(), verifier) &&
VerifyOffset(verifier, VT_GEOMETRY) &&
verifier.VerifyVector(geometry()) &&
verifier.VerifyVectorOfTables(geometry()) &&
VerifyOffset(verifier, VT_CHILDREN) &&
verifier.VerifyVector(children()) &&
verifier.VerifyVectorOfStrings(children()) &&
VerifyOffset(verifier, VT_PARENT) &&
verifier.VerifyString(parent()) &&
verifier.EndTable();
}
};
struct CityObjectBuilder {
typedef CityObject Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_type(CityFB::CityObjectType type) {
fbb_.AddElement<int16_t>(CityObject::VT_TYPE, static_cast<int16_t>(type), 0);
}
void add_id(flatbuffers::Offset<flatbuffers::String> id) {
fbb_.AddOffset(CityObject::VT_ID, id);
}
void add_attributes(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> attributes) {
fbb_.AddOffset(CityObject::VT_ATTRIBUTES, attributes);
}
void add_geometry(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Geometry>>> geometry) {
fbb_.AddOffset(CityObject::VT_GEOMETRY, geometry);
}
void add_children(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> children) {
fbb_.AddOffset(CityObject::VT_CHILDREN, children);
}
void add_parent(flatbuffers::Offset<flatbuffers::String> parent) {
fbb_.AddOffset(CityObject::VT_PARENT, parent);
}
explicit CityObjectBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<CityObject> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<CityObject>(end);
fbb_.Required(o, CityObject::VT_ID);
return o;
}
};
inline flatbuffers::Offset<CityObject> CreateCityObject(
flatbuffers::FlatBufferBuilder &_fbb,
CityFB::CityObjectType type = CityFB::CityObjectType_Building,
flatbuffers::Offset<flatbuffers::String> id = 0,
flatbuffers::Offset<flatbuffers::Vector<uint8_t>> attributes = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Geometry>>> geometry = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> children = 0,
flatbuffers::Offset<flatbuffers::String> parent = 0) {
CityObjectBuilder builder_(_fbb);
builder_.add_parent(parent);
builder_.add_children(children);
builder_.add_geometry(geometry);
builder_.add_attributes(attributes);
builder_.add_id(id);
builder_.add_type(type);
return builder_.Finish();
}
inline flatbuffers::Offset<CityObject> CreateCityObjectDirect(
flatbuffers::FlatBufferBuilder &_fbb,
CityFB::CityObjectType type = CityFB::CityObjectType_Building,
const char *id = nullptr,
const std::vector<uint8_t> *attributes = nullptr,
const std::vector<flatbuffers::Offset<CityFB::Geometry>> *geometry = nullptr,
const std::vector<flatbuffers::Offset<flatbuffers::String>> *children = nullptr,
const char *parent = nullptr) {
auto id__ = id ? _fbb.CreateString(id) : 0;
auto attributes__ = attributes ? _fbb.CreateVector<uint8_t>(*attributes) : 0;
auto geometry__ = geometry ? _fbb.CreateVector<flatbuffers::Offset<CityFB::Geometry>>(*geometry) : 0;
auto children__ = children ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*children) : 0;
auto parent__ = parent ? _fbb.CreateString(parent) : 0;
return CityFB::CreateCityObject(
_fbb,
type,
id__,
attributes__,
geometry__,
children__,
parent__);
}
struct Geometry FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef GeometryBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_LOD = 4,
VT_BOUNDARIES_TYPE = 6,
VT_BOUNDARIES = 8,
VT_SEMANTICS = 10
};
const flatbuffers::String *lod() const {
return GetPointer<const flatbuffers::String *>(VT_LOD);
}
CityFB::Boundaries boundaries_type() const {
return static_cast<CityFB::Boundaries>(GetField<uint8_t>(VT_BOUNDARIES_TYPE, 0));
}
const void *boundaries() const {
return GetPointer<const void *>(VT_BOUNDARIES);
}
template<typename T> const T *boundaries_as() const;
const CityFB::Solid *boundaries_as_Solid() const {
return boundaries_type() == CityFB::Boundaries_Solid ? static_cast<const CityFB::Solid *>(boundaries()) : nullptr;
}
const CityFB::MultiSurface *boundaries_as_MultiSurface() const {
return boundaries_type() == CityFB::Boundaries_MultiSurface ? static_cast<const CityFB::MultiSurface *>(boundaries()) : nullptr;
}
const CityFB::GeometrySemantics *semantics() const {
return GetPointer<const CityFB::GeometrySemantics *>(VT_SEMANTICS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_LOD) &&
verifier.VerifyString(lod()) &&
VerifyField<uint8_t>(verifier, VT_BOUNDARIES_TYPE, 1) &&
VerifyOffset(verifier, VT_BOUNDARIES) &&
VerifyBoundaries(verifier, boundaries(), boundaries_type()) &&
VerifyOffset(verifier, VT_SEMANTICS) &&
verifier.VerifyTable(semantics()) &&
verifier.EndTable();
}
};
template<> inline const CityFB::Solid *Geometry::boundaries_as<CityFB::Solid>() const {
return boundaries_as_Solid();
}
template<> inline const CityFB::MultiSurface *Geometry::boundaries_as<CityFB::MultiSurface>() const {
return boundaries_as_MultiSurface();
}
struct GeometryBuilder {
typedef Geometry Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_lod(flatbuffers::Offset<flatbuffers::String> lod) {
fbb_.AddOffset(Geometry::VT_LOD, lod);
}
void add_boundaries_type(CityFB::Boundaries boundaries_type) {
fbb_.AddElement<uint8_t>(Geometry::VT_BOUNDARIES_TYPE, static_cast<uint8_t>(boundaries_type), 0);
}
void add_boundaries(flatbuffers::Offset<void> boundaries) {
fbb_.AddOffset(Geometry::VT_BOUNDARIES, boundaries);
}
void add_semantics(flatbuffers::Offset<CityFB::GeometrySemantics> semantics) {
fbb_.AddOffset(Geometry::VT_SEMANTICS, semantics);
}
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::String> lod = 0,
CityFB::Boundaries boundaries_type = CityFB::Boundaries_NONE,
flatbuffers::Offset<void> boundaries = 0,
flatbuffers::Offset<CityFB::GeometrySemantics> semantics = 0) {
GeometryBuilder builder_(_fbb);
builder_.add_semantics(semantics);
builder_.add_boundaries(boundaries);
builder_.add_lod(lod);
builder_.add_boundaries_type(boundaries_type);
return builder_.Finish();
}
inline flatbuffers::Offset<Geometry> CreateGeometryDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const char *lod = nullptr,
CityFB::Boundaries boundaries_type = CityFB::Boundaries_NONE,
flatbuffers::Offset<void> boundaries = 0,
flatbuffers::Offset<CityFB::GeometrySemantics> semantics = 0) {
auto lod__ = lod ? _fbb.CreateString(lod) : 0;
return CityFB::CreateGeometry(
_fbb,
lod__,
boundaries_type,
boundaries,
semantics);
}
struct MultiSurface FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MultiSurfaceBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_SURFACES = 4
};
const flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>> *surfaces() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>> *>(VT_SURFACES);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_SURFACES) &&
verifier.VerifyVector(surfaces()) &&
verifier.VerifyVectorOfTables(surfaces()) &&
verifier.EndTable();
}
};
struct MultiSurfaceBuilder {
typedef MultiSurface Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_surfaces(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>>> surfaces) {
fbb_.AddOffset(MultiSurface::VT_SURFACES, surfaces);
}
explicit MultiSurfaceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<MultiSurface> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<MultiSurface>(end);
return o;
}
};
inline flatbuffers::Offset<MultiSurface> CreateMultiSurface(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>>> surfaces = 0) {
MultiSurfaceBuilder builder_(_fbb);
builder_.add_surfaces(surfaces);
return builder_.Finish();
}
inline flatbuffers::Offset<MultiSurface> CreateMultiSurfaceDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<CityFB::Surface>> *surfaces = nullptr) {
auto surfaces__ = surfaces ? _fbb.CreateVector<flatbuffers::Offset<CityFB::Surface>>(*surfaces) : 0;
return CityFB::CreateMultiSurface(
_fbb,
surfaces__);
}
struct Solid FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef SolidBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_SHELLS = 4
};
const flatbuffers::Vector<flatbuffers::Offset<CityFB::Shell>> *shells() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::Shell>> *>(VT_SHELLS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_SHELLS) &&
verifier.VerifyVector(shells()) &&
verifier.VerifyVectorOfTables(shells()) &&
verifier.EndTable();
}
};
struct SolidBuilder {
typedef Solid Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_shells(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Shell>>> shells) {
fbb_.AddOffset(Solid::VT_SHELLS, shells);
}
explicit SolidBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Solid> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Solid>(end);
return o;
}
};
inline flatbuffers::Offset<Solid> CreateSolid(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Shell>>> shells = 0) {
SolidBuilder builder_(_fbb);
builder_.add_shells(shells);
return builder_.Finish();
}
inline flatbuffers::Offset<Solid> CreateSolidDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<CityFB::Shell>> *shells = nullptr) {
auto shells__ = shells ? _fbb.CreateVector<flatbuffers::Offset<CityFB::Shell>>(*shells) : 0;
return CityFB::CreateSolid(
_fbb,
shells__);
}
struct Shell FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef ShellBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_SURFACES = 4
};
const flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>> *surfaces() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>> *>(VT_SURFACES);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_SURFACES) &&
verifier.VerifyVector(surfaces()) &&
verifier.VerifyVectorOfTables(surfaces()) &&
verifier.EndTable();
}
};
struct ShellBuilder {
typedef Shell Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_surfaces(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>>> surfaces) {
fbb_.AddOffset(Shell::VT_SURFACES, surfaces);
}
explicit ShellBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Shell> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Shell>(end);
return o;
}
};
inline flatbuffers::Offset<Shell> CreateShell(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Surface>>> surfaces = 0) {
ShellBuilder builder_(_fbb);
builder_.add_surfaces(surfaces);
return builder_.Finish();
}
inline flatbuffers::Offset<Shell> CreateShellDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<CityFB::Surface>> *surfaces = nullptr) {
auto surfaces__ = surfaces ? _fbb.CreateVector<flatbuffers::Offset<CityFB::Surface>>(*surfaces) : 0;
return CityFB::CreateShell(
_fbb,
surfaces__);
}
struct Surface FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef SurfaceBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_RINGS = 4
};
const flatbuffers::Vector<flatbuffers::Offset<CityFB::Ring>> *rings() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::Ring>> *>(VT_RINGS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_RINGS) &&
verifier.VerifyVector(rings()) &&
verifier.VerifyVectorOfTables(rings()) &&
verifier.EndTable();
}
};
struct SurfaceBuilder {
typedef Surface Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_rings(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Ring>>> rings) {
fbb_.AddOffset(Surface::VT_RINGS, rings);
}
explicit SurfaceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Surface> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Surface>(end);
return o;
}
};
inline flatbuffers::Offset<Surface> CreateSurface(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::Ring>>> rings = 0) {
SurfaceBuilder builder_(_fbb);
builder_.add_rings(rings);
return builder_.Finish();
}
inline flatbuffers::Offset<Surface> CreateSurfaceDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<CityFB::Ring>> *rings = nullptr) {
auto rings__ = rings ? _fbb.CreateVector<flatbuffers::Offset<CityFB::Ring>>(*rings) : 0;
return CityFB::CreateSurface(
_fbb,
rings__);
}
struct Ring FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef RingBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_INDICES = 4
};
const flatbuffers::Vector<uint32_t> *indices() const {
return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_INDICES);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_INDICES) &&
verifier.VerifyVector(indices()) &&
verifier.EndTable();
}
};
struct RingBuilder {
typedef Ring Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_indices(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> indices) {
fbb_.AddOffset(Ring::VT_INDICES, indices);
}
explicit RingBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Ring> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Ring>(end);
return o;
}
};
inline flatbuffers::Offset<Ring> CreateRing(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<uint32_t>> indices = 0) {
RingBuilder builder_(_fbb);
builder_.add_indices(indices);
return builder_.Finish();
}
inline flatbuffers::Offset<Ring> CreateRingDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<uint32_t> *indices = nullptr) {
auto indices__ = indices ? _fbb.CreateVector<uint32_t>(*indices) : 0;
return CityFB::CreateRing(
_fbb,
indices__);
}
struct GeometrySemantics FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef GeometrySemanticsBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_SURFACES = 4,
VT_VALUES = 6
};
const flatbuffers::Vector<flatbuffers::Offset<CityFB::SemanticSurface>> *surfaces() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<CityFB::SemanticSurface>> *>(VT_SURFACES);
}
const flatbuffers::Vector<uint32_t> *values() const {
return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_VALUES);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_SURFACES) &&
verifier.VerifyVector(surfaces()) &&
verifier.VerifyVectorOfTables(surfaces()) &&
VerifyOffset(verifier, VT_VALUES) &&
verifier.VerifyVector(values()) &&
verifier.EndTable();
}
};
struct GeometrySemanticsBuilder {
typedef GeometrySemantics Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_surfaces(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::SemanticSurface>>> surfaces) {
fbb_.AddOffset(GeometrySemantics::VT_SURFACES, surfaces);
}
void add_values(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> values) {
fbb_.AddOffset(GeometrySemantics::VT_VALUES, values);
}
explicit GeometrySemanticsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<GeometrySemantics> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<GeometrySemantics>(end);
return o;
}
};
inline flatbuffers::Offset<GeometrySemantics> CreateGeometrySemantics(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<CityFB::SemanticSurface>>> surfaces = 0,
flatbuffers::Offset<flatbuffers::Vector<uint32_t>> values = 0) {
GeometrySemanticsBuilder builder_(_fbb);
builder_.add_values(values);
builder_.add_surfaces(surfaces);
return builder_.Finish();
}
inline flatbuffers::Offset<GeometrySemantics> CreateGeometrySemanticsDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<CityFB::SemanticSurface>> *surfaces = nullptr,
const std::vector<uint32_t> *values = nullptr) {
auto surfaces__ = surfaces ? _fbb.CreateVector<flatbuffers::Offset<CityFB::SemanticSurface>>(*surfaces) : 0;
auto values__ = values ? _fbb.CreateVector<uint32_t>(*values) : 0;
return CityFB::CreateGeometrySemantics(
_fbb,
surfaces__,
values__);
}
struct SemanticSurface FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef SemanticSurfaceBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_TYPE = 4,
VT_ON_FOOTPRINT_EDGE = 6
};
const flatbuffers::String *type() const {
return GetPointer<const flatbuffers::String *>(VT_TYPE);
}
bool on_footprint_edge() const {
return GetField<uint8_t>(VT_ON_FOOTPRINT_EDGE, 0) != 0;
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_TYPE) &&
verifier.VerifyString(type()) &&
VerifyField<uint8_t>(verifier, VT_ON_FOOTPRINT_EDGE, 1) &&
verifier.EndTable();
}
};
struct SemanticSurfaceBuilder {
typedef SemanticSurface Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_type(flatbuffers::Offset<flatbuffers::String> type) {
fbb_.AddOffset(SemanticSurface::VT_TYPE, type);
}
void add_on_footprint_edge(bool on_footprint_edge) {
fbb_.AddElement<uint8_t>(SemanticSurface::VT_ON_FOOTPRINT_EDGE, static_cast<uint8_t>(on_footprint_edge), 0);
}
explicit SemanticSurfaceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<SemanticSurface> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<SemanticSurface>(end);
return o;
}
};
inline flatbuffers::Offset<SemanticSurface> CreateSemanticSurface(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> type = 0,
bool on_footprint_edge = false) {
SemanticSurfaceBuilder builder_(_fbb);
builder_.add_type(type);
builder_.add_on_footprint_edge(on_footprint_edge);
return builder_.Finish();
}
inline flatbuffers::Offset<SemanticSurface> CreateSemanticSurfaceDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const char *type = nullptr,
bool on_footprint_edge = false) {
auto type__ = type ? _fbb.CreateString(type) : 0;
return CityFB::CreateSemanticSurface(
_fbb,
type__,
on_footprint_edge);
}
inline bool VerifyBoundaries(flatbuffers::Verifier &verifier, const void *obj, Boundaries type) {
switch (type) {
case Boundaries_NONE: {
return true;
}
case Boundaries_Solid: {
auto ptr = reinterpret_cast<const CityFB::Solid *>(obj);
return verifier.VerifyTable(ptr);
}
case Boundaries_MultiSurface: {
auto ptr = reinterpret_cast<const CityFB::MultiSurface *>(obj);
return verifier.VerifyTable(ptr);
}
default: return true;
}
}
inline bool VerifyBoundariesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
if (!values || !types) return !values && !types;
if (values->size() != types->size()) return false;
for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
if (!VerifyBoundaries(
verifier, values->Get(i), types->GetEnum<Boundaries>(i))) {
return false;
}
}
return true;
}
inline const CityFB::CityJSONFeature *GetCityJSONFeature(const void *buf) {
return flatbuffers::GetRoot<CityFB::CityJSONFeature>(buf);
}
inline const CityFB::CityJSONFeature *GetSizePrefixedCityJSONFeature(const void *buf) {
return flatbuffers::GetSizePrefixedRoot<CityFB::CityJSONFeature>(buf);
}
inline const char *CityJSONFeatureIdentifier() {
return "CFBF";
}
inline bool CityJSONFeatureBufferHasIdentifier(const void *buf) {
return flatbuffers::BufferHasIdentifier(
buf, CityJSONFeatureIdentifier());
}
inline bool SizePrefixedCityJSONFeatureBufferHasIdentifier(const void *buf) {
return flatbuffers::BufferHasIdentifier(
buf, CityJSONFeatureIdentifier(), true);
}
inline bool VerifyCityJSONFeatureBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<CityFB::CityJSONFeature>(CityJSONFeatureIdentifier());
}
inline bool VerifySizePrefixedCityJSONFeatureBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<CityFB::CityJSONFeature>(CityJSONFeatureIdentifier());
}
inline const char *CityJSONFeatureExtension() {
return "city.fb";
}
inline void FinishCityJSONFeatureBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<CityFB::CityJSONFeature> root) {
fbb.Finish(root, CityJSONFeatureIdentifier());
}
inline void FinishSizePrefixedCityJSONFeatureBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<CityFB::CityJSONFeature> root) {
fbb.FinishSizePrefixed(root, CityJSONFeatureIdentifier());
}
} // namespace CityFB
#endif // FLATBUFFERS_GENERATED_CITYJSONFEATURE_CITYFB_H_