#include <sequenceiterator.hpp>
Inheritance diagram for SequenceIterator:
Public Member Functions | |
SequenceIterator () | |
Constructor. | |
virtual | ~SequenceIterator () |
Destructor. | |
virtual bool | hasNextTaskId () |
Returns if there are more tasks that have to be executed. | |
virtual int | getNextTaskId () |
Returns the id of the next task to be executed and stores the task id in previousIds vector. | |
const vector< int > & | getPreviousIdVector () |
Returns a reference to the vector storing previously returned task ids. | |
Protected Attributes | |
vector< int > | previousIds |
Vector which stores all previously returned task ids. |
The main purpose of a sequence iterator is to return if there are more tasks to be executed and to return the task id of the next task. Users may use this class as base for implementing their own iterators by overwriting the public methods hasNextTaskId() and getNextTaskId() in a derived class. This makes loops, branches and jumps between multiple sequence files possible.
Furthermore a history of all returned task ids is kept as a vector of integers. This vector can be accessed - though not altered - via the public method getPreviousIdVector(). Derived classes can access previousIds directly.
Users who do not want to implement a own iterator find a suitable simple implementation in DefaultSequenceIterator.
Definition at line 42 of file sequenceiterator.hpp.
|
Constructor. Definition at line 23 of file sequenceiterator.cpp. |
|
Destructor. Definition at line 30 of file sequenceiterator.cpp. |
|
Returns the id of the next task to be executed and stores the task id in previousIds vector.
Reimplemented in DefaultSequenceIterator. Definition at line 49 of file sequenceiterator.cpp. Referenced by Scheduler::schedule(). |
|
Returns a reference to the vector storing previously returned task ids.
References previousIds. |
|
Returns if there are more tasks that have to be executed.
Reimplemented in DefaultSequenceIterator. Definition at line 39 of file sequenceiterator.cpp. Referenced by Scheduler::schedule(). |
|
Vector which stores all previously returned task ids. Definition at line 52 of file sequenceiterator.hpp. Referenced by getPreviousIdVector(). |