Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Iter< T > Class Template Reference

#include </home/casse/Dev/elm/src/concepts.h>

+ Inheritance diagram for Iter< T >:

Public Member Functions

bool ended (void)
 
void next (void)
 
item (void)
 
 operator bool (void)
 
 operator T (void)
 
Iteroperator++ (int)
 
Iteroperator= (const Iter &iterator)
 
bool equals (const Iter &iterator) const
 
bool operator== (const Iter &iterator) const
 
bool operator!= (const Iter &iterator) const
 

Detailed Description

template<class T>
class elm::concept::Iter< T >

This concept is matched by all iterators and is used by container implementing the Collection concept. It provides a way to traverse a collection of items. Notice that PreIterator provides a fast way to implement the operator overloads of this concept: iterator inheriting from PreIterator have just to implement ended(), item() and next().

Parameters
TType of items of the collection.
Implemented by:

Member Function Documentation

◆ ended()

bool ended ( void  )

Test if the end of the traversal is reached.

Returns
True if end is reached, false else.

◆ equals()

bool equals ( const Iter< T > &  iterator) const

Test if two iterators are equal.

Parameters
iteratorIterator to test with.
Returns
True if they are equal, false else.

◆ item()

T item ( void  )

Get the current item.

Returns
Current item.
Warning
Do not call this method when ended() == true !

◆ next()

void next ( void  )

Go to the next item.

◆ operator bool()

operator bool ( void  )

Same as ! ended().

◆ operator T()

operator T ( void  )

Same as item().

◆ operator!=()

bool operator!= ( const Iter< T > &  iterator) const

Test for inequality.

◆ operator++()

Iter& operator++ ( int  )

Same as next().

◆ operator=()

Iter& operator= ( const Iter< T > &  iterator)

Assign an operator position to the current one.

Parameters
iteratorIterator to set the position of.
Returns
Current iterator.

◆ operator==()

bool operator== ( const Iter< T > &  iterator) const

Test for equality.


The documentation for this class was generated from the following file: