FRAMES NO FRAMES

Class IlcIntervalListCursor

Definition file: ilsched/brkcsor.h
Include file: <ilsched/ilsched.h>

An instance of the class IlcIntervalList represents a list of non-overlapping intervals. Each interval [timeMin, timeMax) from the list is associated with a numerical type.

Note that when two consecutive intervals of the list have the same types, these intervals are merged so that the list is always represented with the minimal number of intervals.

The class IlcIntervalListCursor provides a way to traverse those lists of intervals.

See Also:

Constructor and Destructor Summary
public IlcIntervalListCursor(const IlcIntervalListCursor & csor)
public IlcIntervalListCursor(const IlcIntervalList list, const IlcBool forward=IlcTrue)
Method Summary
public IlcIntgetDuration() const
public IlcIntgetEnd() const
public IlcIntgetStart() const
public IlcIntgetType() const
public IlcBoolok() const
public IlcIntervalListCursor &operator++()
public IlcIntervalListCursor &operator--()
Constructor and Destructor Detail

IlcIntervalListCursor

public IlcIntervalListCursor(const IlcIntervalListCursor & csor)

This copy constructor creates a cursor by copying another one. C++ relies on this constructor when you pass an interval cursor as an argument to a function.


IlcIntervalListCursor

public IlcIntervalListCursor(const IlcIntervalList list, const IlcBool forward=IlcTrue)

This constructor creates a new instance of IlcIntervalListCursor that traverses the intervals in list. If forward is IlcTrue (its default value), then the cursor starts at the first interval, that is, the interval with the earliest start time. Otherwise, the cursor starts with the last interval, that is, the interval with the latest start time.


Method Detail

getDuration

public IlcInt getDuration() const

This member function returns the duration of the current interval, the one to which the invoking cursor points.


getEnd

public IlcInt getEnd() const

This member function returns the end time of the current interval, the one to which the invoking cursor points.


getStart

public IlcInt getStart() const

This member function returns the start time of the current interval, the one to which the invoking cursor points.


getType

public IlcInt getType() const

This member function returns the type of the current interval.


ok

public IlcBool ok() const

This member function returns IlcTrue if there is a current interval and the invoking cursor points to it. Otherwise, it returns IlcFalse.


operator++

public IlcIntervalListCursor & operator++()

This operator shifts the cursor to the next interval.


operator--

public IlcIntervalListCursor & operator--()

This operator shifts the cursor back to the previous interval.