Overview | Group | Tree | Graph | Index | Concepts |
An instance of IloCsvTableReader
is used to read a csv table
with a specified format.
An instance is built using a pointer to an implementation class of
IloCsvReader
, which must be created first.
Constructor and Destructor Summary | |
---|---|
public | IloCsvTableReader() |
public | IloCsvTableReader(IloCsvTableReaderI *) |
public | IloCsvTableReader(const IloCsvTableReader &) |
public | IloCsvTableReader(IloCsvReaderI *, const char *) |
Method Summary | |
---|---|
public void | end() |
public IloCsvLine | getCurrentLine() |
public IloEnv | getEnv() |
public IloCsvTableReaderI * | getImpl() |
public IloCsvLine | getLineByKey(IloInt, const char *, ...) |
public IloCsvLine | getLineByNumber(IloInt) |
public const char * | getNameOfTable() |
public IloInt | getNumberOfColumns() |
public IloInt | getNumberOfItems() |
public IloInt | getNumberOfKeys() |
public IloInt | getPosition(const char *) |
public IloBool | isHeadingExists(const char *) |
public void | operator=(const IloCsvTableReader &) |
public IloBool | printKeys() |
Inner Class |
---|
IloCsvTableReader::LineIterator |
Constructor and Destructor Detail |
---|
This constructor creates a table csv reader object whose handle pointer is null. This object must be assigned before it can be used.
This constructor creates a handle object (an instance of
IloCsvReader
) from a pointer to an
implementation object (an
instance of the class IloCsvReaderI
).
This copy constructor creates a handle from a reference to a table csv reader object.
The table csv reader object and csv
both point to the same
implementation object.
This constructor creates a table csv reader object using the
implementation class of a csv reader csvimpl
. The second
parameter is the name of the table.
Method Detail |
---|
This member function deallocates the memory used by the table csv reader.
If you no longer need the table csv reader, calling this member function can reduce memory consumption.
This member function returns the last line read using
getLineByKey
or getLineByNumber
.
This member function returns the environment object corresponding to the invoking table csv reader.
This member function returns a pointer to the implementation object corresponding to the invoking table csv reader.
This member function takes numberOfKeys as parameters. These parameters are used as one key to identify a line. If the specified number of keys is less than the number of keys of the table, this member function throws an exception.
Otherwise, it returns an instance of IloCsvLine
representing
the line having (key1, key2, ...)
in the data file.
This member function returns an instance of
IloCsvLine
representing the line number i
in the data file if it exists.
Otherwise, it throws an exception.
Each time getLineByNumber
or getLineByKey
is
called, the previous line read by one of those methods is deleted.
This member function returns the name of the table.
This member function returns the number of columns in the table. If the first column contains the name of the table, it is ignored.
This member function returns the number of lines of the table excluding blank lines, commented lines, and the header line.
isMultiTable
has the value IloFalse
.This member function returns the number of keys in the table.
This member function returns the position (column number) of
headingName
in the table.
This member function returns IloTrue
if the column header
named headingName
exists. Otherwise, it returns
IloFalse
.
This operator assigns an address to the handle pointer of the invoking table csv reader.
This address is the location of the implementation object of the argument
csv
.
After execution of this operator, the invoking table csv reader and
csv
both point to the same implementation object.
This member function prints the column headers of keys if they exist. Otherwise, it prints the column numbers of keys.