Lines Matching refs:reflection
25 int64_t GetAnyValueI(reflection::BaseType type, const uint8_t *data) { in GetAnyValueI()
29 case reflection::UType: in GetAnyValueI()
30 case reflection::Bool: in GetAnyValueI()
31 case reflection::UByte: return FLATBUFFERS_GET(uint8_t); in GetAnyValueI()
32 case reflection::Byte: return FLATBUFFERS_GET(int8_t); in GetAnyValueI()
33 case reflection::Short: return FLATBUFFERS_GET(int16_t); in GetAnyValueI()
34 case reflection::UShort: return FLATBUFFERS_GET(uint16_t); in GetAnyValueI()
35 case reflection::Int: return FLATBUFFERS_GET(int32_t); in GetAnyValueI()
36 case reflection::UInt: return FLATBUFFERS_GET(uint32_t); in GetAnyValueI()
37 case reflection::Long: return FLATBUFFERS_GET(int64_t); in GetAnyValueI()
38 case reflection::ULong: return FLATBUFFERS_GET(uint64_t); in GetAnyValueI()
39 case reflection::Float: return FLATBUFFERS_GET(float); in GetAnyValueI()
40 case reflection::Double: return FLATBUFFERS_GET(double); in GetAnyValueI()
41 case reflection::String: { in GetAnyValueI()
52 double GetAnyValueF(reflection::BaseType type, const uint8_t *data) { in GetAnyValueF()
54 case reflection::Float: return static_cast<double>(ReadScalar<float>(data)); in GetAnyValueF()
55 case reflection::Double: return ReadScalar<double>(data); in GetAnyValueF()
56 case reflection::String: { in GetAnyValueF()
71 std::string GetAnyValueS(reflection::BaseType type, const uint8_t *data, in GetAnyValueS()
72 const reflection::Schema *schema, int type_index) { in GetAnyValueS()
74 case reflection::Float: in GetAnyValueS()
75 case reflection::Double: return NumToString(GetAnyValueF(type, data)); in GetAnyValueS()
76 case reflection::String: { in GetAnyValueS()
81 case reflection::Obj: in GetAnyValueS()
99 if (fielddef.type()->base_type() == reflection::String) { in GetAnyValueS()
116 case reflection::Vector: in GetAnyValueS()
118 case reflection::Union: return "(union)"; // TODO: implement this as well. in GetAnyValueS()
123 void SetAnyValueI(reflection::BaseType type, uint8_t *data, int64_t val) { in SetAnyValueI()
127 case reflection::UType: in SetAnyValueI()
128 case reflection::Bool: in SetAnyValueI()
129 case reflection::UByte: FLATBUFFERS_SET(uint8_t ); break; in SetAnyValueI()
130 case reflection::Byte: FLATBUFFERS_SET(int8_t ); break; in SetAnyValueI()
131 case reflection::Short: FLATBUFFERS_SET(int16_t ); break; in SetAnyValueI()
132 case reflection::UShort: FLATBUFFERS_SET(uint16_t); break; in SetAnyValueI()
133 case reflection::Int: FLATBUFFERS_SET(int32_t ); break; in SetAnyValueI()
134 case reflection::UInt: FLATBUFFERS_SET(uint32_t); break; in SetAnyValueI()
135 case reflection::Long: FLATBUFFERS_SET(int64_t ); break; in SetAnyValueI()
136 case reflection::ULong: FLATBUFFERS_SET(uint64_t); break; in SetAnyValueI()
137 case reflection::Float: FLATBUFFERS_SET(float ); break; in SetAnyValueI()
138 case reflection::Double: FLATBUFFERS_SET(double ); break; in SetAnyValueI()
146 void SetAnyValueF(reflection::BaseType type, uint8_t *data, double val) { in SetAnyValueF()
148 case reflection::Float: WriteScalar(data, static_cast<float>(val)); break; in SetAnyValueF()
149 case reflection::Double: WriteScalar(data, val); break; in SetAnyValueF()
155 void SetAnyValueS(reflection::BaseType type, uint8_t *data, const char *val) { in SetAnyValueS()
157 case reflection::Float: in SetAnyValueS()
158 case reflection::Double: { in SetAnyValueS()
179 ResizeContext(const reflection::Schema &schema, uoffset_t start, int delta, in ResizeContext()
181 const reflection::Object *root_table = nullptr) in ResizeContext()
224 void ResizeTable(const reflection::Object &objectdef, Table *table) { in ResizeTable()
242 if (base_type <= reflection::Double) continue; in ResizeTable()
248 base_type == reflection::Obj in ResizeTable()
259 case reflection::Obj: { in ResizeTable()
263 case reflection::Vector: { in ResizeTable()
265 if (elem_type != reflection::Obj && elem_type != reflection::String) in ResizeTable()
269 elem_type == reflection::Obj in ResizeTable()
283 case reflection::Union: { in ResizeTable()
288 case reflection::String: break; in ResizeTable()
302 const reflection::Schema &schema_;
309 void SetString(const reflection::Schema &schema, const std::string &val, in SetString()
311 const reflection::Object *root_table) { in SetString()
329 uint8_t *ResizeAnyVector(const reflection::Schema &schema, uoffset_t newsize, in ResizeAnyVector()
332 const reflection::Object *root_table) { in ResizeAnyVector()
371 void CopyInline(FlatBufferBuilder &fbb, const reflection::Field &fielddef, in CopyInline()
379 const reflection::Schema &schema, in CopyTable()
380 const reflection::Object &objectdef, in CopyTable()
392 case reflection::String: { in CopyTable()
398 case reflection::Obj: { in CopyTable()
407 case reflection::Union: { in CopyTable()
413 case reflection::Vector: { in CopyTable()
418 element_base_type == reflection::Obj in CopyTable()
422 case reflection::String: { in CopyTable()
433 case reflection::Obj: { in CopyTable()
471 case reflection::Obj: { in CopyTable()
480 case reflection::Union: in CopyTable()
481 case reflection::String: in CopyTable()
482 case reflection::Vector: in CopyTable()
503 voffset_t field_offset, const reflection::Object &obj, in VerifyStruct()
515 const reflection::Object &obj, bool required) { in VerifyVectorOfStructs()
523 bool VerifyObject(flatbuffers::Verifier &v, const reflection::Schema &schema,
524 const reflection::Object &obj,
527 bool VerifyUnion(flatbuffers::Verifier &v, const reflection::Schema &schema, in VerifyUnion()
529 const reflection::Field &union_field) { in VerifyUnion()
535 case reflection::Obj: { in VerifyUnion()
545 case reflection::String: in VerifyUnion()
552 bool VerifyVector(flatbuffers::Verifier &v, const reflection::Schema &schema, in VerifyVector()
554 const reflection::Field &vec_field) { in VerifyVector()
555 FLATBUFFERS_ASSERT(vec_field.type()->base_type() == reflection::Vector); in VerifyVector()
559 case reflection::UType: in VerifyVector()
561 case reflection::Bool: in VerifyVector()
562 case reflection::Byte: in VerifyVector()
563 case reflection::UByte: in VerifyVector()
565 case reflection::Short: in VerifyVector()
566 case reflection::UShort: in VerifyVector()
568 case reflection::Int: in VerifyVector()
569 case reflection::UInt: in VerifyVector()
571 case reflection::Long: in VerifyVector()
572 case reflection::ULong: in VerifyVector()
574 case reflection::Float: in VerifyVector()
576 case reflection::Double: in VerifyVector()
578 case reflection::String: { in VerifyVector()
588 case reflection::Obj: { in VerifyVector()
607 case reflection::Union: { in VerifyVector()
623 case reflection::Vector: in VerifyVector()
624 case reflection::None: in VerifyVector()
629 bool VerifyObject(flatbuffers::Verifier &v, const reflection::Schema &schema, in VerifyObject()
630 const reflection::Object &obj, in VerifyObject()
637 case reflection::None: FLATBUFFERS_ASSERT(false); break; in VerifyObject()
638 case reflection::UType: in VerifyObject()
641 case reflection::Bool: in VerifyObject()
642 case reflection::Byte: in VerifyObject()
643 case reflection::UByte: in VerifyObject()
646 case reflection::Short: in VerifyObject()
647 case reflection::UShort: in VerifyObject()
650 case reflection::Int: in VerifyObject()
651 case reflection::UInt: in VerifyObject()
654 case reflection::Long: in VerifyObject()
655 case reflection::ULong: in VerifyObject()
658 case reflection::Float: in VerifyObject()
661 case reflection::Double: in VerifyObject()
664 case reflection::String: in VerifyObject()
670 case reflection::Vector: in VerifyObject()
673 case reflection::Obj: { in VerifyObject()
689 case reflection::Union: { in VerifyObject()
707 bool Verify(const reflection::Schema &schema, const reflection::Object &root, in Verify()