| Overview | Group | Tree | Graph | Index | Concepts |

This template creates iterators for a given class of extractable objects (denoted
by E in the template) within an instance of
IloEnv.
By default, an iterator created in this way will traverse instances of
E and of its subclasses. You can prevent the iterator from traversing
instances of subclasses of E (that is, you can limit its effect) by setting the
parameter withSubClasses to IloFalse in the constructor of
the iterator.
While an iterator created in this way is working, you must not create nor destroy
any extractable objects in the instance of IloEnv where
it is working. In other words, an iterator created in this way works only in a stable
environment.
An iterator created with this template differs from an instance of
IloModel::Iterator. An instance of
IloModel::Iterator works only on extractable objects
(instances of IloExtractable or its subclasses) that
have explicitly been added to a model (an instance of
IloModel). In contrast, an iterator created with this
template will work on all extractable objects within a given environment, whether or
not they have been explicitly added to a model.
See Also:
IloEnv, IloExtractable, IloModel, IloModel::Iterator
| Constructor Summary | |
|---|---|
public | IloIterator(const IloEnv, IloBool) |
| Method Summary | |
|---|---|
public IloBool | ok() |
public void | operator++() |
| Constructor Detail |
|---|
This template constructor creates an iterator for instances of the class
E. When the parameter withSubClasses is IloTrue
(its default value), the iterator will also work on instances of the subclasses of
E. When withSubClasses is IloFalse, the iterator
works only on instances of E.
| Method Detail |
|---|
This member function returns IloTrue if there is a current element and
the iterator points to it. Otherwise, it returns IloFalse.
This operator advances the iterator to point to the next value in the iteration.