Overview | Group | Tree | Graph | Index | Concepts |
An instance of IloCsvLine
represents a line in a
csv file.
Constructor and Destructor Summary | |
---|---|
public | IloCsvLine() |
public | IloCsvLine(IloCsvLineI *) |
public | IloCsvLine(const IloCsvLine &) |
Method Summary | |
---|---|
public void | copy(const IloCsvLine) |
public IloBool | emptyFieldByHeader(const char *) |
public IloBool | emptyFieldByPosition(IloInt) |
public void | end() |
public IloNum | getFloatByHeader(const char *) |
public IloNum | getFloatByHeaderOrDefaultValue(const char *, IloNum) |
public IloNum | getFloatByPosition(IloInt) |
public IloNum | getFloatByPositionOrDefaultValue(IloInt, IloNum) |
public IloCsvLineI * | getImpl() |
public IloInt | getIntByHeader(const char *) |
public IloInt | getIntByHeaderOrDefaultValue(const char *, IloInt) |
public IloInt | getIntByPosition(IloInt) |
public IloInt | getIntByPositionOrDefaultValue(IloInt, IloInt) |
public IloInt | getLineNumber() |
public IloInt | getNumberOfFields() |
public char * | getStringByHeader(const char *) |
public char * | getStringByHeaderOrDefaultValue(const char *, const char *) |
public char * | getStringByPosition(IloInt) |
public char * | getStringByPositionOrDefaultValue(IloInt, const char *) |
public void | operator=(const IloCsvLine &) |
public IloBool | printValueOfKeys() |
Constructor and Destructor Detail |
---|
This constructor creates a csv line 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
IloCsvLine
) from a pointer to an implementation object (an
instance of the class IloCsvLineI
).
This copy constructor creates a handle from a reference to a csv line
object. The csv line object and csvLine
both point to the same
implementation object.
Method Detail |
---|
This member function returns the real number of the invoking csv line in the data file.
This member function returns IloTrue
if the field denoted
by the string name
in the invoking csv line is empty. Otherwise, it
returns IloFalse
This member function returns IloTrue
if the field denoted by
i
in the invoking csv line is empty. Otherwise, it returns
IloFalse
This member function deallocates the memory used by the csv line. If you no longer need a csv line, you can call this member function to reduce memory consumption.
This member function returns the float contained in the field
name
in the invoking csv line.
If you have a loop in which you are getting a string, integer, or float
by header on several lines with the same header name, it is better for
performance to get the position of the header named name
using
the member function
IloCsvReader::getPosition(name)
than
using IloCsvLine::getFloatByPosition
(position of name
in the header line).
This member function returns the float contained in the field
name
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This member function returns the float contained in the field
i
in the invoking csv line.
This member function returns the float contained in the field
i
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This member function returns a pointer to the implementation object corresponding to the invoking csv line.
This member function returns the integer contained in the field
name
in the invoking csv line.
If you have a loop in which you are getting a string, integer, or float
by header on several lines with the same header name, it is better for
performance to get the position of the header named name
using
the member function
IloCsvReader::getPosition(name)
than
using IloCsvLine::getIntByPosition
(position of name in
the header line).
This member function returns the integer contained in the field
name
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This member function returns the integer contained in the field
i
in the invoking csv line.
This member function returns the integer contained in the field
i
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This member function returns the real number of the invoking csv line in the data file.
This member function returns the number of fields in the line.
This member function returns a reference to the string contained in the
field name
in the invoking csv line.
If you have a loop in which you are getting a string, integer, or float
by header on several lines with the same header name, it is better for
performance to get the position of the header named name
using
the member function
IloCsvReader::getPosition(name)
than
using IloCsvLine::getStringByPosition
(position of
name in the header line).
This member function returns the string contained in the field
name
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This member function returns a reference to the string contained in the
field number i
in the invoking csv line.
This member function returns the string contained in the field
i
in the invoking csv line if this field contains a value.
Otherwise, it returns defaultValue
.
This operator assigns an address to the handle pointer of the invoking
csv line.
This address is the location of the implementation object of the
argument csvLine
.
After execution of this operator, the invoking csv line and
csvLine
both point to the same implementation object.
This member function prints the values of the keys fields in this line.