Raw struct dynamic field descriptor.
More...
#include <wpi/struct/DynamicStruct.h>
|
using | EnumValues = std::vector< std::pair< std::string, int64_t > > |
| Set of enumerated values. More...
|
|
|
| StructFieldDescriptor (const StructDescriptor *parent, std::string_view name, StructFieldType type, size_t size, size_t arraySize, unsigned int bitWidth, EnumValues enumValues, const StructDescriptor *structDesc, const private_init &) |
|
const StructDescriptor * | GetParent () const |
| Gets the dynamic struct this field is contained in. More...
|
|
const std::string & | GetName () const |
| Gets the field name. More...
|
|
StructFieldType | GetType () const |
| Gets the field type. More...
|
|
bool | IsInt () const |
| Returns whether the field type is a signed integer. More...
|
|
bool | IsUint () const |
| Returns whether the field type is an unsigned integer. More...
|
|
size_t | GetSize () const |
| Gets the underlying storage size of the field, in bytes. More...
|
|
size_t | GetOffset () const |
| Gets the storage offset of the field, in bytes. More...
|
|
unsigned int | GetBitWidth () const |
| Gets the bit width of the field, in bits. More...
|
|
uint64_t | GetBitMask () const |
| Gets the bit mask for the field. More...
|
|
unsigned int | GetBitShift () const |
| Gets the bit shift for the field (LSB=0). More...
|
|
bool | IsArray () const |
| Returns whether the field is an array. More...
|
|
size_t | GetArraySize () const |
| Gets the array size. More...
|
|
bool | HasEnum () const |
| Returns whether the field has enumerated values. More...
|
|
const EnumValues & | GetEnumValues () |
| Gets the enumerated values. More...
|
|
const StructDescriptor * | GetStruct () const |
| Gets the struct descriptor for a struct data type. More...
|
|
uint64_t | GetUintMin () const |
| Gets the minimum unsigned integer value that can be stored in this field. More...
|
|
uint64_t | GetUintMax () const |
| Gets the maximum unsigned integer value that can be stored in this field. More...
|
|
int64_t | GetIntMin () const |
| Gets the minimum signed integer value that can be stored in this field. More...
|
|
int64_t | GetIntMax () const |
| Gets the maximum signed integer value that can be stored in this field. More...
|
|
bool | IsBitField () const |
| Returns whether the field is a bitfield. More...
|
|
Raw struct dynamic field descriptor.
◆ EnumValues
Set of enumerated values.
◆ StructFieldDescriptor()
◆ GetArraySize()
size_t wpi::StructFieldDescriptor::GetArraySize |
( |
| ) |
const |
|
inline |
Gets the array size.
Returns 1 if non-array.
- Returns
- number of elements
◆ GetBitMask()
uint64_t wpi::StructFieldDescriptor::GetBitMask |
( |
| ) |
const |
|
inline |
Gets the bit mask for the field.
The mask is always the least significant bits (it is not shifted).
- Returns
- bit mask
◆ GetBitShift()
unsigned int wpi::StructFieldDescriptor::GetBitShift |
( |
| ) |
const |
|
inline |
Gets the bit shift for the field (LSB=0).
- Returns
- number of bits
◆ GetBitWidth()
unsigned int wpi::StructFieldDescriptor::GetBitWidth |
( |
| ) |
const |
|
inline |
Gets the bit width of the field, in bits.
- Returns
- number of bits
◆ GetEnumValues()
const EnumValues & wpi::StructFieldDescriptor::GetEnumValues |
( |
| ) |
|
|
inline |
Gets the enumerated values.
- Returns
- set of enumerated values
◆ GetIntMax()
int64_t wpi::StructFieldDescriptor::GetIntMax |
( |
| ) |
const |
|
inline |
Gets the maximum signed integer value that can be stored in this field.
- Returns
- maximum value
◆ GetIntMin()
int64_t wpi::StructFieldDescriptor::GetIntMin |
( |
| ) |
const |
|
inline |
Gets the minimum signed integer value that can be stored in this field.
- Returns
- minimum value
◆ GetName()
const std::string & wpi::StructFieldDescriptor::GetName |
( |
| ) |
const |
|
inline |
Gets the field name.
- Returns
- field name
◆ GetOffset()
size_t wpi::StructFieldDescriptor::GetOffset |
( |
| ) |
const |
|
inline |
Gets the storage offset of the field, in bytes.
- Returns
- number of bytes from the start of the struct
◆ GetParent()
Gets the dynamic struct this field is contained in.
- Returns
- struct descriptor
◆ GetSize()
size_t wpi::StructFieldDescriptor::GetSize |
( |
| ) |
const |
|
inline |
Gets the underlying storage size of the field, in bytes.
- Returns
- number of bytes
◆ GetStruct()
Gets the struct descriptor for a struct data type.
- Returns
- struct descriptor; returns null for non-struct
◆ GetType()
Gets the field type.
- Returns
- field type
◆ GetUintMax()
uint64_t wpi::StructFieldDescriptor::GetUintMax |
( |
| ) |
const |
|
inline |
Gets the maximum unsigned integer value that can be stored in this field.
- Returns
- maximum value
◆ GetUintMin()
uint64_t wpi::StructFieldDescriptor::GetUintMin |
( |
| ) |
const |
|
inline |
Gets the minimum unsigned integer value that can be stored in this field.
- Returns
- minimum value
◆ HasEnum()
bool wpi::StructFieldDescriptor::HasEnum |
( |
| ) |
const |
|
inline |
Returns whether the field has enumerated values.
- Returns
- true if there are enumerated values
◆ IsArray()
bool wpi::StructFieldDescriptor::IsArray |
( |
| ) |
const |
|
inline |
Returns whether the field is an array.
- Returns
- true if array
◆ IsBitField()
bool wpi::StructFieldDescriptor::IsBitField |
( |
| ) |
const |
|
inline |
Returns whether the field is a bitfield.
- Returns
- true if bitfield
◆ IsInt()
bool wpi::StructFieldDescriptor::IsInt |
( |
| ) |
const |
|
inline |
Returns whether the field type is a signed integer.
- Returns
- true if signed integer, false otherwise
◆ IsUint()
bool wpi::StructFieldDescriptor::IsUint |
( |
| ) |
const |
|
inline |
Returns whether the field type is an unsigned integer.
- Returns
- true if unsigned integer, false otherwise
◆ DynamicStruct
◆ MutableDynamicStruct
◆ StructDescriptor
◆ StructDescriptorDatabase
The documentation for this class was generated from the following file: