mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 12:40:01 +00:00
Struct typetable (#5291)
* C++: Generate MiniReflectTypeTable for Structs as well as Tables * Update generated code * add test
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
98b9b5a933
commit
cef8f928bb
@@ -542,6 +542,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(2) Test FLATBUFFERS_FINAL_CLASS {
|
||||
int8_t padding0__;
|
||||
|
||||
public:
|
||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return TestTypeTable();
|
||||
}
|
||||
Test() {
|
||||
memset(static_cast<void *>(this), 0, sizeof(Test));
|
||||
}
|
||||
@@ -590,6 +593,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS {
|
||||
int16_t padding2__;
|
||||
|
||||
public:
|
||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return Vec3TypeTable();
|
||||
}
|
||||
Vec3() {
|
||||
memset(static_cast<void *>(this), 0, sizeof(Vec3));
|
||||
}
|
||||
@@ -667,6 +673,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
|
||||
uint32_t distance_;
|
||||
|
||||
public:
|
||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AbilityTypeTable();
|
||||
}
|
||||
Ability() {
|
||||
memset(static_cast<void *>(this), 0, sizeof(Ability));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user