39 bool load(
const std::string &fileName);
51 double getValue(
int row,
int column);
56 bool checkNumber(
const std::string &s,
double &value);
58 std::vector<std::string> m_headers;
59 std::vector<std::vector<double> > m_values;
60 std::vector<std::vector<bool> > m_map;
Base class which allows an error message to be set.
Definition: errorbase.h:49
int getNumberOfColumns()
Returns the number of columns in the loaded file.
Definition: csvfile.cpp:116
int getNumberOfRows()
Returns the number of rows in the loaded file.
Definition: csvfile.cpp:123
This is a helper class for reading CSV files, which are assumed to hold numbers.
Definition: csvfile.h:32
bool load(const std::string &fileName)
Try to load the specified file, setting the error string if failed.
Definition: csvfile.cpp:14
double getValue(int row, int column)
Returns the stored value for the specified position.
Definition: csvfile.cpp:137
bool hasValue(int row, int column)
Returns true if a numerical value exists for the specified position.
Definition: csvfile.cpp:128
const std::string getColumnName(int col) const
Returns the name of the specified column (from the header).
Definition: csvfile.cpp:142