mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 16:36:55 +00:00
A feature that officially supports nested FlatBuffers.
Generates convenient accessors for the nested root. Change-Id: Ic0b1531de7ace475ff2a7b1f430d27f41c838430 Tested: on Windows.
This commit is contained in:
@@ -262,15 +262,16 @@ public:
|
||||
iterator end() { return iterator(Data(), length_); }
|
||||
const_iterator end() const { return const_iterator(Data(), length_); }
|
||||
|
||||
// The raw data in little endian format. Use with care.
|
||||
const uint8_t *Data() const {
|
||||
return reinterpret_cast<const uint8_t *>(&length_ + 1);
|
||||
}
|
||||
|
||||
protected:
|
||||
// This class is only used to access pre-existing data. Don't ever
|
||||
// try to construct these manually.
|
||||
Vector();
|
||||
|
||||
const uint8_t *Data() const {
|
||||
return reinterpret_cast<const uint8_t *>(&length_ + 1);
|
||||
}
|
||||
|
||||
uoffset_t length_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user