NO FRAMES

Class IloExtractableArray

Definition file: ilconcert/iloextractable.h
An array of extractable objects.

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 * i=0)
public IloExtractableArray(const IloExtractableArray & r)
public IloExtractableArray(const IloEnv env, IloInt n=0)
Method Summary
public voidadd(IloInt more, const IloExtractable x)
public voidadd(const IloExtractable x)
public voidadd(const IloExtractableArray x)
public voidendElements()
public voidsetNames(const char * name)
Constructor Detail

IloExtractableArray

public IloExtractableArray(IloDefaultArrayI * i=0)

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


IloExtractableArray

public IloExtractableArray(const IloExtractableArray & r)

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


IloExtractableArray

public IloExtractableArray(const IloEnv env, IloInt n=0)

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


Method Detail

add

public void add(IloInt more, const IloExtractable x)

This member function appends x to the invoking array multiple times. The argument more specifies how many times.


add

public void add(const IloExtractable x)

This member function appends x to the invoking array.


add

public void add(const IloExtractableArray x)

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


endElements

public void endElements()

This member function calls IloExtractable::end for each of the elements in the invoking array. This deletes all the extractables identified by the array, leaving the handles in the array intact. This member function is the recommended way to delete the elements of an array.


setNames

public void setNames(const char * name)

This member function set the name for all elements of the invoking array. All elements must be different, otherwise raise an error.