8 #ifndef _ADTF_UCOM_ANT_ITERATOR_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_ITERATOR_INTERFACE_INCLUDES_HEADER_
87 typedef typename std::conditional<
88 std::is_const<value_type>::value,
110 return oLHS.operator->() < oRHS.operator->();
138 return !(oLHS > oRHS);
152 return !(oLHS < oRHS);
166 return !(oLHS < oRHS) && !(oLHS > oRHS);
180 return !(oLHS == oRHS);
188 template<
typename T,
template<
typename>
class IteratorType =
forward_iterator>
195 typedef typename std::conditional <
196 std::is_const<value_type>::value,
226 template<
typename,
template<
typename>
class>
friend class cForwardIterator;
235 template<
typename IteratorInterfaceType>
239 oTmpContainer.
m_oBegin.m_pIt = &o_oIterator;
240 oTmpContainer.
m_oBegin.m_pCur = o_oIterator.Begin();
241 oTmpContainer.
m_oEnd.m_pIt = &o_oIterator;
242 oTmpContainer.
m_oEnd.m_pCur = o_oIterator.End();
243 return oTmpContainer;
260 typedef typename std::conditional <
261 std::is_const<value_type>::value,
299 oTmpContainer.
m_oEnd = i_oEnd;
300 return oTmpContainer;
362 virtual T*
Forward(
size_t i_nIncrement)
const = 0;
369 virtual T*
Backward(
size_t i_nDecrement)
const = 0;
Bidirectional iterator interface details Additionally providing method Previous() for POD bidirection...
~IBidirectionalIterator()=default
Default destructor.
virtual T * Previous() const =0
Decrement iterator by one - may be used with mutable member iterators.
Forward iterator interface providing method Next() usable by POD forward iterators.
virtual T * Next() const =0
Increment iterator by one - may be used with mutable member iterators.
~IForwardIterator()=default
Default destructor.
Random access iterator interface.
~IRandomAccessIterator()=default
Default destructor.
virtual T * Backward(size_t i_nDecrement) const =0
Decrement iterator by n - may be used with mutable member iterators.
virtual T * Forward(size_t i_nIncrement) const =0
Increment iterator by n - may be used with mutable member iterators.
bool operator>(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Greater-than operator for forward_iterator.
bool operator<(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Less-than operator for forward_iterator.
bool operator>=(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Greater-than-or-equal operator for forward_iterator.
bool operator<=(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Less-than-or-equal operator for forward_iterator.
bool operator!=(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Inequality operator for forward_iterator.
bool operator==(const forward_iterator< T > &oLHS, const forward_iterator< T > &oRHS) noexcept
Equality operator for forward_iterator.
ant::IBidirectionalIterator< T > IBidirectionalIterator
Alias always bringing the latest version of ant::IBidirectionalIterator into scope.
ant::IForwardIterator< T > IForwardIterator
Alias always bringing the latest version of ant::IForwardIterator into scope.
ant::IRandomAccessIterator< T > IRandomAccessIterator
Alias always bringing the latest version of ant::IRandomAccessIterator into scope.
Namespace for entire ADTF SDK.
POD forward iterator type using a forward iterator interface to iterate over a sequence.
const_pointer operator->() const
Pointer operator const version.
pointer m_pCur
Pointer to the current value inside the sequence.
pointer operator->()
Pointer operator.
self_type operator++()
Pre-increment operator using iterator interface method Next()
std::forward_iterator_tag iterator_category
category of the iterator
reference operator*()
Dereference operator.
std::conditional< std::is_const< value_type >::value, const IForwardIterator< T > *, IForwardIterator< T > * >::type iterator_interface_pointer
const correct pointer to the iterator interface used to increment this iterator
iterator_interface_pointer m_pIt
Pointer to iterator interface providing Next()
const T * const_pointer
const value pointer type
T * pointer
value pointer type
forward_iterator< T > self_type
self type
self_type operator++(int32_t)
Post-increment operator.
T & reference
value reference type
const_reference operator*() const
Dereference operator const version.
std::ptrdiff_t difference_type
pointer difference type
const T & const_reference
const value reference type
iterator begin() const
Get pointer to the beginning of the container sequence (STL compliant)
iterator m_oBegin
pointer to the beginning of the containers values
const_iterator cbegin() const
Get const pointer to the beginning of the container sequence (STL compliant)
static self_type create(iterator i_oBegin, iterator i_oEnd)
Create the adapter by assigning begin and end iterators (pointers)
iterator end() const
Get pointer to the end of the container sequence (STL compliant)
std::conditional< std::is_const< value_type >::value, const_iterator, value_type * >::type iterator
iterator type
const_iterator cend() const
Get const pointer to the end of the container sequence (STL compliant)
const value_type * const_iterator
const iterator type
iterator_adapter< value_type, pointer_iterator > self_type
self type
iterator m_oEnd
pointer past the last element of the container values
Adapter for begin and end iterators - usable as return and parameter value in interfaces.
iterator begin() const
Get iterator to the beginning of the container sequence (STL compliant)
iterator m_oBegin
iterator to the beginning of the containers sequence
const_iterator cbegin() const
Get const iterator to the beginning of the container sequence (STL compliant)
std::conditional< std::is_const< value_type >::value, const_iterator, IteratorType< value_type > >::type iterator
iterator type
iterator end() const
Get iterator to the end of the container sequence (STL compliant)
static self_type create(IteratorInterfaceType &o_oIterator)
Create the adapter by assigning iterator interface to begin and end iterators.
IteratorType< const value_type > const_iterator
const iterator type
const_iterator cend() const
Get const iterator to the end of the container sequence (STL compliant)
iterator_adapter< value_type, IteratorType > self_type
self type
iterator m_oEnd
iterator to past the last element of the container sequence
Empty struct template to specialize implementations of iterator interfaces.