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);
188template<
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...
virtual T * Previous() const =0
Decrement iterator by one - may be used with mutable member iterators.
~IBidirectionalIterator()=default
Default destructor.
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.
virtual T * Forward(size_t i_nIncrement) const =0
Increment iterator by n - may be used with mutable member iterators.
~IRandomAccessIterator()=default
Default destructor.
virtual T * Backward(size_t i_nDecrement) const =0
Decrement iterator by n - may be used with mutable member iterators.
Namespace for all functionality provided since v3.0.
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
Greater-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.
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 operator for forward_iterator.
Namespace for the ADTF uCOM3 SDK.
ant::IBidirectionalIterator< T > IBidirectionalIterator
Alias always bringing the latest version of IBidirectionalIterator into scope.
ant::iterator_adapter< T, IteratorType > iterator_adapter
Alias always bringing the latest version of ant::iterator_adapter into scope.
ant::pointer_iterator< T > pointer_iterator
Alias always bringing the latest version of ant::pointer_iterator into scope.
ant::IForwardIterator< T > IForwardIterator
Alias always bringing the latest version of IForwardIterator into scope.
ant::IRandomAccessIterator< T > IRandomAccessIterator
Alias always bringing the latest version of IRandomAccessIterator into scope.
ant::forward_iterator< T > forward_iterator
Alias always bringing the latest version of ant::forward_iterator 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.
friend struct iterator_adapter
Alias always bringing the latest version of ant::iterator_adapter into scope.
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.
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
std::conditional< std::is_const< value_type >::value, constIForwardIterator< T > *, IForwardIterator< T > * >::type iterator_interface_pointer
const correct pointer to the iterator interface used to increment this iterator
const_reference operator*() const
Dereference operator const version.
std::ptrdiff_t difference_type
pointer difference type
const T & const_reference
const value reference type
std::conditional< std::is_const< value_type >::value, const_iterator, value_type * >::type iterator
iterator 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)
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)
const_iterator cbegin() const
Get const iterator to the beginning of the container sequence (STL compliant)
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 cend() const
Get const iterator to the end of the container sequence (STL compliant)
iterator_adapter< value_type, IteratorType > self_type
self type
std::conditional< std::is_const< value_type >::value, const_iterator, IteratorType< value_type > >::type iterator
Empty struct template to specialize implementations of iterator interfaces.