Skip to main content
FRAMES NO FRAMES

Class IloDataIterator

Definition file: ilconcert/ilocollection.h
Map of IloDataIteratorIloDataIteratorIloDataIterator
A class used to represent an iterator, which may be used to enumerate a collection.

IloDataIterator is a class used to enumerate a collection.

See Also:

Method Summary
public const IloDiscreteDataCollectionI *getCollection() const
public IloBoolok() const
public voidoperator++()
Method Detail

getCollection

public const IloDiscreteDataCollectionI * getCollection() const

This member function returns a data collection.

Returns:

The iterated data collection.

ok

public IloBool ok() const

This member function is used to determine whether there is a current element and the invoking iterator points to it.

To traverse the elements of a finite set of pointers, use the following code:

 IloInt val;
 for(IloXXX::Iterator iter(set); iter.ok(); ++iter){
         val = *iter;
         // do something with val
 }

Returns:

IloTrue if there is a current element and the invoking iterator points to it. Otherwise, it returns IloFalse.

operator++

public void operator++()

This operator advances the iterator to point to the next value in the data set.