Wt examples  4.10.4
CsvUtil.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 #ifndef CSV_UTIL_H_
8 #define CSV_UTIL_H_
9 
10 #include <iostream>
11 
12 using namespace Wt;
13 
14 namespace Wt {
15  class WObject;
16  class WAbstractItemModel;
17  class WStandardItemModel;
18 }
19 
20 extern void readFromCsv(std::istream& f, std::shared_ptr<WAbstractItemModel> model,
21  int numRows = -1, bool firstLineIsHeaders = true);
22 
23 extern std::shared_ptr<WStandardItemModel> csvToModel(const std::string& csvFile,
24  bool firstLineIsHeader = true);
25 
26 #endif // CSV_UTIL_H_
std::shared_ptr< WStandardItemModel > csvToModel(const std::string &csvFile, bool firstLineIsHeader=true)
Definition: CsvUtil.C:40
void readFromCsv(std::istream &f, std::shared_ptr< WAbstractItemModel > model, int numRows=-1, bool firstLineIsHeaders=true)
Definition: CsvUtil.C:54