The Battle for Wesnoth  1.19.1+dev
Classes | Typedefs | Functions
statistics_record Namespace Reference

Classes

struct  stats_t
 
struct  scenario_stats_t
 
struct  campaign_stats_t
 

Typedefs

using team_stats_t = std::map< std::string, stats_t >
 

Functions

static config write_str_int_map (const stats_t::str_int_map &m)
 
static void write_str_int_map (config_writer &out, const stats_t::str_int_map &m)
 
static stats_t::str_int_map read_str_int_map (const config &cfg)
 
static config write_battle_result_map (const stats_t::battle_result_map &m)
 
static void write_battle_result_map (config_writer &out, const stats_t::battle_result_map &m)
 
static stats_t::battle_result_map read_battle_result_map (const config &cfg)
 
static config write_by_cth_map (const stats_t::hitrate_map &m)
 
static void merge_battle_result_maps (stats_t::battle_result_map &a, const stats_t::battle_result_map &b)
 
static stats_t::hitrate_map read_by_cth_map_from_battle_result_maps (const stats_t::battle_result_map &attacks, const stats_t::battle_result_map &defends)
 
static stats_t::hitrate_map read_by_cth_map (const config &cfg)
 
static void merge_str_int_map (stats_t::str_int_map &a, const stats_t::str_int_map &b)
 
static void merge_cth_map (stats_t::hitrate_map &a, const stats_t::hitrate_map &b)
 

Typedef Documentation

◆ team_stats_t

using statistics_record::team_stats_t = typedef std::map<std::string, stats_t>

Definition at line 88 of file statistics_record.hpp.

Function Documentation

◆ merge_battle_result_maps()

static void statistics_record::merge_battle_result_maps ( stats_t::battle_result_map a,
const stats_t::battle_result_map b 
)
static

◆ merge_cth_map()

static void statistics_record::merge_cth_map ( stats_t::hitrate_map a,
const stats_t::hitrate_map b 
)
static

Definition at line 178 of file statistics_record.cpp.

References a, b, and i.

Referenced by statistics_record::stats_t::merge_with().

◆ merge_str_int_map()

static void statistics_record::merge_str_int_map ( stats_t::str_int_map a,
const stats_t::str_int_map b 
)
static

Definition at line 164 of file statistics_record.cpp.

References a, b, and i.

Referenced by merge_battle_result_maps(), and statistics_record::stats_t::merge_with().

◆ read_battle_result_map()

static stats_t::battle_result_map statistics_record::read_battle_result_map ( const config cfg)
static

Definition at line 102 of file statistics_record.cpp.

References config::child_range(), i, and read_str_int_map().

Referenced by statistics_record::stats_t::read().

◆ read_by_cth_map()

static stats_t::hitrate_map statistics_record::read_by_cth_map ( const config cfg)
static

Definition at line 155 of file statistics_record.cpp.

References config::child_range(), and i.

Referenced by statistics_record::stats_t::read().

◆ read_by_cth_map_from_battle_result_maps()

static stats_t::hitrate_map statistics_record::read_by_cth_map_from_battle_result_maps ( const stats_t::battle_result_map attacks,
const stats_t::battle_result_map defends 
)
static

Definition at line 126 of file statistics_record.cpp.

References i, and merge_battle_result_maps().

Referenced by statistics_record::stats_t::read().

◆ read_str_int_map()

static stats_t::str_int_map statistics_record::read_str_int_map ( const config cfg)
static

◆ write_battle_result_map() [1/2]

static void statistics_record::write_battle_result_map ( config_writer out,
const stats_t::battle_result_map m 
)
static

◆ write_battle_result_map() [2/2]

static config statistics_record::write_battle_result_map ( const stats_t::battle_result_map m)
static

Definition at line 80 of file statistics_record.cpp.

References config::add_child(), i, and write_str_int_map().

Referenced by statistics_record::stats_t::write().

◆ write_by_cth_map()

static config statistics_record::write_by_cth_map ( const stats_t::hitrate_map m)
static

Definition at line 115 of file statistics_record.cpp.

References config::add_child(), and i.

Referenced by statistics_record::stats_t::write().

◆ write_str_int_map() [1/2]

static void statistics_record::write_str_int_map ( config_writer out,
const stats_t::str_int_map m 
)
static

Definition at line 48 of file statistics_record.cpp.

References i, utils::join(), p, and config_writer::write_key_val().

◆ write_str_int_map() [2/2]

static config statistics_record::write_str_int_map ( const stats_t::str_int_map m)
static

Definition at line 33 of file statistics_record.cpp.

References config::has_attribute(), i, and n.

Referenced by statistics_record::stats_t::write(), and write_battle_result_map().