Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R > Class Template Reference

Implementation of a circular iterator. More...

#include <CircularIteratorImpl.h>

Inheritance diagram for UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >:
Inheritance graph
Collaboration diagram for UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >:
Collaboration graph

Public Types

using type = CircularIterator< T, V, P, R >
 
using base_type = T
 

Public Member Functions

 CircularIterator (base_type b, base_type e, base_type i)
 Constructor requires range and start value. More...
 
base_type get () const
 Return underlying base type iterator. More...
 
 operator base_type () const
 Conversion to return iterator to its base type. More...
 
typeoperator= (const base_type &i)
 Assignment operator from base type to circularized iterator. More...
 
type::reference operator* () const
 Dereferencing operator. More...
 
type::pointer operator-> () const
 Structure dereferencing operator. More...
 
typeoperator++ ()
 Pre-increment operator works circularly: at the end of the range it jumps back to the beginning and keeps going. More...
 
type operator++ (int)
 Post-increment operator works circularly: at the end of the range it jumps back to the beginning and keeps going. More...
 
typeoperator-- ()
 Pre-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps going. More...
 
type operator-- (int)
 Post-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps going. More...
 
bool operator== (const type &rhs) const
 Equality test of the pointing iterator only, not of the range iterators. More...
 
bool operator== (const base_type &rhs) const
 Equality test of the pointing iterator only, not of the range iterators. More...
 
bool operator!= (const type &rhs) const
 Inequality test of the pointing iterator only, not of the range iterators. More...
 
bool operator!= (const base_type &rhs) const
 Inequality test of the pointing iterator only, not of the range iterators. More...
 

Protected Attributes

base_type m_begin
 
base_type m_end
 
base_type m_it
 

Detailed Description

template<typename T, typename V, typename P = V*, typename R = V&>
class UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >

Implementation of a circular iterator.

It will provide both const and non-const iterator.

Template parameters: T iterator type that gets wrapped to be circular. V value type of iterator T (and hence of its container). P pointer-to-V type (can be const qualified). R reference-to-V type (can be const qualified).

Definition at line 37 of file CircularIteratorImpl.h.

Member Typedef Documentation

template<typename T, typename V, typename P = V*, typename R = V&>
using UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::type = CircularIterator<T, V, P, R>

Definition at line 45 of file CircularIteratorImpl.h.

template<typename T, typename V, typename P = V*, typename R = V&>
using UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::base_type = T

Definition at line 46 of file CircularIteratorImpl.h.

Constructor & Destructor Documentation

template<typename T, typename V, typename P = V*, typename R = V&>
UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::CircularIterator ( base_type  b,
base_type  e,
base_type  i 
)
inline

Constructor requires range and start value.

Parameters
bbegin iterator of the range
eend iterator of the range
istart iterator of circular sequencing

Definition at line 54 of file CircularIteratorImpl.h.

Member Function Documentation

template<typename T, typename V, typename P = V*, typename R = V&>
base_type UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::get ( ) const
inline

Return underlying base type iterator.

Returns
current value of iterator

Definition at line 60 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator base_type ( ) const
inlineexplicit

Conversion to return iterator to its base type.

Returns
current value of iterator

Definition at line 66 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
type& UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator= ( const base_type i)
inline

Assignment operator from base type to circularized iterator.

Returns
reference to iterator

Definition at line 72 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
type::reference UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator* ( ) const
inline

Dereferencing operator.

@ return reference (const / non-const depending on template parameters) to value pointed to by iterator.

Definition at line 83 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

Referenced by UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator->().

Here is the caller graph for this function:

template<typename T, typename V, typename P = V*, typename R = V&>
type::pointer UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator-> ( ) const
inline

Structure dereferencing operator.

Returns
pointer (const / non-const depending on template parameters) to value pointed to by iterator.

Definition at line 90 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator*().

Here is the call graph for this function:

template<typename T, typename V, typename P = V*, typename R = V&>
type& UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator++ ( )
inline

Pre-increment operator works circularly: at the end of the range it jumps back to the beginning and keeps going.

Returns
iterator after (circular) increment

Definition at line 97 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_begin, UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_end, and UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
type UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator++ ( int  )
inline

Post-increment operator works circularly: at the end of the range it jumps back to the beginning and keeps going.

Returns
iterator before (circular) increment

Definition at line 111 of file CircularIteratorImpl.h.

template<typename T, typename V, typename P = V*, typename R = V&>
type& UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator-- ( )
inline

Pre-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps going.

Returns
iterator after (circular) decrement

Definition at line 123 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_begin, UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_end, and UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
type UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator-- ( int  )
inline

Post-decrement operator works circularly: at the beginning of the range it jumps to the end and keeps going.

Returns
iterator before (circular) decrement

Definition at line 137 of file CircularIteratorImpl.h.

template<typename T, typename V, typename P = V*, typename R = V&>
bool UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator== ( const type rhs) const
inline

Equality test of the pointing iterator only, not of the range iterators.

Parameters
rhscircular iterator to compare with.
Returns
true iff current positions iterators coincide

Definition at line 150 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

Referenced by UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator!=().

Here is the caller graph for this function:

template<typename T, typename V, typename P = V*, typename R = V&>
bool UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator== ( const base_type rhs) const
inline

Equality test of the pointing iterator only, not of the range iterators.

Parameters
rhscircular iterator to compare with.
Returns
true iff current positions iterators coincide

Definition at line 158 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_it.

template<typename T, typename V, typename P = V*, typename R = V&>
bool UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator!= ( const type rhs) const
inline

Inequality test of the pointing iterator only, not of the range iterators.

Parameters
rhscircular iterator to compare with.
Returns
true iff current positions iterators coincide

Definition at line 166 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator==().

Here is the call graph for this function:

template<typename T, typename V, typename P = V*, typename R = V&>
bool UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator!= ( const base_type rhs) const
inline

Inequality test of the pointing iterator only, not of the range iterators.

Parameters
rhscircular iterator to compare with.
Returns
true iff current positions iterators coincide

Definition at line 174 of file CircularIteratorImpl.h.

References UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::operator==().

Here is the call graph for this function:

Member Data Documentation

template<typename T, typename V, typename P = V*, typename R = V&>
base_type UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_begin
protected
template<typename T, typename V, typename P = V*, typename R = V&>
base_type UA_CoMP::Container::Impl_::CircularIterator< T, V, P, R >::m_end
protected

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