parser.hpp

Go to the documentation of this file.
00001 /* $Id: parser.hpp 23842 2008-02-16 08:47:16Z mordante $ */
00002 /*
00003    Copyright (C) 2003 by David White <dave@whitevine.net>
00004    Copyright (C) 2005 - 2008 by Guillaume Melquiond <guillaume.melquiond@gmail.com>
00005    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License version 2
00009    or at your option any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 //! @file serialization/parser.hpp
00017 //!
00018 
00019 #ifndef SERIALIZATION_PARSER_HPP_INCLUDED
00020 #define SERIALIZATION_PARSER_HPP_INCLUDED
00021 
00022 #include "global.hpp"
00023 
00024 #include <iostream>
00025 #include <iosfwd>
00026 #include <vector>
00027 
00028 class config;
00029 class t_string;
00030 
00031 // Read data in, clobbering existing data.
00032 void read(config &cfg, std::istream &in, std::string* error_log = NULL);    // Throws config::error
00033 void read(config &cfg, std::string &in, std::string* error_log = NULL);     // Throws config::error
00034 void read_gz(config &cfg, std::istream &in, std::string* error_log=NULL);
00035 
00036 void write(std::ostream &out, config const &cfg, unsigned int level=0);
00037 void write_key_val(std::ostream &out, const std::string &key, const t_string &value, unsigned int level, std::string &textdomain);
00038 void write_open_child(std::ostream &out, const std::string &child, unsigned int level);
00039 void write_close_child(std::ostream &out, const std::string &child, unsigned int level);
00040 
00041 #endif

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs