ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ElementIterator< ElementAccessType >

The element iterator. More...

#include <codec_iterator.h>

Public Types

using element_type = typename ElementAccessType::element_type
 The element type in use.
 
using value_type = element_type
 Value type of the iterator.
 
using reference = value_type&
 Reference value type.
 
using const_reference = const value_type&
 const reference value type
 
using pointer = value_type*
 Pointer type.
 
using const_pointer = const value_type*
 pointer to const data value type
 
using difference_type = int
 difference value type
 
using iterator_category = std::forward_iterator_tag
 iterator type
 

Public Member Functions

 ElementIterator ()=delete
 default CTOR
 
 ElementIterator (value_type &&element)
 CTOR for one element.
 
ElementIteratoroperator++ ()
 increasing operator to the next position.
 
ElementIterator operator++ (int)
 iterator increasing.
 
bool operator== (const ElementIterator &rhs) const
 checks for equality (refering the same element!)
 
bool operator!= (const ElementIterator &rhs) const
 checks for not equality (does not refer the same element!)
 
const_reference operator* () const
 defering access (check for end!)
 
const_pointer operator-> () const
 pointer access (check for end!)
 
reference operator* ()
 defering access (check for end!)
 
pointer operator-> ()
 pointer access (check for end!)
 

Private Member Functions

void next ()
 

Private Attributes

element_type _element
 

Detailed Description

template<typename ElementAccessType>
class ddl::codec::ElementIterator< ElementAccessType >

The element iterator.

See also
ChildElements.
Template Parameters
ElementAccessTypeThe element access concept type. (see concept templates FactoryElementAccess, DecoderElementAccess, CodecElementAccess)

Definition at line 42 of file codec_iterator.h.

Member Typedef Documentation

◆ const_pointer

template<typename ElementAccessType>
using const_pointer = const value_type*

pointer to const data value type

Definition at line 49 of file codec_iterator.h.

◆ const_reference

template<typename ElementAccessType>
using const_reference = const value_type&

const reference value type

Definition at line 47 of file codec_iterator.h.

◆ difference_type

template<typename ElementAccessType>
using difference_type = int

difference value type

Definition at line 50 of file codec_iterator.h.

◆ element_type

template<typename ElementAccessType>
using element_type = typename ElementAccessType::element_type

The element type in use.

Definition at line 44 of file codec_iterator.h.

◆ iterator_category

template<typename ElementAccessType>
using iterator_category = std::forward_iterator_tag

iterator type

Definition at line 51 of file codec_iterator.h.

◆ pointer

template<typename ElementAccessType>
using pointer = value_type*

Pointer type.

Definition at line 48 of file codec_iterator.h.

◆ reference

template<typename ElementAccessType>
using reference = value_type&

Reference value type.

Definition at line 46 of file codec_iterator.h.

◆ value_type

template<typename ElementAccessType>
using value_type = element_type

Value type of the iterator.

Definition at line 45 of file codec_iterator.h.

Constructor & Destructor Documentation

◆ ElementIterator()

template<typename ElementAccessType>
ElementIterator ( value_type && element)
inline

CTOR for one element.

Parameters
elementthe element.

Definition at line 62 of file codec_iterator.h.

Member Function Documentation

◆ next()

template<typename ElementAccessType>
void next ( )
inlineprivate

Definition at line 146 of file codec_iterator.h.

◆ operator!=()

template<typename ElementAccessType>
bool operator!= ( const ElementIterator< ElementAccessType > & rhs) const
inline

checks for not equality (does not refer the same element!)

Parameters
rhsthe other iterator
Returns
true is not equal
false is equal

Definition at line 104 of file codec_iterator.h.

References ElementIterator().

◆ operator*() [1/2]

template<typename ElementAccessType>
reference operator* ( )
inline

defering access (check for end!)

Returns
const reference

Definition at line 131 of file codec_iterator.h.

◆ operator*() [2/2]

template<typename ElementAccessType>
const_reference operator* ( ) const
inline

defering access (check for end!)

Returns
const reference

Definition at line 113 of file codec_iterator.h.

◆ operator++() [1/2]

template<typename ElementAccessType>
ElementIterator & operator++ ( )
inline

increasing operator to the next position.

Returns
self_type

Definition at line 70 of file codec_iterator.h.

References ElementIterator().

◆ operator++() [2/2]

template<typename ElementAccessType>
ElementIterator operator++ ( int )
inline

iterator increasing.

Returns
self_type

Definition at line 80 of file codec_iterator.h.

References ElementIterator().

◆ operator->() [1/2]

template<typename ElementAccessType>
pointer operator-> ( )
inline

pointer access (check for end!)

Returns
const pointer

Definition at line 140 of file codec_iterator.h.

◆ operator->() [2/2]

template<typename ElementAccessType>
const_pointer operator-> ( ) const
inline

pointer access (check for end!)

Returns
const pointer

Definition at line 122 of file codec_iterator.h.

◆ operator==()

template<typename ElementAccessType>
bool operator== ( const ElementIterator< ElementAccessType > & rhs) const
inline

checks for equality (refering the same element!)

Parameters
rhsthe other iterator
Returns
true is equal
false is not equal

Definition at line 93 of file codec_iterator.h.

References ElementIterator().

Member Data Documentation

◆ _element

template<typename ElementAccessType>
element_type _element
private

Definition at line 150 of file codec_iterator.h.