serialization/parser.hpp

Go to the documentation of this file.
00001 /* $Id: parser.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2003 by David White <dave@whitevine.net>
00004    Copyright (C) 2005 - 2012 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 as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY.
00013 
00014    See the COPYING file for more details.
00015 */
00016 
00017 /** @file */
00018 
00019 #ifndef SERIALIZATION_PARSER_HPP_INCLUDED
00020 #define SERIALIZATION_PARSER_HPP_INCLUDED
00021 
00022 #include "global.hpp"
00023 #include "config.hpp"
00024 
00025 
00026 class abstract_validator;
00027 // Read data in, clobbering existing data.
00028 void read(config &cfg, std::istream &in,
00029           abstract_validator * validator = NULL);   // Throws config::error
00030 void read(config &cfg, std::string &in,
00031           abstract_validator * validator = NULL);   // Throws config::error
00032 void read_gz(config &cfg, std::istream &in,
00033              abstract_validator * validator = NULL);
00034 
00035 void write(std::ostream &out, config const &cfg, unsigned int level=0);
00036 void write_gz(std::ostream &out, config const &cfg);
00037 void write_key_val(std::ostream &out, const std::string &key, const config::attribute_value &value, unsigned 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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:09 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs