- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Types | Public Member Functions
efl::eina::iterator< T > Struct Template Reference
Eina C++Eina C++ » | Data Types » Content Access » Iterator Eina C++Eina C++ » | Data Types » | Content Access

C++ wrappers to the native `Eina_Iterator`. More...

## Public Types
typedef base_type::value_type | value_type
| Type for elements returned by the iterator. More...
typedef base_type::pointer | pointer
| Type for a pointer to an element. More...
typedef base_type::reference | reference
| Type for a reference to an element. More...
typedef base_type::difference_type | difference_type
| Type to represent the distance between two iterators. More...
typedef base_type::iterator_category | iterator_category
| Defines the iterator category as the same of the base class. More...
Public Types inherited from efl::eina::_common_iterator_base< T const >
typedef T 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
| iterator (Eina_Iterator *iterator_=0)
| Creates a iterator wrapping the given native `Eina_Iterator` handle. More...
self_type & | operator++ ()
| Move the iterator to the next position. More...
self_type & | operator++ (int)
| Move the iterator to the next position. More...
value_type & | operator* () const
| Get a reference to the element currently pointed by the iterator. More...
pointer | operator-> () const
| Return a pointer to the current element, which member will be accessed. More...
Public Member Functions inherited from efl::eina::_common_iterator_base< T const >
| _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 (self_type const &other)
| Creates an iterator from another iterator of the same type. More...
| ~_common_iterator_base ()
| Release the internal native Eina iterator handle.
_common_iterator_base & | operator= (self_type const &other)
| Acquire the internal handle of the given iterator. More...

## Additional Inherited Members
Protected Attributes inherited from efl::eina::_common_iterator_base< T const >
Eina_Iterator * | _iterator

## Detailed Description

### template<typename T>
struct efl::eina::iterator< T >

C++ wrappers to the native `Eina_Iterator`.

It provides an OOP interface to the `Eina_Iterator` functions, and automatically take care of allocating a deallocating resources using the RAII programming idiom.

## Member Typedef Documentation

template<typename T >

typedef base_type::value_type efl::eina::iterator< T >::value_type

Type for elements returned by the iterator.

template<typename T >

typedef base_type::pointer efl::eina::iterator< T >::pointer

Type for a pointer to an element.

template<typename T >

typedef base_type::reference efl::eina::iterator< T >::reference

Type for a reference to an element.

template<typename T >

typedef base_type::difference_type efl::eina::iterator< T >::difference_type

Type to represent the distance between two iterators.

template<typename T >

typedef base_type::iterator_category efl::eina::iterator< T >::iterator_category

Defines the iterator category as the same of the base class.

## Constructor & Destructor Documentation

template<typename T >

efl::eina::iterator< T >::iterator | ( | Eina_Iterator * | iterator_ = `0` | ) |
| inline explicit

Creates a iterator wrapping the given native `Eina_Iterator` handle.

This constructor creates an iterator that wraps the given native `Eina_Iterator` handle, providing an OOP interface to it.

## Member Function Documentation

template<typename T >

self_type& efl::eina::iterator< T >::operator++ | ( |  | ) |
| inline

Move the iterator to the next position.

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.

References eina_iterator_next().

template<typename T >

self_type& efl::eina::iterator< T >::operator++ | ( | int |  | ) |
| inline

Move the iterator to the next position.

Returns
  The iterator itself.

Works exactly like operator++().

template<typename T >

value_type& efl::eina::iterator< T >::operator* | ( |  | ) | const
| inline

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

Returns
  Reference to the current element.

template<typename T >

pointer efl::eina::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.