gatb.core-API-1.4.2
ListIterator< Type > Class Template Reference

Iterator that loops over std::list. More...

#include <IteratorHelpers.hpp>

Inheritance diagram for ListIterator< Type >:
Inheritance graph

Additional Inherited Members

- Public Member Functions inherited from STLIterator< std::list< Type >, Type >
 STLIterator (const std::list< Type > &l)
 
virtual ~STLIterator ()
 
- Public Member Functions inherited from Iterator< Type >
Type * operator-> ()
 
Type & operator* ()
 
void iterate (const Functor &f)
 
virtual void setItem (Type &i)
 
bool get (std::vector< Type > &current)
 
virtual void reset ()
 
virtual void finalize ()
 
virtual std::vector< Iterator< Type > * > getComposition ()
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

template<class Type>
class gatb::core::tools::dp::impl::ListIterator< Type >

Iterator that loops over std::list.

This class is a wrapper between the STL list implementation and our own Iterator abstraction.

Note that the class is still a template one since we can iterate on list of anything.

void foo ()
{
list<int> l;
l.push_back (1);
l.push_back (2);
l.push_back (4);
ListIterator<int> it (l);
for (it.first(); !it.isDone(); it.next()) { cout << it.currentItem() << endl; }
}

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