Common implementations for iterators. More...
Public Types | |
typedef std::remove_reference< T >::type const | value_type |
Type for elements returned by the iterator. More... | |
typedef value_type * | pointer |
Type for a pointer to an element. More... | |
typedef value_type & | reference |
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::input_iterator_tag | iterator_category |
Defines the iterator as being an input iterator. More... | |
Public Member Functions | |
_common_iterator_base () | |
Default constructor. More... | |
_common_iterator_base (Eina_Iterator *iterator) | |
Creates a iterator wrapping the given native Eina_Iterator handle. More... | |
~_common_iterator_base () | |
Release the internal native Eina iterator handle. | |
_common_iterator_base (self_type const &other) | |
Creates an iterator from another iterator of the same type. More... | |
_common_iterator_base & | operator= (self_type const &other) |
Acquire the internal handle of the given iterator. More... | |
Eina_Iterator * | native_handle () const |
Get the handle for the wrapped Eina_Iterator . More... | |
Protected Attributes | |
Eina_Iterator * | _iterator |
Friends | |
bool | operator== (_common_iterator_base< T > const &lhs, _common_iterator_base< T > const &rhs) |
Check if the iterators wrap the same handle. More... | |
bool | operator!= (_common_iterator_base< T > const &lhs, _common_iterator_base< T > const &rhs) |
Check if the iterators wrap the different handles. More... | |
Common implementations for iterators.
typedef std::remove_reference<T>::type const efl::eina::_common_iterator_base< T >::value_type |
Type for elements returned by the iterator.
typedef value_type* efl::eina::_common_iterator_base< T >::pointer |
Type for a pointer to an element.
typedef value_type& efl::eina::_common_iterator_base< T >::reference |
Type for a reference to an element.
typedef std::ptrdiff_t efl::eina::_common_iterator_base< T >::difference_type |
Type to represent the distance between two iterators.
typedef std::input_iterator_tag efl::eina::_common_iterator_base< T >::iterator_category |
Defines the iterator as being an input iterator.
|
inline |
Default constructor.
Creates an iterator that points to nothing.
|
inlineexplicit |
Creates a iterator wrapping the given native Eina_Iterator
handle.
iterator | Handle to a native Eina_Iterator . |
This constructor creates an iterator that wraps the given native Eina_Iterator
handle, providing a generic interface to it.
|
inline |
Creates an iterator from another iterator of the same type.
other | Another iterator of the same type. |
other
will point to nothing after the call of this constructor.
|
inline |
Acquire the internal handle of the given iterator.
other | Another iterator of the same type. |
other
will point to nothing after the call of this constructor.
|
inline |
Get the handle for the wrapped Eina_Iterator
.
This member function returns the native Eina_Iterator
handle that is wrapped inside this object.
|
friend |
Check if the iterators wrap the same handle.
lhs | Iterator at the left side of the expression. |
lhs | Iterator at the right side of the expression. |
true
if both iterators wrap the same handle, false
otherwise.
|
friend |
Check if the iterators wrap the different handles.
lhs | Iterator at the left side of the expression. |
lhs | Iterator at the right side of the expression. |
true
if the iterators wrap different handles, false
otherwise.