Wt examples 3.3.12
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 bvba, Kessel-Lo, 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
12namespace Wt {
13 class WObject;
14 class WAbstractItemModel;
15 class WStandardItemModel;
16}
17
18extern void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
19 int numRows = -1, bool firstLineIsHeaders = true);
20
21extern Wt::WStandardItemModel *csvToModel(const std::string& csvFile,
22 Wt::WObject *parent,
23 bool firstLineIsHeader = true);
24
25#endif // CSV_UTIL_H_
void readFromCsv(std::istream &f, Wt::WAbstractItemModel *model, int numRows=-1, bool firstLineIsHeaders=true)
Utility function that reads a model from a CSV file.
Definition CsvUtil.C:56
Wt::WStandardItemModel * csvToModel(const std::string &csvFile, Wt::WObject *parent, bool firstLineIsHeader=true)
Definition CsvUtil.C:41

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8