summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_csv/csv.h
blob: e0eac7ddc8295cb218e7f8cf5896d41c723cbe3c (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
#pragma once
#include <QObject>
#include <QStringList>
#include <QIODevice>
#include <QTextCodec>
#include <QRegExp>
#include <QtGlobal>

class CSV
{
public:
	QString readLine();
	QStringList parseLine();
	static QStringList parseLine(QString line);

	void setCodec(const char* codecName);
    static void getGameData(const int gameID, unsigned char* table, QString& gamename);
private:
	QIODevice *m_device;
	QTextCodec *m_codec;
	QString m_string;
	int m_pos;
	QRegExp m_rx;
    CSV(QIODevice * device);
	CSV(QString &string);	
};