The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
parser.hpp File Reference
#include "global.hpp"
#include "config.hpp"
#include "configr_assign.hpp"
Include dependency graph for parser.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void read (config &cfg, std::istream &in, abstract_validator *validator=nullptr)
 
void read (config &cfg, const std::string &in, abstract_validator *validator=nullptr)
 
void read_gz (config &cfg, std::istream &in, abstract_validator *validator=nullptr)
 might throw a std::ios_base::failure especially a gzip_error More...
 
void read_bz2 (config &cfg, std::istream &in, abstract_validator *validator=nullptr)
 might throw a std::ios_base::failure especially bzip2_error More...
 
void write (std::ostream &out, configr_of const &cfg, unsigned int level=0)
 
void write_gz (std::ostream &out, configr_of const &cfg)
 
void write_bz2 (std::ostream &out, configr_of const &cfg)
 
void write_key_val (std::ostream &out, const std::string &key, const config::attribute_value &value, unsigned level, std::string &textdomain)
 
void write_open_child (std::ostream &out, const std::string &child, unsigned int level)
 
void write_close_child (std::ostream &out, const std::string &child, unsigned int level)
 

Function Documentation

void read ( config cfg,
std::istream &  in,
abstract_validator validator = nullptr 
)
void read ( config cfg,
const std::string in,
abstract_validator validator = nullptr 
)

Definition at line 405 of file parser.cpp.

void read_bz2 ( config cfg,
std::istream &  in,
abstract_validator validator = nullptr 
)

might throw a std::ios_base::failure especially bzip2_error

Definition at line 460 of file parser.cpp.

Referenced by savegame::read_save_file().

void read_gz ( config cfg,
std::istream &  in,
abstract_validator validator = nullptr 
)
void write ( std::ostream &  out,
configr_of const &  cfg,
unsigned int  level = 0 
)
void write_bz2 ( std::ostream &  out,
configr_of const &  cfg 
)

Definition at line 644 of file parser.cpp.

void write_close_child ( std::ostream &  out,
const std::string child,
unsigned int  level 
)

Definition at line 570 of file parser.cpp.

Referenced by config_writer::close_child(), and write_internal().

void write_gz ( std::ostream &  out,
configr_of const &  cfg 
)
void write_key_val ( std::ostream &  out,
const std::string key,
const config::attribute_value value,
unsigned  level,
std::string textdomain 
)

Definition at line 558 of file parser.cpp.

References config::attribute_value::apply_visitor().

Referenced by write_internal().

void write_open_child ( std::ostream &  out,
const std::string child,
unsigned int  level 
)

Definition at line 565 of file parser.cpp.

Referenced by config_writer::open_child(), and write_internal().