-converted remaining classes to GameObject
[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 write_comment(const std::string& comment);
14   
15   void start_list(const std::string& listname);
16
17   void write_int(const std::string& name, int value);
18   void write_float(const std::string& name, float value);
19   void write_string(const std::string& name, const std::string& value);
20   void write_bool(const std::string& name, bool value);
21   void write_int_vector(const std::string& name, const std::vector<int>& value);
22   void write_int_vector(const std::string& name, const std::vector<unsigned int>& value);
23   // add more write-functions when needed...
24   
25   void end_list(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