15 #ifndef DD_DDL_STRUCT_ACCESS_H_INCLUDED
16 #define DD_DDL_STRUCT_ACCESS_H_INCLUDED
26 class ElementTypeInfo;
27 class StructTypeAccess;
78 operator bool()
const;
223 std::shared_ptr<const datamodel::StructType::Element> _element = {};
414 operator bool()
const;
484 std::shared_ptr<const datamodel::StructType> _struct_type;
491 const TypeInfo* _type_info =
nullptr;
The Data Definiton class uses the validation model to keep a Data Definition datamodel (ddl::dd::data...
Element Size Info is important to get the calculate the TypeInfo for StructType.
Class to access and obtain the byte position and other information of a instance of this element with...
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::DataD...
bool isAfterDynamic() const
The element is on a byte position after a dynamic element, the byte position can not be calculated un...
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.
StructTypeAccess getStructTypeAccess(size_t array_pos=0) const
Get the Struct Type Access if the element depends on a structtype.
size_t getSerializedBitSize() const
Get the serialized Bit size of the value.
std::shared_ptr< const datamodel::StructType > getStructType() const
Gets the Struct Type if the element is dependent on a structtype.
size_t getDeserializedByteSize() const
Get the Byte size (depends on alignments, ddlversion and arraysize)
const datamodel::StructType::Element & getElement() const
Get the Element Information which is also part of the data definition.
size_t getSerializedBitOffset(size_t array_size=0) const
Get SerializedBitOsset obtained by dd::DataDefinition::getStructTypeAccess.
bool isDynamic() const
Retieve information if this element is a dynamic array.
size_t getSerializedBytePos(size_t array_size=0) const
Get SerializedBytePos obtained by dd::DataDefinition::getStructTypeAccess.
StructElementAccess & operator=(StructElementAccess &&)=default
Default move assignment.
OptionalSize getArrayPos() const
Get the Array Pos, if this element was retrieved via StructTypeAccess::getElementByPath and the opera...
TypeOfType getTypeOfType() const
Get the Type Of the type.
size_t getSerializedTypeBitSize() const
Get the serialized bit size of one element.
StructElementAccess & operator=(const StructElementAccess &)=default
Default copy assignment.
StructElementAccess()=delete
deleted CTOR
StructElementAccess(const StructElementAccess &)=default
Default copy CTOR.
size_t getDeserializedTypeByteSize() const
Get the Serialized Type Byte size.
StructElementAccess(std::nullptr_t)
empty element access.
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.
StructElementAccess(StructElementAccess &&)=default
Default move CTOR.
Iterator to iterate thru the StructTypeAccess.
const_pointer operator->() const
pointer access (check for end!)
self_type operator++()
increasing operator to the next position.
bool operator==(const self_type &rhs) const
checks for equality (refering the same element!)
std::forward_iterator_tag iterator_category
iterator type definition
bool operator!=(const self_type &rhs) const
checks for not equality (does not refer the same element!)
const StructElementAccess & const_reference
const reference value type definition
StructElementAccess * pointer
pointer value type definition
StructElementAccessIterator self_type
this iterator type definition
StructElementAccessIterator(datamodel::StructType::Elements::const_iterator other_it, datamodel::StructType::Elements::const_iterator end_it, OptionalSize struct_ser, OptionalSize struct_deser)
Construct a new Struct Element Access Iterator.
const StructElementAccess * const_pointer
pointer to const data value type definition
self_type operator++(int junk)
iterator increasing.
const_reference operator*() const
defering access (check for end!)
StructElementAccess value_type
iterator value type definition
int difference_type
difference value type definition
StructElementAccess & reference
reference value type definition
Accessing class for a instance of a struct.
StructTypeAccess(const std::shared_ptr< const datamodel::StructType > &struct_type)
Construct a new Struct Type Access object.
const datamodel::StructType & getStructType() const
Get the Struct Type it refers to (for data definition information)
const_iterator begin() const
constant range based iterator access
size_t getStaticSerializedBitSize() const
Get the known bitsize of this instance (this is usually the last position + sizeof last element)
const_iterator cbegin() const
constant iterator access
StructTypeAccess(std::nullptr_t)
Construct a empty Struct Type Access.
size_t getStaticUnalignedStructSize() const
Get the known unaligned Static Struct Size of this instance (this is usually the last position + size...
size_t getStaticStructSize() const
Get the known Static Struct Size of this instance.
StructElementAccess getElementByPath(const std::string name_path) const
Get the StructElementAccess information class by path.
StructTypeAccess & operator=(StructTypeAccess &&)=default
Move assignment operator.
bool isDynamic() const
retrieves information if it contains dynamic elements and so has dynamic size.
const_iterator cend() const
constant end iterator
StructTypeAccess & operator=(const StructTypeAccess &)=default
Copy CTOR.
const_iterator end() const
constant range based end iterator
StructTypeAccess()=delete
default CTOR is deleted
StructTypeAccess(const std::shared_ptr< const datamodel::StructType > &struct_type, OptionalSize serialized_struct_offset, OptionalSize deserialized_struct_offset)
Construct a new Struct Type Access object.
const StructElementAccessIterator const_iterator
iterator type of this struct
StructTypeAccess(const StructTypeAccess &)=default
copy assignment operator
StructTypeAccess(StructTypeAccess &&)=default
Move CTOR.
observable DataDefinition object class for a Element of a StructType.
observable DataDefinition object class to describe StructType.
container_type::const_iterator const_iterator
local definition of the container const_iterator
OO DataDefinition Redesign.
TypeOfType
Classification of a Type.
@ struct_type
the type is a struct type (StructType)
utility::Optional< size_t > OptionalSize
Optional Size Type.
definition of the ddl namespace