forgot to add some files
[supertux.git] / src / lispwriter.h
1 #ifndef __LISPWRITER_H__
2 #define __LISPWRITER_H__
3
4 #include <iostream>
5 #include <vector>
6
7 class LispWriter
8 {
9 public:
10   LispWriter(std::ostream& out);
11   ~LispWriter();
12
13   void writeComment(const std::string& comment);
14   
15   void startList(const std::string& listname);
16
17   void writeInt(const std::string& name, int value);
18   void writeFloat(const std::string& name, float value);
19   void writeString(const std::string& name, const std::string& value);
20   void writeBool(const std::string& name, bool value);
21   void writeIntVector(const std::string& name, const std::vector<int>& value);
22   void writeIntVector(const std::string& name, const std::vector<unsigned int>& value);
23   // add more write-functions when needed...
24   
25   void endList(const std::string& listname);
26
27 private:
28   void indent();
29     
30   std::ostream& out;
31   int indent_depth;
32   std::vector<std::string> lists;
33 };
34
35 #endif
36