FRAMES NO FRAMES

Class IlcResource::ResourceConstraintDeltaIterator

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

This iterator should be used only in a demon triggered by the event IlcResource::whenRankedFirstRC or the event IlcResource::whenRankedLastRC. This iterator traverses the set of resource constraints that have been ranked first (or last) since last execution of the event IlcResource::whenRankedFirstRC (or IlcResource::whenRankedLastRC).

The only possible filters for building this iterator are RankedFirst and RankedLast. Using another filter will throw an exception at construction time.

See Also:

Constructor Summary
public ResourceConstraintDeltaIterator(const IlcResource resource, IlcResource::RankFilter filter)
Method Summary
public IlcBoolok() const
public IlcResourceConstraintoperator*() const
public ResourceConstraintDeltaIterator &operator++()
public ResourceConstraintDeltaIterator &operator--()
Constructor Detail

ResourceConstraintDeltaIterator

public ResourceConstraintDeltaIterator(const IlcResource resource, IlcResource::RankFilter filter)

This constructor creates an iterator to traverse the delta subset of resource constraints specified by the filter on the unary or state resource given as first argument. This constructor should be used only if the ranking information is available on the resource (see IlcResource::hasRankInfo).

In case the filter is RankedFirst, this constructor allows iteration over the new resource constraints that have been ranked first on a resource since last triggering of the event IlcResource::whenRankedLastRC. The iterator is initialized at the first newly ranked first resource constraint, and the ResourceConstraintDeltaIterator::operator++, member function will traverse the set of newly ranked first resource constraints in chronological order (with respect to the start/end time of activities).

In case the filter is RankedLast, this constructor allows iteration over the new resource constraints that have been ranked last on a resource since last triggering of the event IlcResource::whenRankedLastRC. The iterator is initialized at the first newly ranked last resource constraints, and the ResourceConstraintDeltaIterator::operator++, member function will traverse the set of newly ranked first resource constraints in anti-chronological order (with respect to the start/end time of activities).


Method Detail

ok

public IlcBool ok() const

This member function returns IloTrue if the current position of the iterator is a valid one. It returns IloFalse if the subset of resource constraints has been completely scanned by the iterator.


operator*

public IlcResourceConstraint operator*() const

This operator returns the current instance of IlcResourceConstraint, the one to which the invoking iterator points. If the iterator is set past the end position, then this operator returns an empty handle.


operator++

public ResourceConstraintDeltaIterator & operator++()

This left-increment operator shifts the current position of the iterator to the next instance of IlcResourceConstraint.


operator--

public ResourceConstraintDeltaIterator & operator--()

This left-increment operator shifts the current position of the iterator to the previous instance of IlcResourceConstraint.