Overview | Group | Tree | Graph | Index | Concepts |
This macro defines a predicate class named nameI
with
n data members. When n is greater than 0, the types and
names of the data members must be supplied as arguments to the macro. Each
data member is defined by its type T
i and a name
data
i. The call to the macro must be followed
immediately by the body of the isTrue
member function of the
predicate class being defined. Besides the definition of the class
nameI
, this macro also defines a function named
name
that creates an instance of the class nameI
and that returns an instance of the class IlcAnyPredicate
that points to it.
Solver does not check the arity of the predicate that you defined. It
assumes that the size of the array (an instance of IlcAnyArray
) passed as an argument to the member function
IlcAnyPredicate::isTrue
will always be the
same. It also assumes that the name of the array passed as an argument is
val
. That is, you must use that name to define a
predicate.
You are not obliged to use this macro to define predicates on arbitrary
objects. When the macro seems too restrictive for your purposes, we
recommend that you define a predicate class directly by subclassing
IlcAnyPredicateI
.
Since the argument name
is used to name the predicate class,
it is not possible to use the same name for several predicate
definitions.
For an example of how to use a similar macro, see the macro
ILCINTPREDICATE0.
See Also:
IlcAnyArray, ILCANYPREDICATE0, ILCINTPREDICATE0, IlcTableConstraint