15#ifndef DDL_CODEC_INDEX_CLASS_HEADER
16#define DDL_CODEC_INDEX_CLASS_HEADER
411 friend class StructAccess;
412 friend class ChildElementAccess;
413 template <
typename ElementAccessType,
typename ChildElementsType>
414 friend class FactoryElement;
415 template <
typename ElementAccessType,
typename ChildElementsType>
416 friend class DecoderElement;
417 template <
typename ElementAccessType,
typename ChildElementsType>
418 friend class CodecElement;
419 template <
typename ElementAccessType>
420 friend class ChildElements;
426 CodecIndex(
const std::vector<ElementIndex>& indexes);
437 void reserve(
size_t size);
440 CodecIndex getIndexForArrayPos(
size_t array_pos) const;
445 bool _layout_valid = {};
The constant info of a element.
Definition codec_type_info.h:138
The default value info of a element.
Definition codec_type_info.h:173
The element index at the CodecIndex.
Definition codec_index.h:282
ElementIndex(size_t element_index)
CTOR.
bool operator!=(const ElementIndex &other) const
Not equal operator.
size_t getIndex() const
Get the Index.
ElementIndex(size_t element_index, size_t array_pos)
CTOR.
static constexpr size_t _invalid_element_index
Invalid element index.
Definition codec_index.h:342
size_t getArrayPos() const
Get the Array Pos.
ElementIndex()=default
CTOR.
ElementIndex & operator++()
Incrememts the index, keeps array pos.
static constexpr size_t _invalid_array_pos
Invalid array pos.
Definition codec_index.h:346
bool operator==(const ElementIndex &other) const
equal operator.
Definition codec_index.h:276
bool operator==(const CodecIndex &other) const
Equal operator.
ElementType getType() const
Get the elements type if CodecIndex is valid.
const ElementIndex & operator[](size_t pos) const
Access operator to retrieve a elment index on the given pos.
bool hasLayout() const
Has layout set.
bool operator!=(const CodecIndex &other) const
Not equal operator.
CodecIndex()=default
Construct a new Codec Index.
size_t getSize() const
Get the Size of the codec index in element index count.
const ElementLayout & getLayout() const
Get the Layout.
size_t size() const
Gets the Size of the codec index in element index count for generic programming.
Description of the elements Type.
Definition codec_type_info.h:61
ddl::Position Position
Definition codec_index.h:69
ElementType
The element type of the value.
Definition codec_type_info.h:30
std::string toString(const CodecIndex &index)
Converts the index to a string.
ByteOrder
Definition dd_common_types.h:152
definition of the ddl namespace
Definition codec.h:21
Definition codec_index.h:28
constexpr bool operator==(const Position &other) const noexcept
Equality operator.
Definition codec_index.h:45
constexpr bool operator!=(const Position &other) const noexcept
Non-Equality operator.
Definition codec_index.h:56
size_t bit_size
the elements bitsize (the whole element)
Definition codec_index.h:36
size_t bit_offset
the bit offset
Definition codec_index.h:32
Definition codec_index.h:174
constexpr bool operator==(const ElementLayoutBase &other) const noexcept
Equality operator.
Definition codec_index.h:215
PositionWithAlignedTypeSize deserialized
deserialized position.
Definition codec_index.h:178
PositionWithUsedBitsTypeSize serialized
serialized position.
Definition codec_index.h:182
const CodecConstantInfo * constant_info
Pointer to the constant_info if the value is a constant.
Definition codec_index.h:202
const CodecDefaultValueInfo * default_value_info
Pointer to the default_value_info if the value has a default value set.
Definition codec_index.h:206
size_t child_element_count
The child element count.
Definition codec_index.h:194
size_t array_size
Array size of the element value.
Definition codec_index.h:190
constexpr bool operator!=(const ElementLayoutBase &other) const noexcept
Non-Equality operator.
Definition codec_index.h:230
const CodecTypeInfo * type_info
Pointer to the type_info.
Definition codec_index.h:198
ddl::dd::ByteOrder byte_order
Byte order of the element value.
Definition codec_index.h:186
Definition codec_index.h:239
constexpr bool operator==(const ElementLayout &other) const noexcept
Equality operator.
Definition codec_index.h:252
size_t array_pos
The array position of the element.
Definition codec_index.h:243
constexpr bool operator!=(const ElementLayout &other) const noexcept
Non-Equality operator.
Definition codec_index.h:263
Definition codec_index.h:106
constexpr bool operator!=(const PositionWithAlignedTypeSize &other) const noexcept
Non-Equality operator.
Definition codec_index.h:131
constexpr bool operator==(const PositionWithAlignedTypeSize &other) const noexcept
Equality operator.
Definition codec_index.h:119
size_t type_bit_size_aligned
aligned type size in bits
Definition codec_index.h:110
Definition codec_index.h:74
constexpr bool operator==(const PositionWithTypeSize &other) const noexcept
Equality operator.
Definition codec_index.h:87
size_t type_bit_size
type size in bits (in case of array, this is the size of one element within the array)
Definition codec_index.h:78
constexpr bool operator!=(const PositionWithTypeSize &other) const noexcept
Non-Equality operator.
Definition codec_index.h:98
Definition codec_index.h:140
constexpr bool operator!=(const PositionWithUsedBitsTypeSize &other) const noexcept
Non-Equality operator.
Definition codec_index.h:165
size_t type_bit_size_used
type size in bits which is used (may be a bitfield)
Definition codec_index.h:144
constexpr bool operator==(const PositionWithUsedBitsTypeSize &other) const noexcept
Equality operator.
Definition codec_index.h:153