The Battle for Wesnoth  1.15.1+dev
Classes | Namespaces | Typedefs | Functions
statistics.hpp File Reference
#include <string>
#include <map>
#include <vector>
Include dependency graph for statistics.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  statistics::stats
 
struct  statistics::stats::hitrate_t
 
struct  statistics::scenario_context
 
struct  statistics::attack_context
 

Namespaces

 statistics
 

Typedefs

typedef std::vector< std::pair< const std::string *, const stats * > > statistics::levels
 Stats (and name) for each scenario. The pointers are never nullptr. More...
 

Functions

int statistics::sum_str_int_map (const stats::str_int_map &m)
 
int statistics::sum_cost_str_int_map (const stats::str_int_map &m)
 
void statistics::recruit_unit (const unit &u)
 
void statistics::recall_unit (const unit &u)
 
void statistics::un_recall_unit (const unit &u)
 
void statistics::un_recruit_unit (const unit &u)
 
int statistics::un_recall_unit_cost (const unit &u)
 
void statistics::advance_unit (const unit &u)
 
config statistics::write_stats ()
 
void statistics::write_stats (config_writer &out)
 
void statistics::read_stats (const config &cfg)
 
void statistics::fresh_stats ()
 
void statistics::clear_current_scenario ()
 Delete the current scenario from the stats. More...
 
void statistics::reset_current_scenario ()
 Reset the stats of the current scenario to the beginning. More...
 
void statistics::reset_turn_stats (const std::string &save_id)
 
stats statistics::calculate_stats (const std::string &save_id)
 
levels statistics::level_stats (const std::string &save_id)
 Returns a list of names and stats for each scenario in the current campaign. More...
 
std::ostream & operator<< (std::ostream &outstream, const statistics::stats::hitrate_t &by_cth)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  outstream,
const statistics::stats::hitrate_t by_cth 
)