#ifndef PARSE_CSV__H #define PARSE_CSV__H #include struct qstring : public std::string { int q; // was explicitly quoted // Constructors: qstring(): q(0) {} qstring(int const _q): q(_q) {} qstring(std::string const &s): std::string(s), q(0) {} qstring(std::string const &s, int const _q): std::string(s), q(_q) {} }; // Helper functions, not class member functions: // Simple case, do nothing: template inline void set_q(T& target, int const val) {} template inline int get_q(T const& target) {return 0;} // Specialization: Fancy case, actually act on q: template<> inline void set_q(qstring& target, int const val) { target.q = val; } template<> inline int get_q(qstring const& target){ return target.q; } template std::vector readCSVRow(std::istream& input); template std::vector > readCSV(std::istream &in); template int count_header(std::vector > const aoa); #endif