The Battle for Wesnoth  1.19.5+dev
Namespaces | Macros | Functions | Variables
statistics_record.cpp File Reference

Manage statistics: saving and reading data. More...

#include "statistics_record.hpp"
#include "log.hpp"
#include "serialization/binary_or_text.hpp"
#include "serialization/string_utils.hpp"
Include dependency graph for statistics_record.cpp:

Go to the source code of this file.

Namespaces

 statistics_record
 

Macros

#define DBG_NG   LOG_STREAM(debug, log_engine)
 
#define ERR_NG   LOG_STREAM(err, log_engine)
 

Functions

static config statistics_record::write_str_int_map (const stats_t::str_int_map &m)
 
static void statistics_record::write_str_int_map (config_writer &out, const stats_t::str_int_map &m)
 
static stats_t::str_int_map statistics_record::read_str_int_map (const config &cfg)
 
static config statistics_record::write_battle_result_map (const stats_t::battle_result_map &m)
 
static void statistics_record::write_battle_result_map (config_writer &out, const stats_t::battle_result_map &m)
 
static stats_t::battle_result_map statistics_record::read_battle_result_map (const config &cfg)
 
static config statistics_record::write_by_cth_map (const stats_t::hitrate_map &m)
 
static void statistics_record::merge_battle_result_maps (stats_t::battle_result_map &a, const stats_t::battle_result_map &b)
 
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 stats_t::hitrate_map statistics_record::read_by_cth_map (const config &cfg)
 
static void statistics_record::merge_str_int_map (stats_t::str_int_map &a, const stats_t::str_int_map &b)
 
static void statistics_record::merge_cth_map (stats_t::hitrate_map &a, const stats_t::hitrate_map &b)
 
std::ostream & operator<< (std::ostream &outstream, const statistics_record::stats_t::hitrate_t &by_cth)
 

Variables

static lg::log_domain log_engine ("engine")
 

Detailed Description

Manage statistics: saving and reading data.

Definition in file statistics_record.cpp.

Macro Definition Documentation

◆ DBG_NG

#define DBG_NG   LOG_STREAM(debug, log_engine)

Definition at line 27 of file statistics_record.cpp.

◆ ERR_NG

#define ERR_NG   LOG_STREAM(err, log_engine)

Definition at line 28 of file statistics_record.cpp.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  outstream,
const statistics_record::stats_t::hitrate_t by_cth 
)

Variable Documentation

◆ log_engine

lg::log_domain log_engine("engine") ( "engine"  )
static