35 typedef boost::tokenizer<boost::escaped_list_separator<char> >
37 CsvTokenizer tok(line);
40 for (CsvTokenizer::iterator i = tok.begin();
41 i != tok.end(); ++i, ++col) {
47 if (firstLineIsHeaders && csvRow == 0)
50 int dataRow = firstLineIsHeaders ? csvRow - 1 : csvRow;
52 if (numRows != -1 && dataRow >= numRows)
64 int i = std::strtol(s.c_str(), &end, 10);
68 double d = std::strtod(s.c_str(), &end);
75 model->
setData(dataRow, col, data);
virtual bool insertColumns(int column, int count, const WModelIndex &parent=WModelIndex())
static WString fromUTF8(const std::string &value, bool checkValid=false)
virtual bool insertRows(int row, int count, const WModelIndex &parent=WModelIndex())
virtual int rowCount(const WModelIndex &parent=WModelIndex()) const =0
virtual int columnCount(const WModelIndex &parent=WModelIndex()) const =0
virtual bool setHeaderData(int section, Orientation orientation, const boost::any &value, int role=EditRole)
virtual bool setData(const WModelIndex &index, const boost::any &value, int role=EditRole)