mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 02:23:05 +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
@@ -197,6 +197,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Rapunzel FLATBUFFERS_FINAL_CLASS {
|
||||
int32_t hair_length_;
|
||||
|
||||
public:
|
||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return RapunzelTypeTable();
|
||||
}
|
||||
Rapunzel() {
|
||||
memset(static_cast<void *>(this), 0, sizeof(Rapunzel));
|
||||
}
|
||||
@@ -227,6 +230,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS {
|
||||
int32_t books_read_;
|
||||
|
||||
public:
|
||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return BookReaderTypeTable();
|
||||
}
|
||||
BookReader() {
|
||||
memset(static_cast<void *>(this), 0, sizeof(BookReader));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user