blob: 940c02a6d8ccb2d5f8000025bcd3425bb1798c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <QtGlobal>
#include <QObject>
#include <QStringList>
#include <QIODevice>
#include <QTextCodec>
#include <QRegExp>
#include <QtGlobal>
#ifdef BUILD_csv
# define CSV_EXPORT Q_DECL_EXPORT
#else
# define CSV_EXPORT Q_DECL_IMPORT
#endif
class CSV_EXPORT CSV
{
public:
QString readLine();
bool parseLine(QStringList& ret);
void setCodec(const char* codecName);
static bool getGameData(const int gameID, unsigned char* table, QString& gamename);
private:
CSV(QIODevice* device);
QIODevice* m_device;
QString m_string;
int m_pos;
static const QTextCodec* m_codec;
static const QRegExp m_rx, m_rx2;
};
|