ADTF  3.14.3
iterator_adapter< T, IteratorType >

Adapter for begin and end iterators - usable as return and parameter value in interfaces. More...

Public Types

typedef T value_type
 value type
 
typedef iterator_adapter< value_type, IteratorType > self_type
 self type
 
typedef IteratorType< const value_typeconst_iterator
 const iterator type
 
typedef std::conditional< std::is_const< value_type >::value, const_iterator, IteratorType< value_type > >::type iterator
 iterator type
 

Public Member Functions

iterator begin () const
 Get iterator to the beginning of the container sequence (STL compliant) More...
 
iterator end () const
 Get iterator to the end of the container sequence (STL compliant) More...
 
const_iterator cbegin () const
 Get const iterator to the beginning of the container sequence (STL compliant) More...
 
const_iterator cend () const
 Get const iterator to the end of the container sequence (STL compliant) More...
 

Static Private Member Functions

template<typename IteratorInterfaceType >
static self_type create (IteratorInterfaceType &o_oIterator)
 Create the adapter by assigning iterator interface to begin and end iterators. More...
 

Private Attributes

iterator m_oBegin
 iterator to the beginning of the containers sequence
 
iterator m_oEnd
 iterator to past the last element of the container sequence
 

Detailed Description

template<typename T, template< typename > class IteratorType = forward_iterator>
struct adtf::ucom::ant::iterator_adapter< T, IteratorType >

Adapter for begin and end iterators - usable as return and parameter value in interfaces.

Template Parameters
TValue type of the container both end and begin iterators operate on
IteratorTypeActual type of the iterator - must be POD type

Definition at line 189 of file iterator_intf.h.

Member Function Documentation

◆ begin()

iterator begin ( ) const
inline

Get iterator to the beginning of the container sequence (STL compliant)

Returns
Iterator to the beginning of the container sequence

Definition at line 204 of file iterator_intf.h.

References iterator_adapter< T, IteratorType >::m_oBegin.

Referenced by iterator_adapter< T, IteratorType >::cbegin(), and iterator_adapter< T, pointer_iterator >::cbegin().

◆ cbegin()

const_iterator cbegin ( ) const
inline

Get const iterator to the beginning of the container sequence (STL compliant)

Returns
Const iterator to the beginning of the container sequence

Definition at line 216 of file iterator_intf.h.

References iterator_adapter< T, IteratorType >::begin().

◆ cend()

const_iterator cend ( ) const
inline

Get const iterator to the end of the container sequence (STL compliant)

Returns
Const iterator to the end of the container sequence

Definition at line 222 of file iterator_intf.h.

References iterator_adapter< T, IteratorType >::end().

◆ create()

static self_type create ( IteratorInterfaceType &  o_oIterator)
inlinestaticprivate

Create the adapter by assigning iterator interface to begin and end iterators.

Template Parameters
IteratorInterfaceTypeIterator interface used to traverse the container sequence. Must correspond to the IteratorType of this class template.
Parameters
[in]o_oIteratorInstance of the iterator interface used to traverse the container
Returns
Correctly assigned instance of self_type

Definition at line 236 of file iterator_intf.h.

References iterator_adapter< T, IteratorType >::m_oBegin, and iterator_adapter< T, IteratorType >::m_oEnd.

Referenced by adtf_version_default::GetVersions(), and adtf_version_customer< CUSTOMER_VERSION >::GetVersions().

◆ end()

iterator end ( ) const
inline

Get iterator to the end of the container sequence (STL compliant)

Returns
Iterator to the end of the container sequence

Definition at line 210 of file iterator_intf.h.

References iterator_adapter< T, IteratorType >::m_oEnd.

Referenced by iterator_adapter< T, IteratorType >::cend(), and iterator_adapter< T, pointer_iterator >::cend().


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)