The Battle for Wesnoth  1.19.7+dev
Functions
parser.hpp File Reference
#include "config.hpp"
#include "configr_assign.hpp"
#include "serialization/tokenizer.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,
const std::string &  in,
abstract_validator validator = nullptr 
)

Definition at line 634 of file parser.cpp.

References in, and validator.

◆ read() [2/2]

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

◆ read_bz2()

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 691 of file parser.cpp.

References validator.

Referenced by savegame::read_save_file().

◆ read_gz()

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

◆ 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 790 of file parser.cpp.

◆ write_close_child()

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

Definition at line 710 of file parser.cpp.

References game_config::images::level.

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 
)

◆ write_open_child()

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

Definition at line 705 of file parser.cpp.

References game_config::images::level.

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