|
ADTF
|
Class to access and obtain the byte position and other information of a instance of this element within a struct (see StructTypeAccess). More...
#include <dd_struct_access.h>
Public Types | |
| typedef StructArrayElementAccessIterator | const_iterator |
| this is the const iterator type definition for the array elements of this element access. | |
Public Member Functions | |
| StructElementAccess ()=delete | |
| deleted CTOR | |
| StructElementAccess (StructElementAccess &&) noexcept | |
| Default move CTOR. | |
| StructElementAccess & | operator= (StructElementAccess &&) noexcept |
| Default move assignment. | |
| StructElementAccess (const StructElementAccess &) | |
| Default copy CTOR. | |
| StructElementAccess & | operator= (const StructElementAccess &) |
| Default copy assignment. | |
| 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. | |
| ~StructElementAccess () | |
| DTOR. | |
| operator bool () const | |
| Retrieve if the StructElementAccess is valid or not! | |
| TypeOfType | getTypeOfType () const |
| Get the Type Of the type. Retrieves the information of the elements type. | |
| std::string | getName () const |
| std::shared_ptr< const datamodel::StructType > | getStructType () const |
| Gets the Struct Type if the element is dependent on a structtype. | |
| std::shared_ptr< const datamodel::EnumType > | getEnumType () const |
| Gets the Enum Type if the element is dependent on a enumtype. | |
| std::shared_ptr< const datamodel::DataType > | getDataType () const |
| Gets the Data Type if the element is dependent on a datatype. | |
| 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. | |
| bool | isStruct () const |
| Determines if the element is an struct type. | |
| bool | isLeaf () const |
| Determines if the element is a leaf type (no struct, no array). | |
| bool | isArray () const |
| Determines if the element is an array type. | |
| size_t | getArraySize () const |
| Retrieves the array size if the element is an static array type. | |
| StructElementAccess | getArrayElement (size_t array_pos=0) const |
| Retrieves an element with byte and bit offsets for the given array position. | |
| const datamodel::StructType::Element & | getElement () const |
| Get the Element Information which is also part of the data definition. | |
| bool | isDynamic () const |
| Retieve information if this element is a dynamic array. | |
| 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. | |
| OptionalSize | getArrayPos () const |
| Get the Array Pos, if this element was retrieved via StructTypeAccess::getElementByPath and the operator[]. | |
| size_t | getDeserializedBytePos (size_t array_pos=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. | |
| size_t | getDeserializedTypeAlignedByteSize () const |
| Get the Serialized Type Byte size aligned. | |
| size_t | getSerializedBytePos (size_t array_pos=0) const |
| Get SerializedBytePos obtained by dd::DataDefinition::getStructTypeAccess. | |
| size_t | getSerializedBitOffset (size_t array_pos=0) const |
| Get SerializedBitOffset. | |
| size_t | getSerializedBitSize () const |
| Get the serialized Bit size of the value. | |
| size_t | getSerializedTypeBitSize () const |
| Get the serialized bit size of one element. | |
| bool | hasValidElementCount () const |
| const std::string & | getValidElementCount () const |
| const_iterator | cbegin () const |
| Get the begin const iterator to the array elements of this element access. | |
| const_iterator | cend () const |
| Get the end const iterator to the array elements of this element access. | |
| const_iterator | begin () const |
| Get the begin const iterator to the array elements of this element access. | |
| const_iterator | end () const |
| Get the end const iterator to the array elements of this element access. | |
Friends | |
| class | StructTypeAccess |
| class | StructElementAccessIterator |
| class | StructArrayElementAccessIterator |
Class to access and obtain the byte position and other information of a instance of this element within a struct (see StructTypeAccess).
Consider getLeafLayout functionality to retrieve a leaf layout structure for this element if it is a leaf element. This enables fast access to the content with ddl::codec::ValueSetter::setLeafValue, ddl::codec::ValueGetter::getLeafValue on a memory buffer.
| ddl::dd::StructElementAccess::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.
| const_iterator ddl::dd::StructElementAccess::begin | ( | ) | const |
Get the begin const iterator to the array elements of this element access.
| const_iterator ddl::dd::StructElementAccess::cbegin | ( | ) | const |
Get the begin const iterator to the array elements of this element access.
| const_iterator ddl::dd::StructElementAccess::cend | ( | ) | const |
Get the end const iterator to the array elements of this element access.
| const_iterator ddl::dd::StructElementAccess::end | ( | ) | const |
Get the end const iterator to the array elements of this element access.
| StructElementAccess ddl::dd::StructElementAccess::getArrayElement | ( | size_t | array_pos = 0 | ) | const |
Retrieves an element with byte and bit offsets for the given array position.
| array_pos | the array position to retrieve the element access for (default is 0) |
| OptionalSize ddl::dd::StructElementAccess::getArrayPos | ( | ) | const |
Get the Array Pos, if this element was retrieved via StructTypeAccess::getElementByPath and the operator[].
| size_t ddl::dd::StructElementAccess::getArraySize | ( | ) | const |
Retrieves the array size if the element is an static array type.
| 0 | if it is an dynamic array type |
| 1 | or above if it is an static array type or a single element (array size = 1) |
| std::shared_ptr< const datamodel::DataType > ddl::dd::StructElementAccess::getDataType | ( | ) | const |
Gets the Data Type if the element is dependent on a datatype.
| size_t ddl::dd::StructElementAccess::getDeserializedBytePos | ( | size_t | array_pos = 0 | ) | const |
Get the Deserialized Byte Pos relative to the first byte position of the struct obtained by dd::DataDefinition::getStructTypeAccess.
| size_t ddl::dd::StructElementAccess::getDeserializedByteSize | ( | ) | const |
Get the Byte size (depends on alignments, ddlversion and arraysize)
| size_t ddl::dd::StructElementAccess::getDeserializedTypeAlignedByteSize | ( | ) | const |
Get the Serialized Type Byte size aligned.
| size_t ddl::dd::StructElementAccess::getDeserializedTypeByteSize | ( | ) | const |
Get the Serialized Type Byte size.
| const datamodel::StructType::Element & ddl::dd::StructElementAccess::getElement | ( | ) | const |
Get the Element Information which is also part of the data definition.
| std::shared_ptr< const datamodel::EnumType > ddl::dd::StructElementAccess::getEnumType | ( | ) | const |
Gets the Enum Type if the element is dependent on a enumtype.
| std::string ddl::dd::StructElementAccess::getName | ( | ) | const |
Retrieves the name of the element. if the element is part of an array, the name contains also the array position.
| size_t ddl::dd::StructElementAccess::getSerializedBitOffset | ( | size_t | array_pos = 0 | ) | const |
Get SerializedBitOffset.
| size_t ddl::dd::StructElementAccess::getSerializedBitSize | ( | ) | const |
Get the serialized Bit size of the value.
| size_t ddl::dd::StructElementAccess::getSerializedBytePos | ( | size_t | array_pos = 0 | ) | const |
Get SerializedBytePos obtained by dd::DataDefinition::getStructTypeAccess.
| size_t ddl::dd::StructElementAccess::getSerializedTypeBitSize | ( | ) | const |
Get the serialized bit size of one element.
| std::shared_ptr< const datamodel::StructType > ddl::dd::StructElementAccess::getStructType | ( | ) | const |
Gets the Struct Type if the element is dependent on a structtype.
| StructTypeAccess ddl::dd::StructElementAccess::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.
| array_pos | the array position to retrieve the struct type access for (default is 0) an array_pos of static_cast<size_t>(-1) can be used to retrieve an StructTypeAccess, where all offsets are reset to 0. |
| TypeOfType ddl::dd::StructElementAccess::getTypeOfType | ( | ) | const |
Get the Type Of the type. Retrieves the information of the elements type.
| TypeOfType |
| const std::string & ddl::dd::StructElementAccess::getValidElementCount | ( | ) | const |
Retrieves the name of the valid element count (if not applicable, an empty string is returned)
| bool ddl::dd::StructElementAccess::hasValidElementCount | ( | ) | const |
Determines if the element has a valid element count (not dynamic)
| bool ddl::dd::StructElementAccess::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 ddl::dd::StructElementAccess::isArray | ( | ) | const |
Determines if the element is an array type.
| bool ddl::dd::StructElementAccess::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. |
| bool ddl::dd::StructElementAccess::isLeaf | ( | ) | const |
Determines if the element is a leaf type (no struct, no array).
| bool ddl::dd::StructElementAccess::isStruct | ( | ) | const |
Determines if the element is an struct type.
| ddl::dd::StructElementAccess::operator bool | ( | ) | const |
Retrieve if the StructElementAccess is valid or not!
| true | is valid |
| false | is not valid |
| StructElementAccess & ddl::dd::StructElementAccess::operator= | ( | const StructElementAccess & | ) |
Default copy assignment.
|
noexcept |
Default move assignment.