Reworked reflection.h to be more general.

e.g. support generic reading/writing from structs/vectors etc.

Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d
Tested: on Linux.
Bug: 22660837
This commit is contained in:
Wouter van Oortmerssen
2015-07-31 13:55:53 -07:00
parent 0e064e415b
commit 7101224d86
6 changed files with 734 additions and 440 deletions

View File

@@ -324,7 +324,7 @@ void ReflectionTest(uint8_t *flatbuf, size_t length) {
TEST_EQ(hp_int64, 80);
auto hp_double = flatbuffers::GetAnyFieldF(root, hp_field);
TEST_EQ(hp_double, 80.0);
auto hp_string = flatbuffers::GetAnyFieldS(root, hp_field, schema);
auto hp_string = flatbuffers::GetAnyFieldS(root, hp_field, &schema);
TEST_EQ_STR(hp_string.c_str(), "80");
// We can also modify it.