|
| MessageBuilder (uoffset_t initial_size=1024) |
|
| MessageBuilder (const MessageBuilder &other)=delete |
|
MessageBuilder & | operator= (const MessageBuilder &other)=delete |
|
| MessageBuilder (MessageBuilder &&other) |
|
| MessageBuilder (FlatBufferBuilder &&src, void(*dealloc)(void *, size_t)=&DefaultAllocator::dealloc) |
| Create a MessageBuilder from a FlatBufferBuilder.
|
|
MessageBuilder & | operator= (FlatBufferBuilder &&src) |
|
MessageBuilder & | operator= (MessageBuilder &&other) |
|
void | Swap (MessageBuilder &other) |
|
uint8_t * | ReleaseRaw (size_t &size, size_t &offset, grpc_slice &slice) |
|
| ~MessageBuilder () |
|
template<class T > |
Message< T > | GetMessage () |
|
template<class T > |
Message< T > | ReleaseMessage () |
|
| FlatBufferBuilder (size_t initial_size=1024, Allocator *allocator=nullptr, bool own_allocator=false, size_t buffer_minalign=AlignOf< largest_scalar_t >()) |
| Default constructor for FlatBufferBuilder.
|
|
| FlatBufferBuilder (FlatBufferBuilder &&other) |
| Move constructor for FlatBufferBuilder.
|
|
FlatBufferBuilder & | operator= (FlatBufferBuilder &&other) |
| Move assignment operator for FlatBufferBuilder.
|
|
void | Swap (FlatBufferBuilder &other) |
|
| ~FlatBufferBuilder () |
|
void | Reset () |
|
void | Clear () |
| Reset all the state in this FlatBufferBuilder so it can be reused to construct another buffer.
|
|
uoffset_t | GetSize () const |
| The current size of the serialized buffer, counting from the end.
|
|
uint8_t * | GetBufferPointer () const |
| Get the serialized buffer (after you call Finish() ).
|
|
flatbuffers::span< uint8_t > | GetBufferSpan () const |
| Get the serialized buffer (after you call Finish() ) as a span.
|
|
uint8_t * | GetCurrentBufferPointer () const |
| Get a pointer to an unfinished buffer.
|
|
| FLATBUFFERS_ATTRIBUTE (deprecated("use Release() instead")) DetachedBuffer ReleaseBufferPointer() |
| Get the released pointer to the serialized buffer.
|
|
DetachedBuffer | Release () |
| Get the released DetachedBuffer.
|
|
uint8_t * | ReleaseRaw (size_t &size, size_t &offset) |
| Get the released pointer to the serialized buffer.
|
|
size_t | GetBufferMinAlignment () const |
| get the minimum alignment this buffer needs to be accessed properly. This is only known once all elements have been written (after you call Finish()). You can use this information if you need to embed a FlatBuffer in some other buffer, such that you can later read it without first having to copy it into its own buffer.
|
|
void | ForceDefaults (bool fd) |
| In order to save space, fields that are set to their default value don't get serialized into the buffer.
|
|
void | DedupVtables (bool dedup) |
| By default vtables are deduped in order to save space.
|
|
Offset< String > | CreateString (const char *str, size_t len) |
| Store a string in the buffer, which can contain any binary data.
|
|
Offset< String > | CreateString (const char *str) |
| Store a string in the buffer, which is null-terminated.
|
|
Offset< String > | CreateString (char *str) |
| Store a string in the buffer, which is null-terminated.
|
|
Offset< String > | CreateString (const std::string &str) |
| Store a string in the buffer, which can contain any binary data.
|
|
Offset< String > | CreateString (const String *str) |
| Store a string in the buffer, which can contain any binary data.
|
|
template<typename T > |
Offset< String > | CreateString (const T &str) |
| Store a string in the buffer, which can contain any binary data.
|
|
Offset< String > | CreateSharedString (const char *str, size_t len) |
| Store a string in the buffer, which can contain any binary data. If a string with this exact contents has already been serialized before, instead simply returns the offset of the existing string.
|
|
Offset< String > | CreateSharedString (const char *str) |
| Store a string in the buffer, which null-terminated. If a string with this exact contents has already been serialized before, instead simply returns the offset of the existing string.
|
|
Offset< String > | CreateSharedString (const std::string &str) |
| Store a string in the buffer, which can contain any binary data. If a string with this exact contents has already been serialized before, instead simply returns the offset of the existing string.
|
|
Offset< String > | CreateSharedString (const String *str) |
| Store a string in the buffer, which can contain any binary data. If a string with this exact contents has already been serialized before, instead simply returns the offset of the existing string.
|
|
template<typename T > |
Offset< Vector< T > > | CreateVector (const T *v, size_t len) |
| Serialize an array into a FlatBuffer vector .
|
|
template<typename T > |
Offset< Vector< Offset< T > > > | CreateVector (const Offset< T > *v, size_t len) |
|
template<typename T > |
Offset< Vector< T > > | CreateVector (const std::vector< T > &v) |
| Serialize a std::vector into a FlatBuffer vector .
|
|
Offset< Vector< uint8_t > > | CreateVector (const std::vector< bool > &v) |
|
template<typename T > |
Offset< Vector< T > > | CreateVector (size_t vector_size, const std::function< T(size_t i)> &f) |
| Serialize values returned by a function into a FlatBuffer vector . This is a convenience function that takes care of iteration for you.
|
|
template<typename T , typename F , typename S > |
Offset< Vector< T > > | CreateVector (size_t vector_size, F f, S *state) |
| Serialize values returned by a function into a FlatBuffer vector . This is a convenience function that takes care of iteration for you.
|
|
Offset< Vector< Offset< String > > > | CreateVectorOfStrings (const std::vector< std::string > &v) |
| Serialize a std::vector<std::string> into a FlatBuffer vector . This is a convenience function for a common case.
|
|
template<typename T > |
Offset< Vector< const T * > > | CreateVectorOfStructs (const T *v, size_t len) |
| Serialize an array of structs into a FlatBuffer vector .
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfNativeStructs (const S *v, size_t len, T((*const pack_func)(const S &))) |
| Serialize an array of native structs into a FlatBuffer vector .
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfNativeStructs (const S *v, size_t len) |
| Serialize an array of native structs into a FlatBuffer vector .
|
|
template<typename T > |
Offset< Vector< const T * > > | CreateVectorOfStructs (size_t vector_size, const std::function< void(size_t i, T *)> &filler) |
| Serialize an array of structs into a FlatBuffer vector .
|
|
template<typename T , typename F , typename S > |
Offset< Vector< const T * > > | CreateVectorOfStructs (size_t vector_size, F f, S *state) |
| Serialize an array of structs into a FlatBuffer vector .
|
|
template<typename T , typename Alloc > |
Offset< Vector< const T * > > | CreateVectorOfStructs (const std::vector< T, Alloc > &v) |
| Serialize a std::vector of structs into a FlatBuffer vector .
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfNativeStructs (const std::vector< S > &v, T((*const pack_func)(const S &))) |
| Serialize a std::vector of native structs into a FlatBuffer vector .
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfNativeStructs (const std::vector< S > &v) |
| Serialize a std::vector of native structs into a FlatBuffer vector .
|
|
template<typename T > |
Offset< Vector< const T * > > | CreateVectorOfSortedStructs (std::vector< T > *v) |
| Serialize a std::vector of structs into a FlatBuffer vector in sorted order.
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfSortedNativeStructs (std::vector< S > *v) |
| Serialize a std::vector of native structs into a FlatBuffer vector in sorted order.
|
|
template<typename T > |
Offset< Vector< const T * > > | CreateVectorOfSortedStructs (T *v, size_t len) |
| Serialize an array of structs into a FlatBuffer vector in sorted order.
|
|
template<typename T , typename S > |
Offset< Vector< const T * > > | CreateVectorOfSortedNativeStructs (S *v, size_t len) |
| Serialize an array of native structs into a FlatBuffer vector in sorted order.
|
|
template<typename T > |
Offset< Vector< Offset< T > > > | CreateVectorOfSortedTables (Offset< T > *v, size_t len) |
| Serialize an array of table offsets as a vector in the buffer in sorted order.
|
|
template<typename T > |
Offset< Vector< Offset< T > > > | CreateVectorOfSortedTables (std::vector< Offset< T > > *v) |
| Serialize an array of table offsets as a vector in the buffer in sorted order.
|
|
uoffset_t | CreateUninitializedVector (size_t len, size_t elemsize, uint8_t **buf) |
| Specialized version of CreateVector for non-copying use cases. Write the data any time later to the returned buffer pointer buf .
|
|
template<typename T > |
Offset< Vector< T > > | CreateUninitializedVector (size_t len, T **buf) |
| Specialized version of CreateVector for non-copying use cases. Write the data any time later to the returned buffer pointer buf .
|
|
template<typename T > |
Offset< Vector< const T * > > | CreateUninitializedVectorOfStructs (size_t len, T **buf) |
|
template<typename T , typename U > |
Offset< Vector< T > > | CreateVectorScalarCast (const U *v, size_t len) |
|
template<typename T > |
Offset< const T * > | CreateStruct (const T &structobj) |
| Write a struct by itself, typically to be part of a union.
|
|
template<typename T > |
void | Finish (Offset< T > root, const char *file_identifier=nullptr) |
| Finish serializing a buffer by writing the root offset.
|
|
template<typename T > |
void | FinishSizePrefixed (Offset< T > root, const char *file_identifier=nullptr) |
| Finish a buffer with a 32 bit size field pre-fixed (size of the buffer following the size field). These buffers are NOT compatible with standard buffers created by Finish, i.e. you can't call GetRoot on them, you have to use GetSizePrefixedRoot instead. All >32 bit quantities in this buffer will be aligned when the whole size pre-fixed buffer is aligned. These kinds of buffers are useful for creating a stream of FlatBuffers.
|
|
void | SwapBufAllocator (FlatBufferBuilder &other) |
|