Overview     Modules     Class Hierarchy     Classes     Members  
tlp::ConcatIterator< itType > Struct Template Reference

This Iterator iterates over the sequence formed by the concatenation of the sequences it is given. More...

#include <ConcatIterator.h>

Inheritance diagram for tlp::ConcatIterator< itType >:
Collaboration diagram for tlp::ConcatIterator< itType >:

List of all members.

Public Member Functions

 ConcatIterator (Iterator< itType > *itOne, Iterator< itType > *itTwo)
 Creates an Iterator that iterates over the concatenation of the two sequences it is given.
 ~ConcatIterator ()
 Deletes the two iterators it was given at construction.
itType next ()
 Moves the Iterator on the next element.
bool hasNext ()
 Tells if the sequence is at its end.
- Public Member Functions inherited from tlp::Iterator< itType >
 Iterator ()
virtual ~Iterator ()

Detailed Description

template<class itType>
struct tlp::ConcatIterator< itType >

This Iterator iterates over the sequence formed by the concatenation of the sequences it is given.

Warning:
This class takes ownership of the Iterators it is given.

Constructor & Destructor Documentation

template<class itType >
tlp::ConcatIterator< itType >::ConcatIterator ( Iterator< itType > *  itOne,
Iterator< itType > *  itTwo 
)
inline

Creates an Iterator that iterates over the concatenation of the two sequences it is given.

Parameters:
itOneThe first sequence to iterate upon.
itTwoThe second sequence, which will be iterated upon after the first sequence has been completely iterated upon.
template<class itType >
tlp::ConcatIterator< itType >::~ConcatIterator ( )
inline

Deletes the two iterators it was given at construction.


Member Function Documentation

template<class itType >
bool tlp::ConcatIterator< itType >::hasNext ( )
inlinevirtual

Tells if the sequence is at its end.

Returns:
bool Whether there are more elements to iterate on.

Implements tlp::Iterator< itType >.

template<class itType >
itType tlp::ConcatIterator< itType >::next ( )
inlinevirtual

Moves the Iterator on the next element.

Returns:
The current element pointed by the Iterator.

Implements tlp::Iterator< itType >.



Tulip Software by LaBRI Visualization Team    2001 - 2012