abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
ExtendFindEnum< IM >::ItemIt Class Reference

LEMON style iterator for the items of a component. More...

#include <lemon/unionfind.h>

Public Member Functions

 ItemIt (const ExtendFindEnum &ufe, int cls)
 Constructor of the iterator.
 ItemIt (Invalid)
 Constructor to get invalid iterator.
ItemIt & operator++ ()
 Increment operator.
 operator const Item & () const
 Conversion operator.
bool operator== (const ItemIt &i)
 Equality operator.
bool operator!= (const ItemIt &i)
 Inequality operator.

Detailed Description

template< typename IM >
class lemon::ExtendFindEnum< IM >::ItemIt

ClassIt is a lemon style iterator for the components. It iterates on the items of a class. By example if you want to iterate on each items of each classes then you may write the next code.

for( ClassIt cit( ufe ) ; cit != INVALID ; ++cit )
{
std::cout << "Class: ";
for( ItemIt iit( ufe , cit ) ; iit != INVALID ; ++iit ) {
std::cout << toString( iit ) << ' ' << std::endl;
}
std::cout << std::endl;
}
LEMON style iterator for the classes.
Definition unionfind.h:805
ItemIt( const ExtendFindEnum & ufe , int cls )
Constructor of the iterator.
Definition unionfind.h:869
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ ItemIt() [1/2]

template< typename IM >
ItemIt ( const ExtendFindEnum & ufe,
int cls )
inline

Constructor of the iterator. The iterator iterates on the class of the item.

◆ ItemIt() [2/2]

template< typename IM >
ItemIt ( Invalid )
inline

Constructor to get invalid iterator

Member Function Documentation

◆ operator++()

template< typename IM >
ItemIt & operator++ ( )
inline

It steps to the next item in the class.

◆ operator const Item &()

template< typename IM >
operator const Item & ( ) const
inline

It converts the iterator to the current item.

◆ operator==()

template< typename IM >
bool operator== ( const ItemIt & i)
inline

Equality operator

◆ operator!=()

template< typename IM >
bool operator!= ( const ItemIt & i)
inline

Inequality operator