␉␉private:␍␊ |
␉␉␉std::vector<std::string> header;␍␊ |
␉␉␉bool skipheader;␍␊ |
␉␉␉char delimiter_char;␍␊ |
␉␉␉std::string delimiter_char; // this is a string because the split function helper is expecting a string, but really this is just a char␍␊ |
␉␉public:␍␊ |
␉␉␉const char * newline;␍␊ |
␉␉␉// Adding support for custom delimiter character␍␊ |
␉␉␉// Based on the patch by Hanifa␍␊ |
␉␉␉// https://code.google.com/p/csvpp/issues/detail?id=2␍␊ |
␉␉␉RowReader(char delimiter_char = ',', bool skipheader=false,const char * newline="\n") : skipheader(skipheader), newline(newline) { }␍␊ |
␉␉␉RowReader(std::string delimiter_char = ',', bool skipheader=false,const char * newline="\n") : skipheader(skipheader), newline(newline) { }␍␊ |
␉␉␉void clear() { header.clear(); }␍␊ |
␉␉␉friend std::istream & operator>>(std::istream & os, RowReader & r);␍␊ |
␉␉␉friend std::ostream & operator<<(std::ostream & os, const RowWriter & r);␍␊ |