Public Types | Public Member Functions | Friends
efl::eina::_inlist_iterator< T > Struct Template Reference

Public Types

typedef std::remove_const< T >::type value_type
 Type for the list elements. More...
 
typedef value_typepointer
 Type for a pointer to an element. More...
 
typedef value_typereference
 Type for a reference to an element. More...
 
typedef std::ptrdiff_t difference_type
 Type to represent the distance between two iterators. More...
 
typedef std::bidirectional_iterator_tag iterator_category
 Defines the iterator as being a bidirectional iterator. More...
 

Public Member Functions

 _inlist_iterator ()
 Default constructor. More...
 
 _inlist_iterator (_inlist_node< value_type > *list, _inlist_node< value_type > *node)
 Creates an iterator from a inline list and a node. More...
 
 _inlist_iterator (_inlist_iterator< typename std::remove_const< T >::type > const &other)
 Copy constructor. More...
 
_inlist_iterator< T > & operator++ ()
 Move the iterator to the next position in the list. More...
 
_inlist_iterator< T > operator++ (int)
 Move the iterator to the next position in the list. More...
 
_inlist_iterator< T > & operator-- ()
 Move the iterator to the previous position in the list. More...
 
_inlist_iterator< T > operator-- (int)
 Move the iterator to the previous position in the list. More...
 
T & operator* () const
 Get a reference to the element currently pointed by the iterator. More...
 
T * operator-> () const
 Return a pointer to the current element, which member will be accessed. More...
 
_inlist_node< value_type > * native_handle ()
 
_inlist_node< value_type > const * native_handle () const
 

Friends

template<typename U >
struct _inlist_iterator
 Check if both iterators are pointing to the same node. More...
 
bool operator== (_inlist_iterator< T > lhs, _inlist_iterator< T > rhs)
 

Member Typedef Documentation

◆ value_type

template<typename T>
typedef std::remove_const<T>::type efl::eina::_inlist_iterator< T >::value_type

Type for the list elements.

◆ pointer

template<typename T>
typedef value_type* efl::eina::_inlist_iterator< T >::pointer

Type for a pointer to an element.

◆ reference

template<typename T>
typedef value_type& efl::eina::_inlist_iterator< T >::reference

Type for a reference to an element.

◆ difference_type

template<typename T>
typedef std::ptrdiff_t efl::eina::_inlist_iterator< T >::difference_type

Type to represent the distance between two iterators.

◆ iterator_category

template<typename T>
typedef std::bidirectional_iterator_tag efl::eina::_inlist_iterator< T >::iterator_category

Defines the iterator as being a bidirectional iterator.

Constructor & Destructor Documentation

◆ _inlist_iterator() [1/3]

template<typename T>
efl::eina::_inlist_iterator< T >::_inlist_iterator ( )
inline

Default constructor.

Creates an uninitialized iterator.

◆ _inlist_iterator() [2/3]

template<typename T>
efl::eina::_inlist_iterator< T >::_inlist_iterator ( _inlist_node< value_type > *  list,
_inlist_node< value_type > *  node 
)
inlineexplicit

Creates an iterator from a inline list and a node.

Parameters
listPointer to the inline list.
nodePointer to the node.

◆ _inlist_iterator() [3/3]

template<typename T>
efl::eina::_inlist_iterator< T >::_inlist_iterator ( _inlist_iterator< typename std::remove_const< T >::type > const &  other)
inline

Copy constructor.

Creates a copy of the given iterator.

Parameters
otherOther iterator.

Member Function Documentation

◆ operator++() [1/2]

template<typename T>
_inlist_iterator<T>& efl::eina::_inlist_iterator< T >::operator++ ( )
inline

Move the iterator to the next position in the list.

Returns
The 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++() [2/2]

template<typename T>
_inlist_iterator<T> efl::eina::_inlist_iterator< T >::operator++ ( int  )
inline

Move the iterator to the next position in the list.

Returns
Copy of the iterator before the increment.

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

◆ operator--() [1/2]

template<typename T>
_inlist_iterator<T>& efl::eina::_inlist_iterator< T >::operator-- ( )
inline

Move the iterator to the previous position in the list.

Returns
The 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>
_inlist_iterator<T> efl::eina::_inlist_iterator< T >::operator-- ( int  )
inline

Move the iterator to the previous position in the list.

Returns
Copy of the iterator before the decrement.

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 iterator before the decrement.

◆ operator*()

template<typename T>
T& efl::eina::_inlist_iterator< T >::operator* ( ) const
inline

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

Returns
Reference to the current element.

◆ operator->()

template<typename T>
T* efl::eina::_inlist_iterator< T >::operator-> ( ) const
inline

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

Returns
Pointer to the element currently pointed by the iterator.

Friends And Related Function Documentation

◆ _inlist_iterator

template<typename T>
template<typename U >
friend struct _inlist_iterator
friend

Check if both iterators are pointing to the same node.

Parameters
lhsFirst iterator to be compared.
rhsSecond iterator to be compared.
Returns
true if both iterators are pointing to the same node, false otherwise.