ONE - On-device Neural Engine
Loading...
Searching...
No Matches
flatbuffers::StructDef Struct Reference

#include <idl.h>

Collaboration diagram for flatbuffers::StructDef:

Public Member Functions

 StructDef ()
 
void PadLastField (size_t min_align)
 
Offset< reflection::Object > Serialize (FlatBufferBuilder *builder, const Parser &parser) const
 
bool Deserialize (Parser &parser, const reflection::Object *object)
 
- Public Member Functions inherited from flatbuffers::Definition
 Definition ()
 
flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< reflection::KeyValue > > > SerializeAttributes (FlatBufferBuilder *builder, const Parser &parser) const
 
bool DeserializeAttributes (Parser &parser, const Vector< Offset< reflection::KeyValue > > *attrs)
 

Data Fields

SymbolTable< FieldDeffields
 
bool fixed
 
bool predecl
 
bool sortbysize
 
bool has_key
 
size_t minalign
 
size_t bytesize
 
flatbuffers::unique_ptr< std::string > original_location
 
- Data Fields inherited from flatbuffers::Definition
std::string name
 
std::string file
 
std::vector< std::string > doc_comment
 
SymbolTable< Valueattributes
 
bool generated
 
Namespacedefined_namespace
 
uoffset_t serialized_location
 
int index
 
int refcount
 

Detailed Description

Definition at line 355 of file idl.h.

Constructor & Destructor Documentation

◆ StructDef()

flatbuffers::StructDef::StructDef ( )
inline

Definition at line 357 of file idl.h.

358 : fixed(false), predecl(true), sortbysize(true), has_key(false), minalign(1), bytesize(0)
359 {
360 }

Member Function Documentation

◆ Deserialize()

bool flatbuffers::StructDef::Deserialize ( Parser parser,
const reflection::Object *  object 
)

◆ PadLastField()

void flatbuffers::StructDef::PadLastField ( size_t  min_align)
inline

Definition at line 362 of file idl.h.

363 {
364 auto padding = PaddingBytes(bytesize, min_align);
365 bytesize += padding;
366 if (fields.vec.size())
367 fields.vec.back()->padding = padding;
368 }
SymbolTable< FieldDef > fields
Definition idl.h:374

References bytesize, and fields.

◆ Serialize()

Offset< reflection::Object > flatbuffers::StructDef::Serialize ( FlatBufferBuilder builder,
const Parser parser 
) const

Field Documentation

◆ bytesize

size_t flatbuffers::StructDef::bytesize

Definition at line 381 of file idl.h.

Referenced by PadLastField().

◆ fields

SymbolTable<FieldDef> flatbuffers::StructDef::fields

Definition at line 374 of file idl.h.

Referenced by PadLastField().

◆ fixed

bool flatbuffers::StructDef::fixed

Definition at line 376 of file idl.h.

◆ has_key

bool flatbuffers::StructDef::has_key

Definition at line 379 of file idl.h.

◆ minalign

size_t flatbuffers::StructDef::minalign

Definition at line 380 of file idl.h.

◆ original_location

flatbuffers::unique_ptr<std::string> flatbuffers::StructDef::original_location

Definition at line 383 of file idl.h.

◆ predecl

bool flatbuffers::StructDef::predecl

Definition at line 377 of file idl.h.

◆ sortbysize

bool flatbuffers::StructDef::sortbysize

Definition at line 378 of file idl.h.


The documentation for this struct was generated from the following file: