26 return static_cast<unsigned long>(
m_data.size());
32 std::getline(str, line);
33 std::replace(std::begin(line), std::end(line),
'\t',
' ');
34 std::stringstream lineStream(line);
39 while (std::getline(lineStream, cell,
separator)) {
43 if (!lineStream && cell.empty()) {
74 if (!file.is_open()) {
75 throw std::ios_base::failure(
"Unable to open file \"" +
filepath +
"\"");
78 rows.push_back((*loop));
103 return static_cast<unsigned long>(
rows.size());
136 return this->
rows[i];
std::vector< std::vector< std::string > > m_data
CSVRow get_row(unsigned i)
unsigned long NumberOfColumns() const
void EqualizeRowLengths()
std::vector< CSVRow > rows
unsigned long NumberOfRows() const
std::vector< std::string > const operator[](unsigned index_i) const
void set_separator(char sep)
void readNextRow(std::istream &str)
void addCell(std::string str)
std::string const & operator[](unsigned index) const
std::vector< std::string > m_data
void setSeparator(char sep)
unsigned long size() const