#include <fstream>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <Wt/WAbstractItemModel>
#include <Wt/WStandardItemModel>
#include <Wt/WStandardItem>
#include <Wt/WString>
#include "CsvUtil.h"
Go to the source code of this file.
|
Wt::WStandardItemModel * | csvToModel (const std::string &csvFile, Wt::WObject *parent, bool firstLineIsHeaders) |
|
void | readFromCsv (std::istream &f, Wt::WAbstractItemModel *model, int numRows, bool firstLineIsHeaders) |
| Utility function that reads a model from a CSV file. More...
|
|
◆ csvToModel()
Wt::WStandardItemModel* csvToModel |
( |
const std::string & |
csvFile, |
|
|
Wt::WObject * |
parent, |
|
|
bool |
firstLineIsHeaders |
|
) |
| |
Definition at line 41 of file CsvUtil.C.
45 std::ifstream f(csvFile.c_str());
48 Wt::WStandardItemModel *result =
new Wt::WStandardItemModel(0, 0, parent);
void readFromCsv(std::istream &f, Wt::WAbstractItemModel *model, int numRows, bool firstLineIsHeaders)
Utility function that reads a model from a CSV file.