1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_
5 #define FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_
6
7 #include "flatbuffers/flatbuffers.h"
8
9 namespace reflection {
10
11 struct Type;
12 struct TypeBuilder;
13
14 struct KeyValue;
15 struct KeyValueBuilder;
16
17 struct EnumVal;
18 struct EnumValBuilder;
19
20 struct Enum;
21 struct EnumBuilder;
22
23 struct Field;
24 struct FieldBuilder;
25
26 struct Object;
27 struct ObjectBuilder;
28
29 struct RPCCall;
30 struct RPCCallBuilder;
31
32 struct Service;
33 struct ServiceBuilder;
34
35 struct Schema;
36 struct SchemaBuilder;
37
38 enum BaseType {
39 None = 0,
40 UType = 1,
41 Bool = 2,
42 Byte = 3,
43 UByte = 4,
44 Short = 5,
45 UShort = 6,
46 Int = 7,
47 UInt = 8,
48 Long = 9,
49 ULong = 10,
50 Float = 11,
51 Double = 12,
52 String = 13,
53 Vector = 14,
54 Obj = 15,
55 Union = 16,
56 Array = 17,
57 MaxBaseType = 18
58 };
59
EnumValuesBaseType()60 inline const BaseType (&EnumValuesBaseType())[19] {
61 static const BaseType values[] = {
62 None,
63 UType,
64 Bool,
65 Byte,
66 UByte,
67 Short,
68 UShort,
69 Int,
70 UInt,
71 Long,
72 ULong,
73 Float,
74 Double,
75 String,
76 Vector,
77 Obj,
78 Union,
79 Array,
80 MaxBaseType
81 };
82 return values;
83 }
84
EnumNamesBaseType()85 inline const char * const *EnumNamesBaseType() {
86 static const char * const names[20] = {
87 "None",
88 "UType",
89 "Bool",
90 "Byte",
91 "UByte",
92 "Short",
93 "UShort",
94 "Int",
95 "UInt",
96 "Long",
97 "ULong",
98 "Float",
99 "Double",
100 "String",
101 "Vector",
102 "Obj",
103 "Union",
104 "Array",
105 "MaxBaseType",
106 nullptr
107 };
108 return names;
109 }
110
EnumNameBaseType(BaseType e)111 inline const char *EnumNameBaseType(BaseType e) {
112 if (flatbuffers::IsOutRange(e, None, MaxBaseType)) return "";
113 const size_t index = static_cast<size_t>(e);
114 return EnumNamesBaseType()[index];
115 }
116
117 enum AdvancedFeatures {
118 AdvancedArrayFeatures = 1ULL,
119 AdvancedUnionFeatures = 2ULL,
120 OptionalScalars = 4ULL,
121 DefaultVectorsAndStrings = 8ULL
122 };
123
EnumValuesAdvancedFeatures()124 inline const AdvancedFeatures (&EnumValuesAdvancedFeatures())[4] {
125 static const AdvancedFeatures values[] = {
126 AdvancedArrayFeatures,
127 AdvancedUnionFeatures,
128 OptionalScalars,
129 DefaultVectorsAndStrings
130 };
131 return values;
132 }
133
EnumNamesAdvancedFeatures()134 inline const char * const *EnumNamesAdvancedFeatures() {
135 static const char * const names[9] = {
136 "AdvancedArrayFeatures",
137 "AdvancedUnionFeatures",
138 "",
139 "OptionalScalars",
140 "",
141 "",
142 "",
143 "DefaultVectorsAndStrings",
144 nullptr
145 };
146 return names;
147 }
148
EnumNameAdvancedFeatures(AdvancedFeatures e)149 inline const char *EnumNameAdvancedFeatures(AdvancedFeatures e) {
150 if (flatbuffers::IsOutRange(e, AdvancedArrayFeatures, DefaultVectorsAndStrings)) return "";
151 const size_t index = static_cast<size_t>(e) - static_cast<size_t>(AdvancedArrayFeatures);
152 return EnumNamesAdvancedFeatures()[index];
153 }
154
155 struct Type FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
156 typedef TypeBuilder Builder;
157 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
158 VT_BASE_TYPE = 4,
159 VT_ELEMENT = 6,
160 VT_INDEX = 8,
161 VT_FIXED_LENGTH = 10
162 };
base_typeFLATBUFFERS_FINAL_CLASS163 reflection::BaseType base_type() const {
164 return static_cast<reflection::BaseType>(GetField<int8_t>(VT_BASE_TYPE, 0));
165 }
elementFLATBUFFERS_FINAL_CLASS166 reflection::BaseType element() const {
167 return static_cast<reflection::BaseType>(GetField<int8_t>(VT_ELEMENT, 0));
168 }
indexFLATBUFFERS_FINAL_CLASS169 int32_t index() const {
170 return GetField<int32_t>(VT_INDEX, -1);
171 }
fixed_lengthFLATBUFFERS_FINAL_CLASS172 uint16_t fixed_length() const {
173 return GetField<uint16_t>(VT_FIXED_LENGTH, 0);
174 }
VerifyFLATBUFFERS_FINAL_CLASS175 bool Verify(flatbuffers::Verifier &verifier) const {
176 return VerifyTableStart(verifier) &&
177 VerifyField<int8_t>(verifier, VT_BASE_TYPE) &&
178 VerifyField<int8_t>(verifier, VT_ELEMENT) &&
179 VerifyField<int32_t>(verifier, VT_INDEX) &&
180 VerifyField<uint16_t>(verifier, VT_FIXED_LENGTH) &&
181 verifier.EndTable();
182 }
183 };
184
185 struct TypeBuilder {
186 typedef Type Table;
187 flatbuffers::FlatBufferBuilder &fbb_;
188 flatbuffers::uoffset_t start_;
add_base_typeTypeBuilder189 void add_base_type(reflection::BaseType base_type) {
190 fbb_.AddElement<int8_t>(Type::VT_BASE_TYPE, static_cast<int8_t>(base_type), 0);
191 }
add_elementTypeBuilder192 void add_element(reflection::BaseType element) {
193 fbb_.AddElement<int8_t>(Type::VT_ELEMENT, static_cast<int8_t>(element), 0);
194 }
add_indexTypeBuilder195 void add_index(int32_t index) {
196 fbb_.AddElement<int32_t>(Type::VT_INDEX, index, -1);
197 }
add_fixed_lengthTypeBuilder198 void add_fixed_length(uint16_t fixed_length) {
199 fbb_.AddElement<uint16_t>(Type::VT_FIXED_LENGTH, fixed_length, 0);
200 }
TypeBuilderTypeBuilder201 explicit TypeBuilder(flatbuffers::FlatBufferBuilder &_fbb)
202 : fbb_(_fbb) {
203 start_ = fbb_.StartTable();
204 }
FinishTypeBuilder205 flatbuffers::Offset<Type> Finish() {
206 const auto end = fbb_.EndTable(start_);
207 auto o = flatbuffers::Offset<Type>(end);
208 return o;
209 }
210 };
211
212 inline flatbuffers::Offset<Type> CreateType(
213 flatbuffers::FlatBufferBuilder &_fbb,
214 reflection::BaseType base_type = reflection::None,
215 reflection::BaseType element = reflection::None,
216 int32_t index = -1,
217 uint16_t fixed_length = 0) {
218 TypeBuilder builder_(_fbb);
219 builder_.add_index(index);
220 builder_.add_fixed_length(fixed_length);
221 builder_.add_element(element);
222 builder_.add_base_type(base_type);
223 return builder_.Finish();
224 }
225
226 struct KeyValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
227 typedef KeyValueBuilder Builder;
228 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
229 VT_KEY = 4,
230 VT_VALUE = 6
231 };
keyFLATBUFFERS_FINAL_CLASS232 const flatbuffers::String *key() const {
233 return GetPointer<const flatbuffers::String *>(VT_KEY);
234 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS235 bool KeyCompareLessThan(const KeyValue *o) const {
236 return *key() < *o->key();
237 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS238 int KeyCompareWithValue(const char *val) const {
239 return strcmp(key()->c_str(), val);
240 }
valueFLATBUFFERS_FINAL_CLASS241 const flatbuffers::String *value() const {
242 return GetPointer<const flatbuffers::String *>(VT_VALUE);
243 }
VerifyFLATBUFFERS_FINAL_CLASS244 bool Verify(flatbuffers::Verifier &verifier) const {
245 return VerifyTableStart(verifier) &&
246 VerifyOffsetRequired(verifier, VT_KEY) &&
247 verifier.VerifyString(key()) &&
248 VerifyOffset(verifier, VT_VALUE) &&
249 verifier.VerifyString(value()) &&
250 verifier.EndTable();
251 }
252 };
253
254 struct KeyValueBuilder {
255 typedef KeyValue Table;
256 flatbuffers::FlatBufferBuilder &fbb_;
257 flatbuffers::uoffset_t start_;
add_keyKeyValueBuilder258 void add_key(flatbuffers::Offset<flatbuffers::String> key) {
259 fbb_.AddOffset(KeyValue::VT_KEY, key);
260 }
add_valueKeyValueBuilder261 void add_value(flatbuffers::Offset<flatbuffers::String> value) {
262 fbb_.AddOffset(KeyValue::VT_VALUE, value);
263 }
KeyValueBuilderKeyValueBuilder264 explicit KeyValueBuilder(flatbuffers::FlatBufferBuilder &_fbb)
265 : fbb_(_fbb) {
266 start_ = fbb_.StartTable();
267 }
FinishKeyValueBuilder268 flatbuffers::Offset<KeyValue> Finish() {
269 const auto end = fbb_.EndTable(start_);
270 auto o = flatbuffers::Offset<KeyValue>(end);
271 fbb_.Required(o, KeyValue::VT_KEY);
272 return o;
273 }
274 };
275
276 inline flatbuffers::Offset<KeyValue> CreateKeyValue(
277 flatbuffers::FlatBufferBuilder &_fbb,
278 flatbuffers::Offset<flatbuffers::String> key = 0,
279 flatbuffers::Offset<flatbuffers::String> value = 0) {
280 KeyValueBuilder builder_(_fbb);
281 builder_.add_value(value);
282 builder_.add_key(key);
283 return builder_.Finish();
284 }
285
286 inline flatbuffers::Offset<KeyValue> CreateKeyValueDirect(
287 flatbuffers::FlatBufferBuilder &_fbb,
288 const char *key = nullptr,
289 const char *value = nullptr) {
290 auto key__ = key ? _fbb.CreateString(key) : 0;
291 auto value__ = value ? _fbb.CreateString(value) : 0;
292 return reflection::CreateKeyValue(
293 _fbb,
294 key__,
295 value__);
296 }
297
298 struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
299 typedef EnumValBuilder Builder;
300 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
301 VT_NAME = 4,
302 VT_VALUE = 6,
303 VT_OBJECT = 8,
304 VT_UNION_TYPE = 10,
305 VT_DOCUMENTATION = 12
306 };
nameFLATBUFFERS_FINAL_CLASS307 const flatbuffers::String *name() const {
308 return GetPointer<const flatbuffers::String *>(VT_NAME);
309 }
valueFLATBUFFERS_FINAL_CLASS310 int64_t value() const {
311 return GetField<int64_t>(VT_VALUE, 0);
312 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS313 bool KeyCompareLessThan(const EnumVal *o) const {
314 return value() < o->value();
315 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS316 int KeyCompareWithValue(int64_t val) const {
317 return static_cast<int>(value() > val) - static_cast<int>(value() < val);
318 }
objectFLATBUFFERS_FINAL_CLASS319 const reflection::Object *object() const {
320 return GetPointer<const reflection::Object *>(VT_OBJECT);
321 }
union_typeFLATBUFFERS_FINAL_CLASS322 const reflection::Type *union_type() const {
323 return GetPointer<const reflection::Type *>(VT_UNION_TYPE);
324 }
documentationFLATBUFFERS_FINAL_CLASS325 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
326 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
327 }
VerifyFLATBUFFERS_FINAL_CLASS328 bool Verify(flatbuffers::Verifier &verifier) const {
329 return VerifyTableStart(verifier) &&
330 VerifyOffsetRequired(verifier, VT_NAME) &&
331 verifier.VerifyString(name()) &&
332 VerifyField<int64_t>(verifier, VT_VALUE) &&
333 VerifyOffset(verifier, VT_OBJECT) &&
334 verifier.VerifyTable(object()) &&
335 VerifyOffset(verifier, VT_UNION_TYPE) &&
336 verifier.VerifyTable(union_type()) &&
337 VerifyOffset(verifier, VT_DOCUMENTATION) &&
338 verifier.VerifyVector(documentation()) &&
339 verifier.VerifyVectorOfStrings(documentation()) &&
340 verifier.EndTable();
341 }
342 };
343
344 struct EnumValBuilder {
345 typedef EnumVal Table;
346 flatbuffers::FlatBufferBuilder &fbb_;
347 flatbuffers::uoffset_t start_;
add_nameEnumValBuilder348 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
349 fbb_.AddOffset(EnumVal::VT_NAME, name);
350 }
add_valueEnumValBuilder351 void add_value(int64_t value) {
352 fbb_.AddElement<int64_t>(EnumVal::VT_VALUE, value, 0);
353 }
add_objectEnumValBuilder354 void add_object(flatbuffers::Offset<reflection::Object> object) {
355 fbb_.AddOffset(EnumVal::VT_OBJECT, object);
356 }
add_union_typeEnumValBuilder357 void add_union_type(flatbuffers::Offset<reflection::Type> union_type) {
358 fbb_.AddOffset(EnumVal::VT_UNION_TYPE, union_type);
359 }
add_documentationEnumValBuilder360 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
361 fbb_.AddOffset(EnumVal::VT_DOCUMENTATION, documentation);
362 }
EnumValBuilderEnumValBuilder363 explicit EnumValBuilder(flatbuffers::FlatBufferBuilder &_fbb)
364 : fbb_(_fbb) {
365 start_ = fbb_.StartTable();
366 }
FinishEnumValBuilder367 flatbuffers::Offset<EnumVal> Finish() {
368 const auto end = fbb_.EndTable(start_);
369 auto o = flatbuffers::Offset<EnumVal>(end);
370 fbb_.Required(o, EnumVal::VT_NAME);
371 return o;
372 }
373 };
374
375 inline flatbuffers::Offset<EnumVal> CreateEnumVal(
376 flatbuffers::FlatBufferBuilder &_fbb,
377 flatbuffers::Offset<flatbuffers::String> name = 0,
378 int64_t value = 0,
379 flatbuffers::Offset<reflection::Object> object = 0,
380 flatbuffers::Offset<reflection::Type> union_type = 0,
381 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0) {
382 EnumValBuilder builder_(_fbb);
383 builder_.add_value(value);
384 builder_.add_documentation(documentation);
385 builder_.add_union_type(union_type);
386 builder_.add_object(object);
387 builder_.add_name(name);
388 return builder_.Finish();
389 }
390
391 inline flatbuffers::Offset<EnumVal> CreateEnumValDirect(
392 flatbuffers::FlatBufferBuilder &_fbb,
393 const char *name = nullptr,
394 int64_t value = 0,
395 flatbuffers::Offset<reflection::Object> object = 0,
396 flatbuffers::Offset<reflection::Type> union_type = 0,
397 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr) {
398 auto name__ = name ? _fbb.CreateString(name) : 0;
399 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
400 return reflection::CreateEnumVal(
401 _fbb,
402 name__,
403 value,
404 object,
405 union_type,
406 documentation__);
407 }
408
409 struct Enum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
410 typedef EnumBuilder Builder;
411 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
412 VT_NAME = 4,
413 VT_VALUES = 6,
414 VT_IS_UNION = 8,
415 VT_UNDERLYING_TYPE = 10,
416 VT_ATTRIBUTES = 12,
417 VT_DOCUMENTATION = 14
418 };
nameFLATBUFFERS_FINAL_CLASS419 const flatbuffers::String *name() const {
420 return GetPointer<const flatbuffers::String *>(VT_NAME);
421 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS422 bool KeyCompareLessThan(const Enum *o) const {
423 return *name() < *o->name();
424 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS425 int KeyCompareWithValue(const char *val) const {
426 return strcmp(name()->c_str(), val);
427 }
valuesFLATBUFFERS_FINAL_CLASS428 const flatbuffers::Vector<flatbuffers::Offset<reflection::EnumVal>> *values() const {
429 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::EnumVal>> *>(VT_VALUES);
430 }
is_unionFLATBUFFERS_FINAL_CLASS431 bool is_union() const {
432 return GetField<uint8_t>(VT_IS_UNION, 0) != 0;
433 }
underlying_typeFLATBUFFERS_FINAL_CLASS434 const reflection::Type *underlying_type() const {
435 return GetPointer<const reflection::Type *>(VT_UNDERLYING_TYPE);
436 }
attributesFLATBUFFERS_FINAL_CLASS437 const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
438 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
439 }
documentationFLATBUFFERS_FINAL_CLASS440 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
441 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
442 }
VerifyFLATBUFFERS_FINAL_CLASS443 bool Verify(flatbuffers::Verifier &verifier) const {
444 return VerifyTableStart(verifier) &&
445 VerifyOffsetRequired(verifier, VT_NAME) &&
446 verifier.VerifyString(name()) &&
447 VerifyOffsetRequired(verifier, VT_VALUES) &&
448 verifier.VerifyVector(values()) &&
449 verifier.VerifyVectorOfTables(values()) &&
450 VerifyField<uint8_t>(verifier, VT_IS_UNION) &&
451 VerifyOffsetRequired(verifier, VT_UNDERLYING_TYPE) &&
452 verifier.VerifyTable(underlying_type()) &&
453 VerifyOffset(verifier, VT_ATTRIBUTES) &&
454 verifier.VerifyVector(attributes()) &&
455 verifier.VerifyVectorOfTables(attributes()) &&
456 VerifyOffset(verifier, VT_DOCUMENTATION) &&
457 verifier.VerifyVector(documentation()) &&
458 verifier.VerifyVectorOfStrings(documentation()) &&
459 verifier.EndTable();
460 }
461 };
462
463 struct EnumBuilder {
464 typedef Enum Table;
465 flatbuffers::FlatBufferBuilder &fbb_;
466 flatbuffers::uoffset_t start_;
add_nameEnumBuilder467 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
468 fbb_.AddOffset(Enum::VT_NAME, name);
469 }
add_valuesEnumBuilder470 void add_values(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::EnumVal>>> values) {
471 fbb_.AddOffset(Enum::VT_VALUES, values);
472 }
add_is_unionEnumBuilder473 void add_is_union(bool is_union) {
474 fbb_.AddElement<uint8_t>(Enum::VT_IS_UNION, static_cast<uint8_t>(is_union), 0);
475 }
add_underlying_typeEnumBuilder476 void add_underlying_type(flatbuffers::Offset<reflection::Type> underlying_type) {
477 fbb_.AddOffset(Enum::VT_UNDERLYING_TYPE, underlying_type);
478 }
add_attributesEnumBuilder479 void add_attributes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes) {
480 fbb_.AddOffset(Enum::VT_ATTRIBUTES, attributes);
481 }
add_documentationEnumBuilder482 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
483 fbb_.AddOffset(Enum::VT_DOCUMENTATION, documentation);
484 }
EnumBuilderEnumBuilder485 explicit EnumBuilder(flatbuffers::FlatBufferBuilder &_fbb)
486 : fbb_(_fbb) {
487 start_ = fbb_.StartTable();
488 }
FinishEnumBuilder489 flatbuffers::Offset<Enum> Finish() {
490 const auto end = fbb_.EndTable(start_);
491 auto o = flatbuffers::Offset<Enum>(end);
492 fbb_.Required(o, Enum::VT_NAME);
493 fbb_.Required(o, Enum::VT_VALUES);
494 fbb_.Required(o, Enum::VT_UNDERLYING_TYPE);
495 return o;
496 }
497 };
498
499 inline flatbuffers::Offset<Enum> CreateEnum(
500 flatbuffers::FlatBufferBuilder &_fbb,
501 flatbuffers::Offset<flatbuffers::String> name = 0,
502 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::EnumVal>>> values = 0,
503 bool is_union = false,
504 flatbuffers::Offset<reflection::Type> underlying_type = 0,
505 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes = 0,
506 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0) {
507 EnumBuilder builder_(_fbb);
508 builder_.add_documentation(documentation);
509 builder_.add_attributes(attributes);
510 builder_.add_underlying_type(underlying_type);
511 builder_.add_values(values);
512 builder_.add_name(name);
513 builder_.add_is_union(is_union);
514 return builder_.Finish();
515 }
516
517 inline flatbuffers::Offset<Enum> CreateEnumDirect(
518 flatbuffers::FlatBufferBuilder &_fbb,
519 const char *name = nullptr,
520 std::vector<flatbuffers::Offset<reflection::EnumVal>> *values = nullptr,
521 bool is_union = false,
522 flatbuffers::Offset<reflection::Type> underlying_type = 0,
523 std::vector<flatbuffers::Offset<reflection::KeyValue>> *attributes = nullptr,
524 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr) {
525 auto name__ = name ? _fbb.CreateString(name) : 0;
526 auto values__ = values ? _fbb.CreateVectorOfSortedTables<reflection::EnumVal>(values) : 0;
527 auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables<reflection::KeyValue>(attributes) : 0;
528 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
529 return reflection::CreateEnum(
530 _fbb,
531 name__,
532 values__,
533 is_union,
534 underlying_type,
535 attributes__,
536 documentation__);
537 }
538
539 struct Field FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
540 typedef FieldBuilder Builder;
541 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
542 VT_NAME = 4,
543 VT_TYPE = 6,
544 VT_ID = 8,
545 VT_OFFSET = 10,
546 VT_DEFAULT_INTEGER = 12,
547 VT_DEFAULT_REAL = 14,
548 VT_DEPRECATED = 16,
549 VT_REQUIRED = 18,
550 VT_KEY = 20,
551 VT_ATTRIBUTES = 22,
552 VT_DOCUMENTATION = 24,
553 VT_OPTIONAL = 26
554 };
nameFLATBUFFERS_FINAL_CLASS555 const flatbuffers::String *name() const {
556 return GetPointer<const flatbuffers::String *>(VT_NAME);
557 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS558 bool KeyCompareLessThan(const Field *o) const {
559 return *name() < *o->name();
560 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS561 int KeyCompareWithValue(const char *val) const {
562 return strcmp(name()->c_str(), val);
563 }
typeFLATBUFFERS_FINAL_CLASS564 const reflection::Type *type() const {
565 return GetPointer<const reflection::Type *>(VT_TYPE);
566 }
idFLATBUFFERS_FINAL_CLASS567 uint16_t id() const {
568 return GetField<uint16_t>(VT_ID, 0);
569 }
offsetFLATBUFFERS_FINAL_CLASS570 uint16_t offset() const {
571 return GetField<uint16_t>(VT_OFFSET, 0);
572 }
default_integerFLATBUFFERS_FINAL_CLASS573 int64_t default_integer() const {
574 return GetField<int64_t>(VT_DEFAULT_INTEGER, 0);
575 }
default_realFLATBUFFERS_FINAL_CLASS576 double default_real() const {
577 return GetField<double>(VT_DEFAULT_REAL, 0.0);
578 }
deprecatedFLATBUFFERS_FINAL_CLASS579 bool deprecated() const {
580 return GetField<uint8_t>(VT_DEPRECATED, 0) != 0;
581 }
requiredFLATBUFFERS_FINAL_CLASS582 bool required() const {
583 return GetField<uint8_t>(VT_REQUIRED, 0) != 0;
584 }
keyFLATBUFFERS_FINAL_CLASS585 bool key() const {
586 return GetField<uint8_t>(VT_KEY, 0) != 0;
587 }
attributesFLATBUFFERS_FINAL_CLASS588 const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
589 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
590 }
documentationFLATBUFFERS_FINAL_CLASS591 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
592 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
593 }
optionalFLATBUFFERS_FINAL_CLASS594 bool optional() const {
595 return GetField<uint8_t>(VT_OPTIONAL, 0) != 0;
596 }
VerifyFLATBUFFERS_FINAL_CLASS597 bool Verify(flatbuffers::Verifier &verifier) const {
598 return VerifyTableStart(verifier) &&
599 VerifyOffsetRequired(verifier, VT_NAME) &&
600 verifier.VerifyString(name()) &&
601 VerifyOffsetRequired(verifier, VT_TYPE) &&
602 verifier.VerifyTable(type()) &&
603 VerifyField<uint16_t>(verifier, VT_ID) &&
604 VerifyField<uint16_t>(verifier, VT_OFFSET) &&
605 VerifyField<int64_t>(verifier, VT_DEFAULT_INTEGER) &&
606 VerifyField<double>(verifier, VT_DEFAULT_REAL) &&
607 VerifyField<uint8_t>(verifier, VT_DEPRECATED) &&
608 VerifyField<uint8_t>(verifier, VT_REQUIRED) &&
609 VerifyField<uint8_t>(verifier, VT_KEY) &&
610 VerifyOffset(verifier, VT_ATTRIBUTES) &&
611 verifier.VerifyVector(attributes()) &&
612 verifier.VerifyVectorOfTables(attributes()) &&
613 VerifyOffset(verifier, VT_DOCUMENTATION) &&
614 verifier.VerifyVector(documentation()) &&
615 verifier.VerifyVectorOfStrings(documentation()) &&
616 VerifyField<uint8_t>(verifier, VT_OPTIONAL) &&
617 verifier.EndTable();
618 }
619 };
620
621 struct FieldBuilder {
622 typedef Field Table;
623 flatbuffers::FlatBufferBuilder &fbb_;
624 flatbuffers::uoffset_t start_;
add_nameFieldBuilder625 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
626 fbb_.AddOffset(Field::VT_NAME, name);
627 }
add_typeFieldBuilder628 void add_type(flatbuffers::Offset<reflection::Type> type) {
629 fbb_.AddOffset(Field::VT_TYPE, type);
630 }
add_idFieldBuilder631 void add_id(uint16_t id) {
632 fbb_.AddElement<uint16_t>(Field::VT_ID, id, 0);
633 }
add_offsetFieldBuilder634 void add_offset(uint16_t offset) {
635 fbb_.AddElement<uint16_t>(Field::VT_OFFSET, offset, 0);
636 }
add_default_integerFieldBuilder637 void add_default_integer(int64_t default_integer) {
638 fbb_.AddElement<int64_t>(Field::VT_DEFAULT_INTEGER, default_integer, 0);
639 }
add_default_realFieldBuilder640 void add_default_real(double default_real) {
641 fbb_.AddElement<double>(Field::VT_DEFAULT_REAL, default_real, 0.0);
642 }
add_deprecatedFieldBuilder643 void add_deprecated(bool deprecated) {
644 fbb_.AddElement<uint8_t>(Field::VT_DEPRECATED, static_cast<uint8_t>(deprecated), 0);
645 }
add_requiredFieldBuilder646 void add_required(bool required) {
647 fbb_.AddElement<uint8_t>(Field::VT_REQUIRED, static_cast<uint8_t>(required), 0);
648 }
add_keyFieldBuilder649 void add_key(bool key) {
650 fbb_.AddElement<uint8_t>(Field::VT_KEY, static_cast<uint8_t>(key), 0);
651 }
add_attributesFieldBuilder652 void add_attributes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes) {
653 fbb_.AddOffset(Field::VT_ATTRIBUTES, attributes);
654 }
add_documentationFieldBuilder655 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
656 fbb_.AddOffset(Field::VT_DOCUMENTATION, documentation);
657 }
add_optionalFieldBuilder658 void add_optional(bool optional) {
659 fbb_.AddElement<uint8_t>(Field::VT_OPTIONAL, static_cast<uint8_t>(optional), 0);
660 }
FieldBuilderFieldBuilder661 explicit FieldBuilder(flatbuffers::FlatBufferBuilder &_fbb)
662 : fbb_(_fbb) {
663 start_ = fbb_.StartTable();
664 }
FinishFieldBuilder665 flatbuffers::Offset<Field> Finish() {
666 const auto end = fbb_.EndTable(start_);
667 auto o = flatbuffers::Offset<Field>(end);
668 fbb_.Required(o, Field::VT_NAME);
669 fbb_.Required(o, Field::VT_TYPE);
670 return o;
671 }
672 };
673
674 inline flatbuffers::Offset<Field> CreateField(
675 flatbuffers::FlatBufferBuilder &_fbb,
676 flatbuffers::Offset<flatbuffers::String> name = 0,
677 flatbuffers::Offset<reflection::Type> type = 0,
678 uint16_t id = 0,
679 uint16_t offset = 0,
680 int64_t default_integer = 0,
681 double default_real = 0.0,
682 bool deprecated = false,
683 bool required = false,
684 bool key = false,
685 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes = 0,
686 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0,
687 bool optional = false) {
688 FieldBuilder builder_(_fbb);
689 builder_.add_default_real(default_real);
690 builder_.add_default_integer(default_integer);
691 builder_.add_documentation(documentation);
692 builder_.add_attributes(attributes);
693 builder_.add_type(type);
694 builder_.add_name(name);
695 builder_.add_offset(offset);
696 builder_.add_id(id);
697 builder_.add_optional(optional);
698 builder_.add_key(key);
699 builder_.add_required(required);
700 builder_.add_deprecated(deprecated);
701 return builder_.Finish();
702 }
703
704 inline flatbuffers::Offset<Field> CreateFieldDirect(
705 flatbuffers::FlatBufferBuilder &_fbb,
706 const char *name = nullptr,
707 flatbuffers::Offset<reflection::Type> type = 0,
708 uint16_t id = 0,
709 uint16_t offset = 0,
710 int64_t default_integer = 0,
711 double default_real = 0.0,
712 bool deprecated = false,
713 bool required = false,
714 bool key = false,
715 std::vector<flatbuffers::Offset<reflection::KeyValue>> *attributes = nullptr,
716 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr,
717 bool optional = false) {
718 auto name__ = name ? _fbb.CreateString(name) : 0;
719 auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables<reflection::KeyValue>(attributes) : 0;
720 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
721 return reflection::CreateField(
722 _fbb,
723 name__,
724 type,
725 id,
726 offset,
727 default_integer,
728 default_real,
729 deprecated,
730 required,
731 key,
732 attributes__,
733 documentation__,
734 optional);
735 }
736
737 struct Object FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
738 typedef ObjectBuilder Builder;
739 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
740 VT_NAME = 4,
741 VT_FIELDS = 6,
742 VT_IS_STRUCT = 8,
743 VT_MINALIGN = 10,
744 VT_BYTESIZE = 12,
745 VT_ATTRIBUTES = 14,
746 VT_DOCUMENTATION = 16
747 };
nameFLATBUFFERS_FINAL_CLASS748 const flatbuffers::String *name() const {
749 return GetPointer<const flatbuffers::String *>(VT_NAME);
750 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS751 bool KeyCompareLessThan(const Object *o) const {
752 return *name() < *o->name();
753 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS754 int KeyCompareWithValue(const char *val) const {
755 return strcmp(name()->c_str(), val);
756 }
fieldsFLATBUFFERS_FINAL_CLASS757 const flatbuffers::Vector<flatbuffers::Offset<reflection::Field>> *fields() const {
758 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::Field>> *>(VT_FIELDS);
759 }
is_structFLATBUFFERS_FINAL_CLASS760 bool is_struct() const {
761 return GetField<uint8_t>(VT_IS_STRUCT, 0) != 0;
762 }
minalignFLATBUFFERS_FINAL_CLASS763 int32_t minalign() const {
764 return GetField<int32_t>(VT_MINALIGN, 0);
765 }
bytesizeFLATBUFFERS_FINAL_CLASS766 int32_t bytesize() const {
767 return GetField<int32_t>(VT_BYTESIZE, 0);
768 }
attributesFLATBUFFERS_FINAL_CLASS769 const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
770 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
771 }
documentationFLATBUFFERS_FINAL_CLASS772 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
773 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
774 }
VerifyFLATBUFFERS_FINAL_CLASS775 bool Verify(flatbuffers::Verifier &verifier) const {
776 return VerifyTableStart(verifier) &&
777 VerifyOffsetRequired(verifier, VT_NAME) &&
778 verifier.VerifyString(name()) &&
779 VerifyOffsetRequired(verifier, VT_FIELDS) &&
780 verifier.VerifyVector(fields()) &&
781 verifier.VerifyVectorOfTables(fields()) &&
782 VerifyField<uint8_t>(verifier, VT_IS_STRUCT) &&
783 VerifyField<int32_t>(verifier, VT_MINALIGN) &&
784 VerifyField<int32_t>(verifier, VT_BYTESIZE) &&
785 VerifyOffset(verifier, VT_ATTRIBUTES) &&
786 verifier.VerifyVector(attributes()) &&
787 verifier.VerifyVectorOfTables(attributes()) &&
788 VerifyOffset(verifier, VT_DOCUMENTATION) &&
789 verifier.VerifyVector(documentation()) &&
790 verifier.VerifyVectorOfStrings(documentation()) &&
791 verifier.EndTable();
792 }
793 };
794
795 struct ObjectBuilder {
796 typedef Object Table;
797 flatbuffers::FlatBufferBuilder &fbb_;
798 flatbuffers::uoffset_t start_;
add_nameObjectBuilder799 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
800 fbb_.AddOffset(Object::VT_NAME, name);
801 }
add_fieldsObjectBuilder802 void add_fields(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Field>>> fields) {
803 fbb_.AddOffset(Object::VT_FIELDS, fields);
804 }
add_is_structObjectBuilder805 void add_is_struct(bool is_struct) {
806 fbb_.AddElement<uint8_t>(Object::VT_IS_STRUCT, static_cast<uint8_t>(is_struct), 0);
807 }
add_minalignObjectBuilder808 void add_minalign(int32_t minalign) {
809 fbb_.AddElement<int32_t>(Object::VT_MINALIGN, minalign, 0);
810 }
add_bytesizeObjectBuilder811 void add_bytesize(int32_t bytesize) {
812 fbb_.AddElement<int32_t>(Object::VT_BYTESIZE, bytesize, 0);
813 }
add_attributesObjectBuilder814 void add_attributes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes) {
815 fbb_.AddOffset(Object::VT_ATTRIBUTES, attributes);
816 }
add_documentationObjectBuilder817 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
818 fbb_.AddOffset(Object::VT_DOCUMENTATION, documentation);
819 }
ObjectBuilderObjectBuilder820 explicit ObjectBuilder(flatbuffers::FlatBufferBuilder &_fbb)
821 : fbb_(_fbb) {
822 start_ = fbb_.StartTable();
823 }
FinishObjectBuilder824 flatbuffers::Offset<Object> Finish() {
825 const auto end = fbb_.EndTable(start_);
826 auto o = flatbuffers::Offset<Object>(end);
827 fbb_.Required(o, Object::VT_NAME);
828 fbb_.Required(o, Object::VT_FIELDS);
829 return o;
830 }
831 };
832
833 inline flatbuffers::Offset<Object> CreateObject(
834 flatbuffers::FlatBufferBuilder &_fbb,
835 flatbuffers::Offset<flatbuffers::String> name = 0,
836 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Field>>> fields = 0,
837 bool is_struct = false,
838 int32_t minalign = 0,
839 int32_t bytesize = 0,
840 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes = 0,
841 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0) {
842 ObjectBuilder builder_(_fbb);
843 builder_.add_documentation(documentation);
844 builder_.add_attributes(attributes);
845 builder_.add_bytesize(bytesize);
846 builder_.add_minalign(minalign);
847 builder_.add_fields(fields);
848 builder_.add_name(name);
849 builder_.add_is_struct(is_struct);
850 return builder_.Finish();
851 }
852
853 inline flatbuffers::Offset<Object> CreateObjectDirect(
854 flatbuffers::FlatBufferBuilder &_fbb,
855 const char *name = nullptr,
856 std::vector<flatbuffers::Offset<reflection::Field>> *fields = nullptr,
857 bool is_struct = false,
858 int32_t minalign = 0,
859 int32_t bytesize = 0,
860 std::vector<flatbuffers::Offset<reflection::KeyValue>> *attributes = nullptr,
861 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr) {
862 auto name__ = name ? _fbb.CreateString(name) : 0;
863 auto fields__ = fields ? _fbb.CreateVectorOfSortedTables<reflection::Field>(fields) : 0;
864 auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables<reflection::KeyValue>(attributes) : 0;
865 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
866 return reflection::CreateObject(
867 _fbb,
868 name__,
869 fields__,
870 is_struct,
871 minalign,
872 bytesize,
873 attributes__,
874 documentation__);
875 }
876
877 struct RPCCall FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
878 typedef RPCCallBuilder Builder;
879 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
880 VT_NAME = 4,
881 VT_REQUEST = 6,
882 VT_RESPONSE = 8,
883 VT_ATTRIBUTES = 10,
884 VT_DOCUMENTATION = 12
885 };
nameFLATBUFFERS_FINAL_CLASS886 const flatbuffers::String *name() const {
887 return GetPointer<const flatbuffers::String *>(VT_NAME);
888 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS889 bool KeyCompareLessThan(const RPCCall *o) const {
890 return *name() < *o->name();
891 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS892 int KeyCompareWithValue(const char *val) const {
893 return strcmp(name()->c_str(), val);
894 }
requestFLATBUFFERS_FINAL_CLASS895 const reflection::Object *request() const {
896 return GetPointer<const reflection::Object *>(VT_REQUEST);
897 }
responseFLATBUFFERS_FINAL_CLASS898 const reflection::Object *response() const {
899 return GetPointer<const reflection::Object *>(VT_RESPONSE);
900 }
attributesFLATBUFFERS_FINAL_CLASS901 const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
902 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
903 }
documentationFLATBUFFERS_FINAL_CLASS904 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
905 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
906 }
VerifyFLATBUFFERS_FINAL_CLASS907 bool Verify(flatbuffers::Verifier &verifier) const {
908 return VerifyTableStart(verifier) &&
909 VerifyOffsetRequired(verifier, VT_NAME) &&
910 verifier.VerifyString(name()) &&
911 VerifyOffsetRequired(verifier, VT_REQUEST) &&
912 verifier.VerifyTable(request()) &&
913 VerifyOffsetRequired(verifier, VT_RESPONSE) &&
914 verifier.VerifyTable(response()) &&
915 VerifyOffset(verifier, VT_ATTRIBUTES) &&
916 verifier.VerifyVector(attributes()) &&
917 verifier.VerifyVectorOfTables(attributes()) &&
918 VerifyOffset(verifier, VT_DOCUMENTATION) &&
919 verifier.VerifyVector(documentation()) &&
920 verifier.VerifyVectorOfStrings(documentation()) &&
921 verifier.EndTable();
922 }
923 };
924
925 struct RPCCallBuilder {
926 typedef RPCCall Table;
927 flatbuffers::FlatBufferBuilder &fbb_;
928 flatbuffers::uoffset_t start_;
add_nameRPCCallBuilder929 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
930 fbb_.AddOffset(RPCCall::VT_NAME, name);
931 }
add_requestRPCCallBuilder932 void add_request(flatbuffers::Offset<reflection::Object> request) {
933 fbb_.AddOffset(RPCCall::VT_REQUEST, request);
934 }
add_responseRPCCallBuilder935 void add_response(flatbuffers::Offset<reflection::Object> response) {
936 fbb_.AddOffset(RPCCall::VT_RESPONSE, response);
937 }
add_attributesRPCCallBuilder938 void add_attributes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes) {
939 fbb_.AddOffset(RPCCall::VT_ATTRIBUTES, attributes);
940 }
add_documentationRPCCallBuilder941 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
942 fbb_.AddOffset(RPCCall::VT_DOCUMENTATION, documentation);
943 }
RPCCallBuilderRPCCallBuilder944 explicit RPCCallBuilder(flatbuffers::FlatBufferBuilder &_fbb)
945 : fbb_(_fbb) {
946 start_ = fbb_.StartTable();
947 }
FinishRPCCallBuilder948 flatbuffers::Offset<RPCCall> Finish() {
949 const auto end = fbb_.EndTable(start_);
950 auto o = flatbuffers::Offset<RPCCall>(end);
951 fbb_.Required(o, RPCCall::VT_NAME);
952 fbb_.Required(o, RPCCall::VT_REQUEST);
953 fbb_.Required(o, RPCCall::VT_RESPONSE);
954 return o;
955 }
956 };
957
958 inline flatbuffers::Offset<RPCCall> CreateRPCCall(
959 flatbuffers::FlatBufferBuilder &_fbb,
960 flatbuffers::Offset<flatbuffers::String> name = 0,
961 flatbuffers::Offset<reflection::Object> request = 0,
962 flatbuffers::Offset<reflection::Object> response = 0,
963 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes = 0,
964 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0) {
965 RPCCallBuilder builder_(_fbb);
966 builder_.add_documentation(documentation);
967 builder_.add_attributes(attributes);
968 builder_.add_response(response);
969 builder_.add_request(request);
970 builder_.add_name(name);
971 return builder_.Finish();
972 }
973
974 inline flatbuffers::Offset<RPCCall> CreateRPCCallDirect(
975 flatbuffers::FlatBufferBuilder &_fbb,
976 const char *name = nullptr,
977 flatbuffers::Offset<reflection::Object> request = 0,
978 flatbuffers::Offset<reflection::Object> response = 0,
979 std::vector<flatbuffers::Offset<reflection::KeyValue>> *attributes = nullptr,
980 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr) {
981 auto name__ = name ? _fbb.CreateString(name) : 0;
982 auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables<reflection::KeyValue>(attributes) : 0;
983 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
984 return reflection::CreateRPCCall(
985 _fbb,
986 name__,
987 request,
988 response,
989 attributes__,
990 documentation__);
991 }
992
993 struct Service FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
994 typedef ServiceBuilder Builder;
995 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
996 VT_NAME = 4,
997 VT_CALLS = 6,
998 VT_ATTRIBUTES = 8,
999 VT_DOCUMENTATION = 10
1000 };
nameFLATBUFFERS_FINAL_CLASS1001 const flatbuffers::String *name() const {
1002 return GetPointer<const flatbuffers::String *>(VT_NAME);
1003 }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS1004 bool KeyCompareLessThan(const Service *o) const {
1005 return *name() < *o->name();
1006 }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS1007 int KeyCompareWithValue(const char *val) const {
1008 return strcmp(name()->c_str(), val);
1009 }
callsFLATBUFFERS_FINAL_CLASS1010 const flatbuffers::Vector<flatbuffers::Offset<reflection::RPCCall>> *calls() const {
1011 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::RPCCall>> *>(VT_CALLS);
1012 }
attributesFLATBUFFERS_FINAL_CLASS1013 const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
1014 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
1015 }
documentationFLATBUFFERS_FINAL_CLASS1016 const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *documentation() const {
1017 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_DOCUMENTATION);
1018 }
VerifyFLATBUFFERS_FINAL_CLASS1019 bool Verify(flatbuffers::Verifier &verifier) const {
1020 return VerifyTableStart(verifier) &&
1021 VerifyOffsetRequired(verifier, VT_NAME) &&
1022 verifier.VerifyString(name()) &&
1023 VerifyOffset(verifier, VT_CALLS) &&
1024 verifier.VerifyVector(calls()) &&
1025 verifier.VerifyVectorOfTables(calls()) &&
1026 VerifyOffset(verifier, VT_ATTRIBUTES) &&
1027 verifier.VerifyVector(attributes()) &&
1028 verifier.VerifyVectorOfTables(attributes()) &&
1029 VerifyOffset(verifier, VT_DOCUMENTATION) &&
1030 verifier.VerifyVector(documentation()) &&
1031 verifier.VerifyVectorOfStrings(documentation()) &&
1032 verifier.EndTable();
1033 }
1034 };
1035
1036 struct ServiceBuilder {
1037 typedef Service Table;
1038 flatbuffers::FlatBufferBuilder &fbb_;
1039 flatbuffers::uoffset_t start_;
add_nameServiceBuilder1040 void add_name(flatbuffers::Offset<flatbuffers::String> name) {
1041 fbb_.AddOffset(Service::VT_NAME, name);
1042 }
add_callsServiceBuilder1043 void add_calls(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::RPCCall>>> calls) {
1044 fbb_.AddOffset(Service::VT_CALLS, calls);
1045 }
add_attributesServiceBuilder1046 void add_attributes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes) {
1047 fbb_.AddOffset(Service::VT_ATTRIBUTES, attributes);
1048 }
add_documentationServiceBuilder1049 void add_documentation(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation) {
1050 fbb_.AddOffset(Service::VT_DOCUMENTATION, documentation);
1051 }
ServiceBuilderServiceBuilder1052 explicit ServiceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1053 : fbb_(_fbb) {
1054 start_ = fbb_.StartTable();
1055 }
FinishServiceBuilder1056 flatbuffers::Offset<Service> Finish() {
1057 const auto end = fbb_.EndTable(start_);
1058 auto o = flatbuffers::Offset<Service>(end);
1059 fbb_.Required(o, Service::VT_NAME);
1060 return o;
1061 }
1062 };
1063
1064 inline flatbuffers::Offset<Service> CreateService(
1065 flatbuffers::FlatBufferBuilder &_fbb,
1066 flatbuffers::Offset<flatbuffers::String> name = 0,
1067 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::RPCCall>>> calls = 0,
1068 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>> attributes = 0,
1069 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> documentation = 0) {
1070 ServiceBuilder builder_(_fbb);
1071 builder_.add_documentation(documentation);
1072 builder_.add_attributes(attributes);
1073 builder_.add_calls(calls);
1074 builder_.add_name(name);
1075 return builder_.Finish();
1076 }
1077
1078 inline flatbuffers::Offset<Service> CreateServiceDirect(
1079 flatbuffers::FlatBufferBuilder &_fbb,
1080 const char *name = nullptr,
1081 std::vector<flatbuffers::Offset<reflection::RPCCall>> *calls = nullptr,
1082 std::vector<flatbuffers::Offset<reflection::KeyValue>> *attributes = nullptr,
1083 const std::vector<flatbuffers::Offset<flatbuffers::String>> *documentation = nullptr) {
1084 auto name__ = name ? _fbb.CreateString(name) : 0;
1085 auto calls__ = calls ? _fbb.CreateVectorOfSortedTables<reflection::RPCCall>(calls) : 0;
1086 auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables<reflection::KeyValue>(attributes) : 0;
1087 auto documentation__ = documentation ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*documentation) : 0;
1088 return reflection::CreateService(
1089 _fbb,
1090 name__,
1091 calls__,
1092 attributes__,
1093 documentation__);
1094 }
1095
1096 struct Schema FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1097 typedef SchemaBuilder Builder;
1098 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1099 VT_OBJECTS = 4,
1100 VT_ENUMS = 6,
1101 VT_FILE_IDENT = 8,
1102 VT_FILE_EXT = 10,
1103 VT_ROOT_TABLE = 12,
1104 VT_SERVICES = 14,
1105 VT_ADVANCED_FEATURES = 16
1106 };
objectsFLATBUFFERS_FINAL_CLASS1107 const flatbuffers::Vector<flatbuffers::Offset<reflection::Object>> *objects() const {
1108 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::Object>> *>(VT_OBJECTS);
1109 }
enumsFLATBUFFERS_FINAL_CLASS1110 const flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>> *enums() const {
1111 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>> *>(VT_ENUMS);
1112 }
file_identFLATBUFFERS_FINAL_CLASS1113 const flatbuffers::String *file_ident() const {
1114 return GetPointer<const flatbuffers::String *>(VT_FILE_IDENT);
1115 }
file_extFLATBUFFERS_FINAL_CLASS1116 const flatbuffers::String *file_ext() const {
1117 return GetPointer<const flatbuffers::String *>(VT_FILE_EXT);
1118 }
root_tableFLATBUFFERS_FINAL_CLASS1119 const reflection::Object *root_table() const {
1120 return GetPointer<const reflection::Object *>(VT_ROOT_TABLE);
1121 }
servicesFLATBUFFERS_FINAL_CLASS1122 const flatbuffers::Vector<flatbuffers::Offset<reflection::Service>> *services() const {
1123 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<reflection::Service>> *>(VT_SERVICES);
1124 }
advanced_featuresFLATBUFFERS_FINAL_CLASS1125 reflection::AdvancedFeatures advanced_features() const {
1126 return static_cast<reflection::AdvancedFeatures>(GetField<uint64_t>(VT_ADVANCED_FEATURES, 0));
1127 }
VerifyFLATBUFFERS_FINAL_CLASS1128 bool Verify(flatbuffers::Verifier &verifier) const {
1129 return VerifyTableStart(verifier) &&
1130 VerifyOffsetRequired(verifier, VT_OBJECTS) &&
1131 verifier.VerifyVector(objects()) &&
1132 verifier.VerifyVectorOfTables(objects()) &&
1133 VerifyOffsetRequired(verifier, VT_ENUMS) &&
1134 verifier.VerifyVector(enums()) &&
1135 verifier.VerifyVectorOfTables(enums()) &&
1136 VerifyOffset(verifier, VT_FILE_IDENT) &&
1137 verifier.VerifyString(file_ident()) &&
1138 VerifyOffset(verifier, VT_FILE_EXT) &&
1139 verifier.VerifyString(file_ext()) &&
1140 VerifyOffset(verifier, VT_ROOT_TABLE) &&
1141 verifier.VerifyTable(root_table()) &&
1142 VerifyOffset(verifier, VT_SERVICES) &&
1143 verifier.VerifyVector(services()) &&
1144 verifier.VerifyVectorOfTables(services()) &&
1145 VerifyField<uint64_t>(verifier, VT_ADVANCED_FEATURES) &&
1146 verifier.EndTable();
1147 }
1148 };
1149
1150 struct SchemaBuilder {
1151 typedef Schema Table;
1152 flatbuffers::FlatBufferBuilder &fbb_;
1153 flatbuffers::uoffset_t start_;
add_objectsSchemaBuilder1154 void add_objects(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Object>>> objects) {
1155 fbb_.AddOffset(Schema::VT_OBJECTS, objects);
1156 }
add_enumsSchemaBuilder1157 void add_enums(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>>> enums) {
1158 fbb_.AddOffset(Schema::VT_ENUMS, enums);
1159 }
add_file_identSchemaBuilder1160 void add_file_ident(flatbuffers::Offset<flatbuffers::String> file_ident) {
1161 fbb_.AddOffset(Schema::VT_FILE_IDENT, file_ident);
1162 }
add_file_extSchemaBuilder1163 void add_file_ext(flatbuffers::Offset<flatbuffers::String> file_ext) {
1164 fbb_.AddOffset(Schema::VT_FILE_EXT, file_ext);
1165 }
add_root_tableSchemaBuilder1166 void add_root_table(flatbuffers::Offset<reflection::Object> root_table) {
1167 fbb_.AddOffset(Schema::VT_ROOT_TABLE, root_table);
1168 }
add_servicesSchemaBuilder1169 void add_services(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Service>>> services) {
1170 fbb_.AddOffset(Schema::VT_SERVICES, services);
1171 }
add_advanced_featuresSchemaBuilder1172 void add_advanced_features(reflection::AdvancedFeatures advanced_features) {
1173 fbb_.AddElement<uint64_t>(Schema::VT_ADVANCED_FEATURES, static_cast<uint64_t>(advanced_features), 0);
1174 }
SchemaBuilderSchemaBuilder1175 explicit SchemaBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1176 : fbb_(_fbb) {
1177 start_ = fbb_.StartTable();
1178 }
FinishSchemaBuilder1179 flatbuffers::Offset<Schema> Finish() {
1180 const auto end = fbb_.EndTable(start_);
1181 auto o = flatbuffers::Offset<Schema>(end);
1182 fbb_.Required(o, Schema::VT_OBJECTS);
1183 fbb_.Required(o, Schema::VT_ENUMS);
1184 return o;
1185 }
1186 };
1187
1188 inline flatbuffers::Offset<Schema> CreateSchema(
1189 flatbuffers::FlatBufferBuilder &_fbb,
1190 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Object>>> objects = 0,
1191 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Enum>>> enums = 0,
1192 flatbuffers::Offset<flatbuffers::String> file_ident = 0,
1193 flatbuffers::Offset<flatbuffers::String> file_ext = 0,
1194 flatbuffers::Offset<reflection::Object> root_table = 0,
1195 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<reflection::Service>>> services = 0,
1196 reflection::AdvancedFeatures advanced_features = static_cast<reflection::AdvancedFeatures>(0)) {
1197 SchemaBuilder builder_(_fbb);
1198 builder_.add_advanced_features(advanced_features);
1199 builder_.add_services(services);
1200 builder_.add_root_table(root_table);
1201 builder_.add_file_ext(file_ext);
1202 builder_.add_file_ident(file_ident);
1203 builder_.add_enums(enums);
1204 builder_.add_objects(objects);
1205 return builder_.Finish();
1206 }
1207
1208 inline flatbuffers::Offset<Schema> CreateSchemaDirect(
1209 flatbuffers::FlatBufferBuilder &_fbb,
1210 std::vector<flatbuffers::Offset<reflection::Object>> *objects = nullptr,
1211 std::vector<flatbuffers::Offset<reflection::Enum>> *enums = nullptr,
1212 const char *file_ident = nullptr,
1213 const char *file_ext = nullptr,
1214 flatbuffers::Offset<reflection::Object> root_table = 0,
1215 std::vector<flatbuffers::Offset<reflection::Service>> *services = nullptr,
1216 reflection::AdvancedFeatures advanced_features = static_cast<reflection::AdvancedFeatures>(0)) {
1217 auto objects__ = objects ? _fbb.CreateVectorOfSortedTables<reflection::Object>(objects) : 0;
1218 auto enums__ = enums ? _fbb.CreateVectorOfSortedTables<reflection::Enum>(enums) : 0;
1219 auto file_ident__ = file_ident ? _fbb.CreateString(file_ident) : 0;
1220 auto file_ext__ = file_ext ? _fbb.CreateString(file_ext) : 0;
1221 auto services__ = services ? _fbb.CreateVectorOfSortedTables<reflection::Service>(services) : 0;
1222 return reflection::CreateSchema(
1223 _fbb,
1224 objects__,
1225 enums__,
1226 file_ident__,
1227 file_ext__,
1228 root_table,
1229 services__,
1230 advanced_features);
1231 }
1232
GetSchema(const void * buf)1233 inline const reflection::Schema *GetSchema(const void *buf) {
1234 return flatbuffers::GetRoot<reflection::Schema>(buf);
1235 }
1236
GetSizePrefixedSchema(const void * buf)1237 inline const reflection::Schema *GetSizePrefixedSchema(const void *buf) {
1238 return flatbuffers::GetSizePrefixedRoot<reflection::Schema>(buf);
1239 }
1240
SchemaIdentifier()1241 inline const char *SchemaIdentifier() {
1242 return "BFBS";
1243 }
1244
SchemaBufferHasIdentifier(const void * buf)1245 inline bool SchemaBufferHasIdentifier(const void *buf) {
1246 return flatbuffers::BufferHasIdentifier(
1247 buf, SchemaIdentifier());
1248 }
1249
VerifySchemaBuffer(flatbuffers::Verifier & verifier)1250 inline bool VerifySchemaBuffer(
1251 flatbuffers::Verifier &verifier) {
1252 return verifier.VerifyBuffer<reflection::Schema>(SchemaIdentifier());
1253 }
1254
VerifySizePrefixedSchemaBuffer(flatbuffers::Verifier & verifier)1255 inline bool VerifySizePrefixedSchemaBuffer(
1256 flatbuffers::Verifier &verifier) {
1257 return verifier.VerifySizePrefixedBuffer<reflection::Schema>(SchemaIdentifier());
1258 }
1259
SchemaExtension()1260 inline const char *SchemaExtension() {
1261 return "bfbs";
1262 }
1263
FinishSchemaBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<reflection::Schema> root)1264 inline void FinishSchemaBuffer(
1265 flatbuffers::FlatBufferBuilder &fbb,
1266 flatbuffers::Offset<reflection::Schema> root) {
1267 fbb.Finish(root, SchemaIdentifier());
1268 }
1269
FinishSizePrefixedSchemaBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<reflection::Schema> root)1270 inline void FinishSizePrefixedSchemaBuffer(
1271 flatbuffers::FlatBufferBuilder &fbb,
1272 flatbuffers::Offset<reflection::Schema> root) {
1273 fbb.FinishSizePrefixed(root, SchemaIdentifier());
1274 }
1275
1276 } // namespace reflection
1277
1278 #endif // FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_
1279