ADTF  3.18.2
CodecIndex::ElementIndex

The element index at the CodecIndex. More...

Public Member Functions

 ElementIndex ()=default
 CTOR.
 
 ElementIndex (size_t element_index)
 CTOR. More...
 
 ElementIndex (size_t element_index, size_t array_pos)
 CTOR. More...
 
bool operator== (const ElementIndex &other) const
 equal operator. More...
 
bool operator!= (const ElementIndex &other) const
 Not equal operator. More...
 
size_t getIndex () const
 Get the Index. More...
 
size_t getArrayPos () const
 Get the Array Pos. More...
 
ElementIndexoperator++ ()
 Incrememts the index, keeps array pos. More...
 

Static Public Attributes

static constexpr size_t _invalid_element_index = static_cast<size_t>(-1)
 Invalid element index.
 
static constexpr size_t _invalid_array_pos = static_cast<size_t>(-1)
 Invalid array pos.
 

Private Attributes

size_t _element_index = _invalid_element_index
 
size_t _array_pos = _invalid_array_pos
 

Detailed Description

The element index at the CodecIndex.

Definition at line 138 of file codec_index.h.

Constructor & Destructor Documentation

◆ ElementIndex() [1/2]

ElementIndex ( size_t  element_index)

CTOR.

Parameters
element_indexThe index to set, array_pos 0 is forced

◆ ElementIndex() [2/2]

ElementIndex ( size_t  element_index,
size_t  array_pos 
)

CTOR.

Parameters
element_indexThe index to set
array_posThe array_pos to set

Member Function Documentation

◆ getArrayPos()

size_t getArrayPos ( ) const

Get the Array Pos.

Returns
size_t

◆ getIndex()

size_t getIndex ( ) const

Get the Index.

Returns
size_t

◆ operator!=()

bool operator!= ( const ElementIndex other) const

Not equal operator.

Parameters
otherThe element index to compare.
Returns
true if not equal
false if equal

◆ operator++()

ElementIndex& operator++ ( )

Incrememts the index, keeps array pos.

Returns
ElementIndex&

◆ operator==()

bool operator== ( const ElementIndex other) const

equal operator.

Parameters
otherThe element index to compare.
Returns
true if equal
false if not equal