NO FRAMES

Class IloExtractableArray

Definition file: ilconcert/iloextractable.h

An instance of this class is an array of extractable objects (instances of the class IloExtractable or its subclasses).

Instances of IloExtractableArray are extensible. That is, you can add more elements to such an array. References to an array change whenever an element is added to or removed from the array.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

For information on arrays, see the concept Arrays

See Also:

Constructor Summary
public IloExtractableArray(IloDefaultArrayI *)
public IloExtractableArray(const IloExtractableArray &)
public IloExtractableArray(const IloEnv, IloInt)
public IloExtractableArray(const IloEnv, IloInt, const IloExtractable, const IloExtractable v1...)
Method Summary
public voidadd(IloInt, const IloExtractable)
public voidadd(const IloExtractable)
public voidadd(const IloExtractableArray)
public voidendElements()
Constructor Detail

IloExtractableArray

public IloExtractableArray(IloDefaultArrayI * i)

This constructor creates an empty array of elements. You cannot create instances of the undocumented class IloDefaultArrayI. As a parameter in this default constructor, it allows you to pass 0 (zero) as a value to an optional parameter in functions and member functions that accept an array as a parameter.


IloExtractableArray

public IloExtractableArray(const IloExtractableArray & r)

This copy constructor creates a handle to the array of extractable objects indicated by copy.


IloExtractableArray

public IloExtractableArray(const IloEnv env, IloInt n)

This constructor creates an array of n elements, each of which is an empty handle.


IloExtractableArray

public IloExtractableArray(const IloEnv env, IloInt n, const IloExtractable v0, const IloExtractable v1... )

This constructor creates an array of n extractable objects for use in a model.


Method Detail

add

public void add(IloInt more, const IloExtractable x)

This member function appends extr to the invoking array multiple times. The parameter more indicates how many times.


add

public void add(const IloExtractable x)

This member function appends extr to the invoking array.


add

public void add(const IloExtractableArray x)

This member function appends the elements in array to the invoking array.


endElements

public void endElements()

This member function calls IloExtractable::end for each of the elements in the invoking array and then calls IloExtractableArray::clear for the array itself. This member function is the recommended way to delete the elements of an array.