WPILibC++ 2024.3.2
|
Raw struct dynamic struct descriptor. More...
#include <wpi/struct/DynamicStruct.h>
Public Member Functions | |
StructDescriptor (std::string_view name, const private_init &) | |
const std::string & | GetName () const |
Gets the struct name. More... | |
const std::string & | GetSchema () const |
Gets the struct schema. More... | |
bool | IsValid () const |
Returns whether the struct is valid (e.g. More... | |
size_t | GetSize () const |
Returns the struct size, in bytes. More... | |
const StructFieldDescriptor * | FindFieldByName (std::string_view name) const |
Gets a field descriptor by name. More... | |
const std::vector< StructFieldDescriptor > & | GetFields () const |
Gets all field descriptors. More... | |
Friends | |
class | StructDescriptorDatabase |
Raw struct dynamic struct descriptor.
|
inline |
const StructFieldDescriptor * wpi::StructDescriptor::FindFieldByName | ( | std::string_view | name | ) | const |
Gets a field descriptor by name.
Note the field cannot be accessed until the struct is valid.
name | field name |
|
inline |
Gets all field descriptors.
Note fields cannot be accessed until the struct is valid.
|
inline |
Gets the struct name.
|
inline |
Gets the struct schema.
|
inline |
|
inline |
Returns whether the struct is valid (e.g.
the struct is fully defined and field offsets computed).
|
friend |