-
Notifications
You must be signed in to change notification settings - Fork 1
/
cstreamwriter.h
40 lines (27 loc) · 965 Bytes
/
cstreamwriter.h
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
34
35
36
37
38
39
40
#ifndef CSTREAMWRITER_H
#define CSTREAMWRITER_H
#include "map.h"
#include <QFile>
#include <QTextStream>
class CStreamWriter
{
public:
CStreamWriter(QFile* file);
void writeEndl();
void writeInclude(QString file);
void writeNode(Node* n, QString prefix, int index, bool comma=false);
void writeNodes(QList<Node*>* nodes, QString prefix);
void writePaths(QList<Node*>* nodes, QString prefix);
void writeVisibleNode(Node* n, bool comma=false);
void writeVisibleNodes(QList<Node*>* nodes, QString prefix);
void writePathBehavior(PathBehavior* p, bool comma=false);
void writePathBehaviors(QList<PathBehavior*>* paths, QString prefix);
void writeMapObject(MapObject* mapObject);
void writeMapObjects(QList<MapObject*>* mapObjects, quint8 type, QString prefix);
void writeSprites(Map* map, QString prefix);
private:
QFile* file;
QTextStream* stream;
int tabCount;
};
#endif // CSTREAMWRITER_H