Public Types | Public Member Functions | Data Fields
efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type > Struct Template Reference

Random access iterator for eina::accessor. More...

Public Types

typedef T value_type
 Type of the elements. More...
 
typedef value_typepointer
 Pointer to element type. More...
 
typedef value_typereference
 Reference to element type. More...
 
typedef std::ptrdiff_t difference_type
 Type to represent the distance between two accessor_iterators.
 
typedef std::random_access_iterator_tag iterator_category
 Defines the iterator as being a random access iterator. More...
 

Public Member Functions

 accessor_iterator (accessor< T > const &a, unsigned int pos=0u)
 Creates an accessor_iterator to the given eina::accessor. More...
 
accessor_iterator< T > & operator+= (difference_type i)
 Move the iterator forward by i positions. More...
 
accessor_iterator< T > & operator-= (difference_type i)
 Move the iterator back by i positions. More...
 
value_typeoperator[] (difference_type i)
 Get the element i positions away from the current element. More...
 
accessor_iterator< T > & operator++ ()
 Move the iterator to the next position. More...
 
accessor_iterator< T > & operator-- ()
 Move the iterator to the previous position. More...
 
accessor_iterator< T > & operator++ (int)
 Move the iterator to the next position. More...
 
accessor_iterator< T > & operator-- (int)
 Move the iterator to the previous position. More...
 
value_typeoperator* () const
 Get a reference to the element currently pointed by the accessor_iterator. More...
 
pointer operator-> () const
 Return a pointer to the current element, which member will be accessed. More...
 
void swap (accessor_iterator< T > &other)
 Swap content with the given accessor_iterator. More...
 

Data Fields

accessor< T > _accessor
 
unsigned int _index
 

Detailed Description

template<typename T>
struct efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >

Random access iterator for eina::accessor.

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::value_type

Type of the elements.

◆ pointer

template<typename T >
typedef value_type* efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::pointer

Pointer to element type.

◆ reference

template<typename T >
typedef value_type& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::reference

Reference to element type.

◆ iterator_category

template<typename T >
typedef std::random_access_iterator_tag efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::iterator_category

Defines the iterator as being a random access iterator.

Constructor & Destructor Documentation

◆ accessor_iterator()

template<typename T >
efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::accessor_iterator ( accessor< T > const &  a,
unsigned int  pos = 0u 
)
inline

Creates an accessor_iterator to the given eina::accessor.

Parameters
aeina::accessor object.
posInitial position of the iterator (Default = 0).

This constructor creates an accessor_iterator for the given eina::accessor object. The position initially pointed by the iterator can be supplied via the pos argument, by default it is the first position (index 0).

Member Function Documentation

◆ operator+=()

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator+= ( difference_type  i)
inline

Move the iterator forward by i positions.

Parameters
iNumber of positions to move.
Returns
The accessor_iterator itself.

◆ operator-=()

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator-= ( difference_type  i)
inline

Move the iterator back by i positions.

Parameters
iNumber of positions to move.
Returns
The accessor_iterator itself.

◆ operator[]()

template<typename T >
value_type& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator[] ( difference_type  i)
inline

Get the element i positions away from the current element.

Parameters
iPosition relative to the current element.
Returns
Reference to the element i positions away from the element currently pointed by the accessor_iterator.

◆ operator++() [1/2]

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator++ ( )
inline

Move the iterator to the next position.

Returns
The accessor_iterator itself.

This operator increments the iterator, making it point to the position right after the current one. At the end, it returns a reference to itself.

◆ operator--() [1/2]

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator-- ( )
inline

Move the iterator to the previous position.

Returns
The accessor_iterator itself.

This operator decrements the iterator, making it point to the position right before the current one. At the end, it returns a reference to itself.

◆ operator++() [2/2]

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator++ ( int  )
inline

Move the iterator to the next position.

Returns
A copy of the accessor_iterator before the change.

This operator increments the iterator, making it point to the position right after the current one. At the end, it returns a copy of the accessor_iterator before the change.

◆ operator--() [2/2]

template<typename T >
accessor_iterator<T>& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator-- ( int  )
inline

Move the iterator to the previous position.

Returns
A copy of the accessor_iterator before the change.

This operator decrements the iterator, making it point to the position right before the current one. At the end, it returns a copy of the accessor_iterator before the change.

◆ operator*()

template<typename T >
value_type& efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator* ( ) const
inline

Get a reference to the element currently pointed by the accessor_iterator.

Returns
Reference to the current element.

◆ operator->()

template<typename T >
pointer efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::operator-> ( ) const
inline

Return a pointer to the current element, which member will be accessed.

Returns
Pointer to the element currently pointed by the accessor_iterator.

◆ swap()

template<typename T >
void efl::eina::accessor_iterator< T, typename std::enable_if< ! ::efl::eo::is_eolian_object< T >::value, T >::type >::swap ( accessor_iterator< T > &  other)
inline

Swap content with the given accessor_iterator.

Parameters
otherAnother accessor_iterator of the same type.

References efl::eina::swap().