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

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

Public Member Functions

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

Detailed Description

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

This concept is matched by all mutable iterators and is used by container implementing the MutableCollection 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 MutableIter< 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!=()

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

Test for inequality.

◆ operator++()

MutableIter& operator++ ( int  )

Same as next().

◆ operator=()

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

Assign an operator position to the current one.

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

◆ operator==()

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

Test for equality.


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