FRAMES NO FRAMES

Class IlcAnyTimetableCursor

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

Objects of the class IlcAnyTimetableCursor allow you to inspect the contents of timetables of type IlcAnyTimetable. A region of a timetable is a subinterval [timeMin, timeMax) of the interval where it is defined such that all the times in the region share the same information and any two adjacent regions store different information. Cursors are intended to iterate forward or backward over the regions of a timetable.

Note
The structure of a timetable cannot be changed while a cursor is being used to inspect the timetable. Therefore, functions that change the structure of the timetable should not be called while the cursor is being used; for example, IlcAnyTimetable::removePossibleStates.

See Also:

Constructor and Destructor Summary
public IlcAnyTimetableCursor(const IlcAnyTimetable table, IlcInt time)
Method Summary
public IlcIntgetTimeMax() const
public IlcIntgetTimeMin() const
public IlcAnygetValue() const
public IlcBoolisBound() const
public IlcBoolisPossible(IlcAny state) const
public IlcBoolok() const
public voidoperator++()
public voidoperator--()
Constructor and Destructor Detail

IlcAnyTimetableCursor

public IlcAnyTimetableCursor(const IlcAnyTimetable table, IlcInt time)

This constructor creates a cursor to inspect the information stored in the timetable table. This cursor lets you iterate forward or backward over the regions composing the timetable. The cursor initially indicates the region containing time.


Method Detail

getTimeMax

public IlcInt getTimeMax() const

This member function returns the time ending the region currently indicated by the cursor.


getTimeMin

public IlcInt getTimeMin() const

This member function returns the time beginning the region currently indicated by the cursor.


getValue

public IlcAny getValue() const

This member function returns the value of the region indicated by the invoking timetable cursor. An instance of IloSolver::SolverErrorException is thrown if the timetable is not bound at the cursor position.


isBound

public IlcBool isBound() const

This member function returns IlcTrue if the set of possible states indicated by the invoking timetable cursor has been bound; that is, the set of possible states has been reduced to a single state. Otherwise, it returns IlcFalse.


isPossible

public IlcBool isPossible(IlcAny state) const

This member function returns IlcTrue if the given state is a member of the set of possible states corresponding to the region currently indicated by the invoking timetable cursor. Otherwise, it returns IlcFalse.


ok

public IlcBool ok() const

This member function returns IlcFalse if the cursor does not currently indicate a region included in the interval of the timetable. Otherwise, it returns IlcTrue. Any attempt to use the cursor after ok() returns IlcFalse could lead to undefined behavior.


operator++

public void operator++()

This operator moves the cursor to the region adjacent "on the right" to the current region (forward iteration).


operator--

public void operator--()

This operator moves the cursor to the region adjacent "on the left" to the current region (backward iteration).