Initial reflection and resizing functionality.

Tested: on Linux.

Change-Id: I8f7bccf9b1ad87fea788f85e23fa69435758feca
This commit is contained in:
Wouter van Oortmerssen
2015-05-21 16:33:29 -07:00
parent 1808337adc
commit 81312c2128
23 changed files with 1152 additions and 46 deletions

View File

@@ -754,7 +754,7 @@ class FlatBufferBuilder FLATBUFFERS_FINAL_CLASS {
}
template<typename T> Offset<Vector<Offset<T>>> CreateVectorOfSortedTables(
std::vector<T> *v) {
std::vector<Offset<T>> *v) {
return CreateVectorOfSortedTables(v->data(), v->size());
}
@@ -1017,6 +1017,8 @@ class Table {
return true;
}
uint8_t *GetVTable() { return data_ - ReadScalar<soffset_t>(data_); }
bool CheckField(voffset_t field) const {
return GetOptionalFieldOffset(field) != 0;
}