CsvUtil.h 604 B

1234567891011121314151617181920212223242526
  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. #include <iostream>
  10. namespace Wt {
  11. class WObject;
  12. class WAbstractItemModel;
  13. class WStandardItemModel;
  14. }
  15. extern void readFromCsv(std::istream& f, Wt::WAbstractItemModel *model,
  16. int numRows = -1, bool firstLineIsHeaders = true);
  17. extern Wt::WStandardItemModel *csvToModel(const std::string& csvFile,
  18. Wt::WObject *parent,
  19. bool firstLineIsHeader = true);
  20. #endif // CSV_UTIL_H_