Dev Essential
Loading...
Searching...
No Matches
ddl::codec::ElementIterator< ElementAccessType > Class Template Reference

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!)
 

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)

Constructor & Destructor Documentation

◆ ElementIterator()

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

CTOR for one element.

Parameters
elementthe element.

Member Function Documentation

◆ operator!=()

template<typename ElementAccessType>
bool ddl::codec::ElementIterator< ElementAccessType >::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

◆ operator*() [1/2]

template<typename ElementAccessType>
reference ddl::codec::ElementIterator< ElementAccessType >::operator* ( )
inline

defering access (check for end!)

Returns
const reference

◆ operator*() [2/2]

template<typename ElementAccessType>
const_reference ddl::codec::ElementIterator< ElementAccessType >::operator* ( ) const
inline

defering access (check for end!)

Returns
const reference

◆ operator++() [1/2]

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

increasing operator to the next position.

Returns
self_type

◆ operator++() [2/2]

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

iterator increasing.

Returns
self_type

◆ operator->() [1/2]

template<typename ElementAccessType>
pointer ddl::codec::ElementIterator< ElementAccessType >::operator-> ( )
inline

pointer access (check for end!)

Returns
const pointer

◆ operator->() [2/2]

template<typename ElementAccessType>
const_pointer ddl::codec::ElementIterator< ElementAccessType >::operator-> ( ) const
inline

pointer access (check for end!)

Returns
const pointer

◆ operator==()

template<typename ElementAccessType>
bool ddl::codec::ElementIterator< ElementAccessType >::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

The documentation for this class was generated from the following file: