Skip to main content
FRAMES NO FRAMES

Class IloCsvTableReader::LineIterator

Definition file: ilconcert/ilocsvreader.h
Map of IloCsvTableReader::LineIteratorIloCsvTableReader::LineIteratorIloCsvTableReader::LineIterator
Line-iterator for csv table readers.

LineIterator is a nested class of the class IloCsvTableReader. It allows you to step through all the lines of a table from a csv data file (except blank lines and commented lines) on which the table csv reader was created.

Method Summary
public voidend()
public LineIterator()
public LineIterator(IloCsvTableReader csv)
public IloBoolok() const
public IloCsvLineoperator*() const
public LineIterator &operator++()
Method Detail

LineIterator

public LineIterator()

This constructor creates an empty LineIterator object.

This object must be assigned before it can be used.


LineIterator

public LineIterator(IloCsvTableReader csv)

This constructor creates an iterator to traverse all the lines in the table csv data file on which the csv reader csv was created.

The iterator does not traverse blank lines and commented lines.


end

public void end()

Method to be called after the use of the iterator such that all memory is freed


ok

public IloBool ok() const

This member function returns IloTrue if the current position of the iterator is a valid one.

It returns IloFalse if the iterator reaches the end of the table.


operator*

public IloCsvLine operator*() const

This operator returns the current instance of IloCsvLine (representing the current line in the csv file); the one to which the invoking iterator points.


operator++

public LineIterator & operator++()

This left-increment operator shifts the current position of the iterator to the next instance of IloCsvLine representing the next line in the file.