Skip to main content
FRAMES NO FRAMES

Class IloSymbolSet::Iterator

Definition file: ilopl/ilosymbol.h
Map of IloSymbolSet::IteratorIloSymbolSet::IteratorIloSymbolSet::IteratorIloDataIterator
This class is an iterator that traverses the elements of a finite set of string values.

An instance of the nested class IloSymbolSet::Iterator is an iterator that traverses the elements of a finite set of string values (an instance of IloSymbolSet).

See Also:

Method Summary
public Iterator(const IloSymbolSet coll)
public IloBoolok() const
public const char *operator*()
public voidoperator++()
Method Detail

Iterator

public Iterator(const IloSymbolSet coll)

Constructor for the iterator on an IloSymbolSet.

Parameters:

coll
is the collection you want to iterate on.

ok

public IloBool ok() const

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

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

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

Returns:

IloTrue if there is a current element and the invoking iterator points to it.

operator*

public const char * operator*()

Returns the string currently pointed to by the iterator.

Returns:

The char string at the iterator location.

operator++

public void operator++()

This operator advances the iterator to point to the next value in the dataset.