FRAMES NO FRAMES

Class IlcPrecedingActivityIterator

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

When used during the search, an instance of this class traverses the activities that are such that a precedence constraint holds between this activity and the activity given in the constructor of the iterator. If used before entering the search, this iterator will traverse an empty list of activities.

This class of iterators does not distinguish among the precedence constraints created by means of the member functions IlcActivity::startsAfterStart, IlcActivity::startsAfterEnd, IlcActivity::endsAfterStart, IlcActivity::endsAfterEnd, IlcActivity::startsAtStart, IlcActivity::startsAtEnd, IlcActivity::endsAtStart, and IlcActivity::endsAtEnd. Whichever of those member functions is used to create the precedence constraint, the invoking activity is identified as the one that is constrained to occur after the activity passed as an argument to the member function. Likewise, the activity passed as an argument to the member function is identified as the one that is constrained to occur before the invoking activity. See the example in the class IlcFollowingActivityIterator for a program that illustrates that idea.

See Also:

Constructor and Destructor Summary
public IlcPrecedingActivityIterator(IlcActivity activity, IlcResourceConstraintIteratorFilter filter=IlcAllConstraints)
Method Summary
public IlcPrecedenceConstraintgetPrecedenceConstraint() const
public IlcBoolok() const
public IlcActivityoperator*() const
public IlcPrecedingActivityIterator &operator++()
Constructor and Destructor Detail

IlcPrecedingActivityIterator

public IlcPrecedingActivityIterator(IlcActivity activity, IlcResourceConstraintIteratorFilter filter=IlcAllConstraints)

This constructor creates an iterator to traverse all the activities constrained to precede activity.


Method Detail

getPrecedenceConstraint

public IlcPrecedenceConstraint getPrecedenceConstraint() const

This member function returns the precedence constraint between the activity used by the constructor of the invoking iterator and the activity at its current position.


ok

public IlcBool ok() const

This member function returns IlcTrue if the current position of the iterator is a valid one. It returns IlcFalse if all the activities have been scanned by the iterator.


operator*

public IlcActivity operator*() const

This dereference operator accesses the instance of IlcActivity located at the current position of the iterator. If the iterator is set past the end position, then this operator returns an empty handle.


operator++

public IlcPrecedingActivityIterator & operator++()

This left-increment operator shifts the current position of the iterator.