Overview | Group | Tree | Graph | Index | Concepts |
This macro defines an RC Texture factory, a subclass of IloRCTextureFactoryI
named nameI
. The argument
solver
is the name of the IloSolver
that performs
the extraction. Within the macro, this name denotes the solver currently
performing the extraction. The
types and names of the data members must be supplied as arguments to the
macro. Each data member is defined by its type ti
and a name
ai
. The call to the macro must be followed immediately by
the body of the extract
member function of the factory class
being defined. It must return a pointer to an instance of IlcRCTextureFactoryI
that corresponds to the extracted
object. Besides the definition of the class nameI
, this macro
also defines a function named name
that creates an instance of
the class nameI
and returns an instance of the class
IloRCTextureFactoryI*
that points to it.
The use of this macro is the only way to define a new subclass of
IloRCTextureFactoryI
.
Since the argument name
is used to name the factory class,
it is not possible to use the same name for other classes.
Example
This example shows how to define a factory with two data members.
ILORCTEXTUREFACTORY2(MyRCTextureFactory, mySolver, IloInt, iloInt, IloNumVar, iloVar) { use(mySolver, iloVar); IlcIntVar ilcVar = mySolver.getIntVar(iloVar); return new (mySolver.getHeap()) MyIlcRCTextureFactory(mySolver, iloInt, ilcVar); }
For more information, see Texture Measurements.
See Also:
IloRCTextureFactoryI, IloRCTextureFactory, IlcRCTextureFactoryI, IlcRCTextureFactory