Overview | Group | Tree | Graph | Index | Concepts |
It is sometimes useful to associate a constrained variable with an element of the domain of a constrained variable. If the elements of a domain are objects, the associated values can correspond to a specific constrained attribute of these objects.
The following constraints and expressions use this kind of indirection:
IlcSum
, IlcMin
, IlcMax
, and
IlcUnion
.
IlcAnyToIntFunction
is the handle class of the object that
makes the correspondence between an object element and an integer value.
An object of this handle class uses the virtual member function IlcIntToIntExpFunctionI::getValue from its implementation class to obtain the associated constrained variable or expression of an element of a domain.
See Also:
Constructor Summary | |
---|---|
public | IlcAnyToIntFunction() |
public | IlcAnyToIntFunction(IlcIntToIntFunctionI * impl) |
Method Summary | |
---|---|
public IlcIntToIntFunctionI * | getImpl() const |
public IlcInt | getValue(IlcAny elt) const |
public void | operator=(const IlcAnyToIntFunction & h) |
Constructor Detail |
---|
This constructor creates an empty handle. You must initialize it before you use it.
This constructor creates a handle object from a pointer to an implementation object.
Method Detail |
---|
This member function returns a pointer to the implementation object of the invoking handle.
This member function returns the integer value associated with the object element elt
.
This operator assigns an address to the handle pointer of the invoking object. That address is the location of the implementation object of the provided argument.