// $Id: writer.h 2575 2005-06-07 15:59:27Z matzebraun $ // // SuperTux - A Jump'n Run // Copyright (C) 2004 Matthias Braun #include #include namespace lisp { class Writer { public: Writer(const std::string& filename); Writer(std::ostream* out); ~Writer(); void write_comment(const std::string& comment); void start_list(const std::string& listname); void write_int(const std::string& name, int value); void write_float(const std::string& name, float value); void write_string(const std::string& name, const std::string& value, bool translatable = false); void write_bool(const std::string& name, bool value); void write_int_vector(const std::string& name, const std::vector& value); void write_int_vector(const std::string& name, const std::vector& value); // add more write-functions when needed... void end_list(const std::string& listname); private: void indent(); std::ostream* out; bool out_owned; int indent_depth; std::vector lists; }; } //namespace lisp #endif //SUPERTUX_LISPWRITER_H