OpenLexocad  27.1
CsvTool.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QFile>
4 #include <QTextStream>
5 
6 namespace Base
7 {
8 class LX_BASE_EXPORT CsvTool
9 {
10 public:
11  CsvTool();
12  ~CsvTool();
13 
14  bool openForReading(const QString& fileName);
15  bool readLine(std::vector<QString>& items);
16 
17  bool openForWriting(const QString& fileName);
18  bool writeLine(const std::vector<QString>& items);
19 
20  void setSeparator(QChar separator) { _separator = separator; }
21 
22 private:
23  QFile _file;
24  QTextStream _ts;
25  QChar _separator = ';';
26 };
27 
28 } // namespace Base
void setSeparator(QChar separator)
Definition: CsvTool.h:20
Definition: CsvTool.h:8
Definition: AbstractXMLReader.h:5
Base::String fileName
Definition: CoreDocument.h:186