The Battle for Wesnoth  1.19.10+dev
Functions
io Namespace Reference

Functions

config read (std::istream &in, abstract_validator *validator)
 
config read (const std::string &in, abstract_validator *validator)
 
template<typename Decompressor >
config read_compressed (std::istream &file, abstract_validator *validator)
 
config read_gz (std::istream &file, abstract_validator *validator)
 Might throw a std::ios_base::failure especially a gzip_error. More...
 
config read_bz2 (std::istream &file, abstract_validator *validator)
 Might throw a std::ios_base::failure especially bzip2_error. More...
 
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)
 
static void write_internal (const config &cfg, std::ostream &out, std::string &textdomain, std::size_t tab=0)
 
static void write_internal (const configr_of &cfg, std::ostream &out, std::string &textdomain, std::size_t tab=0)
 
void write (std::ostream &out, const configr_of &cfg, unsigned int level)
 
template<typename Compressor >
void write_compressed (std::ostream &out, const configr_of &cfg)
 
void write_gz (std::ostream &out, const configr_of &cfg)
 
void write_bz2 (std::ostream &out, const configr_of &cfg)
 

Function Documentation

◆ read() [1/2]

config io::read ( const std::string &  in,
abstract_validator validator 
)

Definition at line 632 of file parser.cpp.

References in, and validator.

◆ read() [2/2]

config io::read ( std::istream &  in,
abstract_validator validator 
)

◆ read_bz2()

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

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

Definition at line 689 of file parser.cpp.

References validator.

Referenced by savegame::read_save_file().

◆ read_compressed()

template<typename Decompressor >
config io::read_compressed ( std::istream &  file,
abstract_validator validator 
)

Definition at line 639 of file parser.cpp.

References utils::views::filter, LOG_CF, and validator.

◆ read_gz()

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

◆ write()

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

◆ write_bz2()

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

Definition at line 788 of file parser.cpp.

◆ write_close_child()

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

Definition at line 708 of file parser.cpp.

References game_config::images::level.

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

◆ write_compressed()

template<typename Compressor >
void io::write_compressed ( std::ostream &  out,
const configr_of cfg 
)

Definition at line 771 of file parser.cpp.

References utils::views::filter, and write().

◆ write_gz()

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

◆ write_internal() [1/2]

static void io::write_internal ( const config cfg,
std::ostream &  out,
std::string &  textdomain,
std::size_t  tab = 0 
)
static

◆ write_internal() [2/2]

static void io::write_internal ( const configr_of cfg,
std::ostream &  out,
std::string &  textdomain,
std::size_t  tab = 0 
)
static

◆ write_key_val()

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

◆ write_open_child()

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

Definition at line 703 of file parser.cpp.

References game_config::images::level.

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