ADTF
3.18.4
|
Class to access and obtain the byte position and other information of a instance of this element within a struct (see StructTypeAccess). More...
Public Member Functions | |
StructElementAccess ()=delete | |
deleted CTOR | |
StructElementAccess (std::nullptr_t) | |
empty element access. More... | |
StructElementAccess (StructElementAccess &&)=default | |
Default move CTOR. | |
StructElementAccess & | operator= (StructElementAccess &&)=default |
Default move assignment. More... | |
StructElementAccess (const StructElementAccess &)=default | |
Default copy CTOR. | |
StructElementAccess & | operator= (const StructElementAccess &)=default |
Default copy assignment. More... | |
operator bool () const | |
Retrieve if the StructElementAccess is valid or not! More... | |
TypeOfType | getTypeOfType () const |
Get the Type Of the type. More... | |
std::shared_ptr< const datamodel::StructType > | getStructType () const |
Gets the Struct Type if the element is dependent on a structtype. More... | |
std::shared_ptr< const datamodel::EnumType > | getEnumType () const |
Gets the Enum Type if the element is dependent on a enumtype. More... | |
std::shared_ptr< const datamodel::DataType > | getDataType () const |
Gets the Data Type if the element is dependent on a datatype. More... | |
StructTypeAccess | getStructTypeAccess (size_t array_pos=0) const |
Get the Struct Type Access if the element depends on a structtype. More... | |
const datamodel::StructType::Element & | getElement () const |
Get the Element Information which is also part of the data definition. More... | |
bool | isDynamic () const |
Retieve information if this element is a dynamic array. More... | |
bool | isAfterDynamic () const |
The element is on a byte position after a dynamic element, the byte position can not be calculated until it is instanciated. More... | |
OptionalSize | getArrayPos () const |
Get the Array Pos, if this element was retrieved via StructTypeAccess::getElementByPath and the operator[]. More... | |
size_t | getDeserializedBytePos (size_t array_size=0) const |
Get the Deserialized Byte Pos relative to the first byte position of the struct obtained by dd::DataDefinition::getStructTypeAccess. More... | |
size_t | getDeserializedByteSize () const |
Get the Byte size (depends on alignments, ddlversion and arraysize) More... | |
size_t | getDeserializedTypeByteSize () const |
Get the Serialized Type Byte size. More... | |
size_t | getSerializedBytePos (size_t array_size=0) const |
Get SerializedBytePos obtained by dd::DataDefinition::getStructTypeAccess. More... | |
size_t | getSerializedBitOffset (size_t array_size=0) const |
Get SerializedBitOsset obtained by dd::DataDefinition::getStructTypeAccess. More... | |
size_t | getSerializedBitSize () const |
Get the serialized Bit size of the value. More... | |
size_t | getSerializedTypeBitSize () const |
Get the serialized bit size of one element. More... | |
Private Member Functions | |
StructElementAccess (const std::shared_ptr< const datamodel::StructType::Element > &elem, OptionalSize serialized_element_bit_offset, OptionalSize deserialized_element_byte_offset, OptionalSize array_pos) | |
Construct a new Struct Element Access object. More... | |
Private Attributes | |
std::shared_ptr< const datamodel::StructType::Element > | _element = {} |
const ElementTypeInfo * | _element_type_info = nullptr |
OptionalSize | _deserialized_struct_byte_offset = {} |
OptionalSize | _serialized_struct_bit_offset = {} |
OptionalSize | _array_pos = {} |
Class to access and obtain the byte position and other information of a instance of this element within a struct (see StructTypeAccess).
Definition at line 34 of file dd_struct_access.h.
StructElementAccess | ( | std::nullptr_t | ) |
empty element access.
This kind of element access will be returned, if i.e. StructTypeAccess::getElementByPath can not find the given path.
|
private |
Construct a new Struct Element Access object.
elem | the element information of the dd::DataDefinition. |
serialized_element_offset | the serialized offset of the element |
deserialized_element_offset | |
array_pos |
OptionalSize getArrayPos | ( | ) | const |
Get the Array Pos, if this element was retrieved via StructTypeAccess::getElementByPath and the operator[].
std::shared_ptr<const datamodel::DataType> getDataType | ( | ) | const |
Gets the Data Type if the element is dependent on a datatype.
size_t getDeserializedBytePos | ( | size_t | array_size = 0 | ) | const |
Get the Deserialized Byte Pos relative to the first byte position of the struct obtained by dd::DataDefinition::getStructTypeAccess.
size_t getDeserializedByteSize | ( | ) | const |
Get the Byte size (depends on alignments, ddlversion and arraysize)
size_t getDeserializedTypeByteSize | ( | ) | const |
Get the Serialized Type Byte size.
const datamodel::StructType::Element& getElement | ( | ) | const |
Get the Element Information which is also part of the data definition.
std::shared_ptr<const datamodel::EnumType> getEnumType | ( | ) | const |
Gets the Enum Type if the element is dependent on a enumtype.
size_t getSerializedBitOffset | ( | size_t | array_size = 0 | ) | const |
Get SerializedBitOsset obtained by dd::DataDefinition::getStructTypeAccess.
size_t getSerializedBitSize | ( | ) | const |
Get the serialized Bit size of the value.
size_t getSerializedBytePos | ( | size_t | array_size = 0 | ) | const |
Get SerializedBytePos obtained by dd::DataDefinition::getStructTypeAccess.
size_t getSerializedTypeBitSize | ( | ) | const |
Get the serialized bit size of one element.
std::shared_ptr<const datamodel::StructType> getStructType | ( | ) | const |
Gets the Struct Type if the element is dependent on a structtype.
StructTypeAccess getStructTypeAccess | ( | size_t | array_pos = 0 | ) | const |
Get the Struct Type Access if the element depends on a structtype.
All byte positions within the returned StructTypeAccess are relativ to the elements StructTypeAccess parent.
TypeOfType getTypeOfType | ( | ) | const |
Get the Type Of the type.
Retrieves the infomation of the elements type.
TypeOfType |
bool isAfterDynamic | ( | ) | const |
The element is on a byte position after a dynamic element, the byte position can not be calculated until it is instanciated.
true | the element is after a dynamic content. |
false | the element is not after dynamic content |
bool isDynamic | ( | ) | const |
Retieve information if this element is a dynamic array.
true | the element is dynamic or it contains dynamic content. |
false | the element is not dynamic. |
operator bool | ( | ) | const |
Retrieve if the StructElementAccess is valid or not!
true | is valid |
false | is not valid |
|
default |
Default copy assignment.
|
default |
Default move assignment.