Lines Matching refs:Table
74 // Convert the table to a string. This is mostly for debugging purposes,
82 auto table_field = reinterpret_cast<const Table *>(
101 return "(table)";
158 // If your FlatBuffer's root table is not the schema's root table, you should
204 void ResizeTable(const reflection::Object &objectdef, Table *table) {
205 if (DagCheck(table))
206 return; // Table already visited.
207 auto vtable = table->GetVTable();
208 // Early out: since all fields inside the table must point forwards in
209 // memory, if the insertion point is before the table we can stop here.
210 auto tableloc = reinterpret_cast<uint8_t *>(table);
212 // Check if insertion point is between the table and a vtable that
215 Straddle<soffset_t, -1>(vtable, table, table);
225 auto offset = table->GetOptionalFieldOffset(fielddef.offset());
240 ResizeTable(*subobjectdef, reinterpret_cast<Table *>(ref));
259 ResizeTable(*elemobjectdef, reinterpret_cast<Table *>(dest));
264 ResizeTable(GetUnionType(schema_, objectdef, fielddef, *table),
265 reinterpret_cast<Table *>(ref));
277 Straddle<soffset_t, -1>(table, vtable, table);
353 const Table &table, size_t align, size_t size) {
355 fbb.PushBytes(table.GetStruct<const uint8_t *>(fielddef.offset()), size);
359 Offset<const Table *> CopyTable(FlatBufferBuilder &fbb,
362 const Table &table,
364 // Before we can construct the table, we have to first generate any
371 if (!table.CheckField(fielddef.offset())) continue;
376 ? fbb.CreateSharedString(GetFieldS(table, fielddef)).o
377 table, fielddef)).o;
384 *GetFieldT(table, fielddef)).o;
389 auto &subobjectdef = GetUnionType(schema, objectdef, fielddef, table);
391 *GetFieldT(table, fielddef)).o;
395 auto vec = table.GetPointer<const Vector<Offset<Table>> *>(
415 std::vector<Offset<const Table *>> elements(vec->size());
444 // Now we can build the actual table from either offsets or scalar data.
451 if (!table.CheckField(fielddef.offset())) continue;
457 CopyInline(fbb, fielddef, table, subobjectdef.minalign(),
470 CopyInline(fbb, fielddef, table, size, size);
485 const flatbuffers::Table &parent_table,
499 const flatbuffers::Table &parent_table,
516 const flatbuffers::Table *table,
521 const flatbuffers::Table &table,
524 if (!table.VerifyField<uoffset_t>(v, vec_field.offset()))
532 return v.Verify(flatbuffers::GetFieldV<uint8_t>(table, vec_field));
536 return v.Verify(flatbuffers::GetFieldV<int8_t>(table, vec_field));
539 return v.Verify(flatbuffers::GetFieldV<int16_t>(table, vec_field));
542 return v.Verify(flatbuffers::GetFieldV<int32_t>(table, vec_field));
545 return v.Verify(flatbuffers::GetFieldV<int64_t>(table, vec_field));
547 return v.Verify(flatbuffers::GetFieldV<float>(table, vec_field));
549 return v.Verify(flatbuffers::GetFieldV<double>(table, vec_field));
553 Offset<flatbuffers::String>>(table, vec_field);
566 if (!VerifyVectorOfStructs(v, table, vec_field.offset(), *obj,
573 Offset<flatbuffers::Table>>(table, vec_field);
600 const flatbuffers::Table *table,
602 if (!table) {
609 if (!table->VerifyTableStart(v))
619 if (!table->VerifyField<uint8_t>(v, field_def->offset()))
625 if (!table->VerifyField<int8_t>(v, field_def->offset()))
630 if (!table->VerifyField<int16_t>(v, field_def->offset()))
635 if (!table->VerifyField<int32_t>(v, field_def->offset()))
640 if (!table->VerifyField<int64_t>(v, field_def->offset()))
644 if (!table->VerifyField<float>(v, field_def->offset()))
648 if (!table->VerifyField<double>(v, field_def->offset()))
652 if (!table->VerifyField<uoffset_t>(v, field_def->offset()) ||
653 !v.Verify(flatbuffers::GetFieldS(*table, *field_def))) {
658 if (!VerifyVector(v, schema, *table, *field_def))
664 if (!VerifyStruct(v, *table, field_def->offset(), *child_obj,
670 flatbuffers::GetFieldT(*table, *field_def),
680 auto utype = table->GetField<uint8_t>(utype_offset, 0);
686 flatbuffers::GetFieldT(*table, *field_def),