libdballe 5.10
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
dballe::CSVReader Class Reference
Inheritance diagram for dballe::CSVReader:
dballe::IstreamCSVReader

Public Member Functions

bool move_to_data (unsigned number_col=0)
 Find the first line where the given column exists and starts with a number.
bool next ()
 Read the next CSV line, returning false if EOF is reached.

Static Public Member Functions

static std::string unescape (const std::string &csvstr)

Data Fields

std::string line
 Last line read.
std::vector< std::string > cols
 Parsed CSV columns for the last line read.

Protected Member Functions

virtual bool nextline ()=0
 Read one line from the input source, returning false if EOF is reached.

Member Function Documentation

bool dballe::CSVReader::move_to_data ( unsigned  number_col = 0)

Find the first line where the given column exists and starts with a number.

This can be used to skip titles and empty lines, moving to the start of the real data. Real data is identified by using a column that starts with text in the headers and number in the data.

Returns:
true if a data line has been found, false if we reached EOF

The documentation for this class was generated from the following file: