Skip to main content
FRAMES NO FRAMES

Class IloOplDataSource

Definition file: ilopl/iloopldatasource.h
Map of IloOplDataSourceIloOplDataSourceIloOplDataElementsIloOplDataSource
Provide data for an OPL model.

This class represents a source from which an OPL model can read data. Refer also to the Interfaces User's Manual.

See Also:

Method Summary
public voidend()
public const char *getDataSourceName() const
public IloOplDataSource(IloOplDataSourceBaseI * impl)
public IloOplDataSource(IloEnv env, const char * filename)
public IloOplDataSource(IloEnv env, std::istream & ins, const char * name)
Method Detail

IloOplDataSource

public IloOplDataSource(IloOplDataSourceBaseI * impl)

Constructor taking the implementation of a custom data source.

Parameters:

impl
A pointer to the implementation object.

IloOplDataSource

public IloOplDataSource(IloEnv env, const char * filename)

Constructor for reading data from a data file. The file has to contain OPL data file syntax. Refer also to the Interfaces User's Manual.

Parameters:

env
The environment to allocate memory.
filename
The path to the data file.

IloOplDataSource

public IloOplDataSource(IloEnv env, std::istream & ins, const char * name)

Constructor for reading data from an input stream. The stream has to provide OPL data file syntax. Refer also to the Interfaces User's Manual.

Parameters:

env
The environment to allocate memory.
ins
The path to the data file.
name
The name for this data source.

end

public void end()

Clears the memory used by this object


getDataSourceName

public const char * getDataSourceName() const

Returns the name of this data source.