ADTF
3.18.2
|
Element Size Info is important to get the calculate the TypeInfo for StructType. More...
Public Member Functions | |
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API | ElementTypeInfo ()=default |
default CTOR | |
OptionalSize | getDeserializedBytePos (size_t array_pos=0) const |
Get the Deserialized Byte Pos This position is always invalid for positions after a dynamic content (isAfterDynamic) More... | |
OptionalSize | getDeserializedByteSize () const |
Get the Deserialized Byte Size always aligned, depending on the struct_ddl_version. More... | |
size_t | getDeserializedTypeByteSize () const |
Get the Deserialized Type Byte Size usually this is the same like getDeserializedByteSize, but only for array_size = 1 always aligned, depending on the struct_ddl_version >= 3.0. More... | |
size_t | getDeserializedTypeAlignedByteSize () const |
Get the Deserialized Type Byte Size usually this is the same like getDeserializedByteSize, but only for array_size = 1 usually this is the size for all elements of an array except the last one on struct_ddl_version >= 3.0. More... | |
OptionalSize | getSerializedBytePos (size_t array_pos=0) const |
Get the Serialized Byte Pos This position is always invalid for positions after a dynamic content (isAfterDynamic) More... | |
OptionalSize | getSerializedBitOffset (size_t array_pos=0) const |
Get the Serialized Bit Pos of the element as bit offset to the beginning of the struct This position is always invalid for positions after a dynamic content (isAfterDynamic) More... | |
size_t | getSerializedBitSize () const |
Get the Serialized Bit Size. More... | |
size_t | getSerializedTypeBitSize () const |
Get the Serialized Type Bit Size. More... | |
bool | isDynamic () const |
Determines if the element itself or if it is element of a struct_type defines a dynamic array. More... | |
bool | isAfterDynamic () const |
The element is after a dynamic content. More... | |
bool | isValid () const |
Determines if all size can be calculated, all references are known and the dependencies are well defined. More... | |
TypeOfType | getTypeOfType () const |
Get the Type Of Type object Fast access to the type information. More... | |
std::shared_ptr< const datamodel::StructType > | getStructType () const |
Get the Struct Type Object. More... | |
std::shared_ptr< const datamodel::EnumType > | getEnumType () const |
Get the Enum Type object. More... | |
std::shared_ptr< const datamodel::DataType > | getDataType () const |
Get the Data Type object. More... | |
void | update (datamodel::StructType::Element &element, const std::shared_ptr< datamodel::StructType::Element > &previous_element, const Version &struct_ddl_version, datamodel::DataDefinition &parent_dd) |
Updates all information of the element. More... | |
bool | updateReference (const datamodel::StructType::Element &element, datamodel::DataDefinition &parent_dd) |
Updates the current type reference to the new model. More... | |
Public Member Functions inherited from IInfo | |
virtual | ~IInfo ()=default |
virtual DTOR for IInfo object | |
Static Public Attributes | |
static constexpr const uint8_t | INFO_TYPE_ID = dd::InfoType::element_type_info |
definiton of info type to use the datamodel::Info template. | |
Private Attributes | |
OptionalSize | _deserialized_byte_pos = {} |
OptionalSize | _deserialized_byte_size = {} |
size_t | _deserialized_type_byte_size = 0 |
size_t | _deserialized_type_aligned_byte_size = 0 |
OptionalSize | _serialized_byte_pos = {} |
OptionalSize | _serialized_absolute_bit_offset = {} |
OptionalSize | _serialized_bit_size = {} |
size_t | _serialized_type_bit_size = 0 |
bool | _is_dynamic = false |
bool | _is_after_dynamic = false |
bool | _is_valid = false |
datamodel::ElementType | _element_type |
Additional Inherited Members | |
Protected Member Functions inherited from Info< ElementTypeInfo > | |
uint8_t | getInfoType () const override |
Get the Info Type object. More... | |
Element Size Info is important to get the calculate the TypeInfo for StructType.
It will only updated by the TypeInfo::update method for StructType. @dev_essential_deprecated Use ddl::dd::StructTypeAccess and ddl::dd::StructElementAccess instead.
Definition at line 175 of file dd_typeinfomodel.h.
std::shared_ptr<const datamodel::DataType> getDataType | ( | ) | const |
Get the Data Type object.
If the type is enum_type the value is set to the defined Data Type Object the enum_type depends on.
OptionalSize getDeserializedBytePos | ( | size_t | array_pos = 0 | ) | const |
Get the Deserialized Byte Pos This position is always invalid for positions after a dynamic content (isAfterDynamic)
array_pos | this ould calculate and return the deserialized pos for the aligned array pos. |
OptionalSize getDeserializedByteSize | ( | ) | const |
Get the Deserialized Byte Size always aligned, depending on the struct_ddl_version.
size_t getDeserializedTypeAlignedByteSize | ( | ) | const |
Get the Deserialized Type Byte Size usually this is the same like getDeserializedByteSize, but only for array_size = 1 usually this is the size for all elements of an array except the last one on struct_ddl_version >= 3.0.
size_t getDeserializedTypeByteSize | ( | ) | const |
Get the Deserialized Type Byte Size usually this is the same like getDeserializedByteSize, but only for array_size = 1 always aligned, depending on the struct_ddl_version >= 3.0.
std::shared_ptr<const datamodel::EnumType> getEnumType | ( | ) | const |
Get the Enum Type object.
OptionalSize getSerializedBitOffset | ( | size_t | array_pos = 0 | ) | const |
Get the Serialized Bit Pos of the element as bit offset to the beginning of the struct This position is always invalid for positions after a dynamic content (isAfterDynamic)
array_pos | the position in the array to calculate the offset for |
size_t getSerializedBitSize | ( | ) | const |
Get the Serialized Bit Size.
OptionalSize getSerializedBytePos | ( | size_t | array_pos = 0 | ) | const |
Get the Serialized Byte Pos This position is always invalid for positions after a dynamic content (isAfterDynamic)
array_pos | the position in the array to calculate the offset for |
size_t getSerializedTypeBitSize | ( | ) | const |
Get the Serialized Type Bit Size.
std::shared_ptr<const datamodel::StructType> getStructType | ( | ) | const |
Get the Struct Type Object.
TypeOfType getTypeOfType | ( | ) | const |
Get the Type Of Type object Fast access to the type information.
bool isAfterDynamic | ( | ) | const |
The element is after a dynamic content.
All positions can only be calculated if the sizes of the elements before are known.
bool isDynamic | ( | ) | const |
Determines if the element itself or if it is element of a struct_type defines a dynamic array.
bool isValid | ( | ) | const |
Determines if all size can be calculated, all references are known and the dependencies are well defined.
Usually the ddl::dd::DataDefinition implementation prevent this, but
void update | ( | datamodel::StructType::Element & | element, |
const std::shared_ptr< datamodel::StructType::Element > & | previous_element, | ||
const Version & | struct_ddl_version, | ||
datamodel::DataDefinition & | parent_dd | ||
) |
Updates all information of the element.
This will recalculate the infomation and set the byte position and type references if valid.
element | the element to create the information for |
previous_element | the previous element |
struct_ddl_version | the language version set in the parent struct type (this influences the alignmend etc.) |
parent_dd | the parent DD to retrieve all dependencies. |
bool updateReference | ( | const datamodel::StructType::Element & | element, |
datamodel::DataDefinition & | parent_dd | ||
) |
Updates the current type reference to the new model.
element | the element corresponding to the current element type info |
parent_dd | the parent DD to retrieve all dependencies. |