|
Tulip
5.6.0
Large graphs analysis and drawing
|
20 #ifndef TULIP_STABLEITERATOR_H
21 #define TULIP_STABLEITERATOR_H
27 #include <tulip/Iterator.h>
28 #include <tulip/StlIterator.h>
29 #include <tulip/tulipconf.h>
73 bool sortCopy =
false) {
76 for (; inputIterator->
hasNext();) {
151 template <
typename Container>
152 typename std::enable_if<has_const_iterator<Container>::value,
153 StableIterator<typename Container::value_type>
T next()
Moves the Iterator on the next element.
void restart()
Restarts the iteration by moving the Iterator to the beginning of the sequence.
virtual T next()=0
Moves the Iterator on the next element.
std::vector< T > sequenceCopy
A copy of the sequence of the elements to iterate.
bool hasNext()
Tells if the sequence is at its end.
std::enable_if< has_const_iterator< Container >::value, StlIterator< typename Container::value_type, typename Container::const_iterator > * >::type stlIterator(const Container &stlContainer)
Convenient function for creating a StlIterator from a stl container.
Stores the elements of an iterator and iterates a copy.
std::vector< T >::const_iterator copyIterator
STL const_iterator on the cloned sequence.
StableIterator(Iterator< T > *inputIterator, size_t nbElements=0, bool deleteIterator=true, bool sortCopy=false)
Creates a stable Iterator, that allows to delete elements from a graph while iterating on them.
StableIterator< T > * stableIterator(Iterator< T > *it)
Convenient function for creating a StableIterator.
Interface for Tulip iterators. Allows basic iteration operations only.
virtual bool hasNext()=0
Tells if the sequence is at its end.