The Battle for Wesnoth  1.15.2+dev
Functions
parser.hpp File Reference
#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, const configr_of &cfg, unsigned int level=0)
 
void write_gz (std::ostream &out, const configr_of &cfg)
 
void write_bz2 (std::ostream &out, const configr_of &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

◆ read() [1/2]

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

◆ read() [2/2]

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

Definition at line 630 of file parser.cpp.

◆ read_bz2()

void read_bz2 ( config cfg,
std::istream &  file,
abstract_validator validator 
)

Might throw a std::ios_base::failure especially bzip2_error.

Definition at line 687 of file parser.cpp.

Referenced by savegame::read_save_file().

◆ read_gz()

void read_gz ( config cfg,
std::istream &  file,
abstract_validator validator 
)

◆ write()

void write ( std::ostream &  out,
const configr_of cfg,
unsigned int  level = 0 
)

◆ write_bz2()

void write_bz2 ( std::ostream &  out,
const configr_of cfg 
)

Definition at line 786 of file parser.cpp.

◆ write_close_child()

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

Definition at line 706 of file parser.cpp.

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

◆ write_gz()

void write_gz ( std::ostream &  out,
const configr_of cfg 
)

◆ write_key_val()

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

Definition at line 692 of file parser.cpp.

References config_attribute_value::apply_visitor().

Referenced by write_internal().

◆ write_open_child()

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

Definition at line 701 of file parser.cpp.

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