Skip to main content
FRAMES NO FRAMES

Class IloOplDataElements

Definition file: ilopl/iloopldatasource.h
Map of IloOplDataElementsIloOplDataElementsIloOplDataElementsIloOplDataSource
Data elements used by an OPL model instance.

An instance of this class represents the data used by an OPL model. It can be used as a data source for another model instance.

See Also:

Method Summary
public voidaddElement(IloOplElement element)
public voidaddElementAs(const char * name, IloOplElement element)
public IloOplElementgetElement(const char * name) const
public IloOplDataElements(IloEnv env)
public IloOplElementmakeElement(const char * name, IloTuple value) const
public IloOplElementmakeElement(const char * name, const char * value) const
public IloOplElementmakeElement(const char * name, IloNum value) const
public IloOplElementmakeElement(const char * name, IloInt value) const
public IloOplElementIteratormakeElementIterator()
public voidsetElement(IloOplElement element)
Inherited Methods from IloOplDataSource
end, getDataSourceName, IloOplDataSource, IloOplDataSource, IloOplDataSource
Method Detail

IloOplDataElements

public IloOplDataElements(IloEnv env)

Constructs empty collections of data elements.

Parameters:

env
The environment in which to create the collection.

addElement

public void addElement(IloOplElement element)

Adds an element to this collection.

The collection does not take ownership of the allocated memory.

Parameters:

element
The element to add.

addElementAs

public void addElementAs(const char * name, IloOplElement element)

Adds an element to this collection, with a different name.

The collection does not take ownership of the allocated memory.

Parameters:

name
The name for the added element.
element
The element to add.

getElement

public IloOplElement getElement(const char * name) const

Returns a named data element.

Parameters:

name
The name of the desired data element.

makeElement

public IloOplElement makeElement(const char * name, IloTuple value) const

Creates a new data element, which can be added to this collection.

The caller takes ownership of the allocated memory.

Parameters:

name
The name for the new element.
value
The value of the new element.

Returns:

The IloOplElementIterator being created.

makeElement

public IloOplElement makeElement(const char * name, const char * value) const

Creates a new data element, which can be added to this collection.

The caller takes ownership of the allocated memory.

Parameters:

name
The name for the new element.
value
The value of the new element.

Returns:

The IloOplElementIterator being created.

makeElement

public IloOplElement makeElement(const char * name, IloNum value) const

Creates a new data element, which can be added to this collection.

The caller takes ownership of the allocated memory.

Parameters:

name
The name for the new element.
value
The value of the new element.

Returns:

The IloOplElementIterator being created.

makeElement

public IloOplElement makeElement(const char * name, IloInt value) const

Creates a new data element, which can be added to this collection.

The caller takes ownership of the allocated memory.

Parameters:

name
The name for the new element.
value
The value of the new element.

Returns:

The IloOplElementIterator being created.

makeElementIterator

public IloOplElementIterator makeElementIterator()

Returns a new iterator for the elements in this model. The caller is responsible for ending the iterator.

Returns:

The IloOplElementIterator being created.

setElement

public void setElement(IloOplElement element)

Replaces an element in this collection.

The collection does not take ownership of the allocated memory.

Parameters:

element
The element to add.