Moved some parts to a static lib so both the executable and the tests can link to it.

Written additional tests.
This commit is contained in:
eelke 2017-02-26 19:29:50 +01:00
parent 0a809a7288
commit d0ea9dfa0c
39 changed files with 1767 additions and 493 deletions

23
core/CsvWriter.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef CSVWRITER_H
#define CSVWRITER_H
#include <ostream>
#include <QTextStream>
class CsvWriter {
public:
CsvWriter();
explicit CsvWriter(QTextStream *output);
void setDestination(QTextStream *output);
void setSeperator(QChar ch);
void setQuote(QChar ch);
void writeField(QString field);
void nextRow();
private:
QChar m_seperator = ',';
QChar m_quote = '"';
QTextStream *m_output = nullptr;
int m_column = 0;
};
#endif // CSVWRITER_H