All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
ExtendFindEnum< IM >::ItemIt Class Reference

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;
}

#include <lemon/unionfind.h>

Public Member Functions

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

Constructor & Destructor Documentation

ItemIt ( const ExtendFindEnum ufe,
int  cls 
)
inline

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

ItemIt ( Invalid  )
inline

Constructor to get invalid iterator

Member Function Documentation

ItemIt& operator++ ( )
inline

It steps to the next item in the class.

operator const Item & ( ) const
inline

It converts the iterator to the current item.

bool operator== ( const ItemIt i)
inline

Equality operator

bool operator!= ( const ItemIt i)
inline

Inequality operator