statistics::stats Struct Reference

#include <statistics.hpp>

List of all members.

Public Types

typedef std::map< std::string,
int > 
str_int_map
typedef str_int_map battle_sequence_frequency_map
 A type that will map a string of hit/miss to the number of times that sequence has occurred.
typedef std::map< int,
battle_sequence_frequency_map
battle_result_map
 A type that will map different % chances to hit to different results.

Public Member Functions

 stats ()
 stats (const config &cfg)
config write () const
void write (config_writer &out) const
void read (const config &cfg)

Public Attributes

str_int_map recruits
str_int_map recalls
str_int_map advanced_to
str_int_map deaths
str_int_map killed
int recruit_cost
int recall_cost
battle_result_map attacks
battle_result_map defends
long long damage_inflicted
long long damage_taken
long long turn_damage_inflicted
long long turn_damage_taken
long long expected_damage_inflicted
long long expected_damage_taken
long long turn_expected_damage_inflicted
long long turn_expected_damage_taken
long long new_expected_damage_inflicted
long long new_expected_damage_taken
long long new_turn_expected_damage_inflicted
long long new_turn_expected_damage_taken

Static Public Attributes

static const long long desimal_shift = 1000


Detailed Description

Definition at line 31 of file statistics.hpp.


Member Typedef Documentation

typedef std::map<std::string,int> statistics::stats::str_int_map

Definition at line 40 of file statistics.hpp.

A type that will map a string of hit/miss to the number of times that sequence has occurred.

Definition at line 46 of file statistics.hpp.

A type that will map different % chances to hit to different results.

Definition at line 49 of file statistics.hpp.


Constructor & Destructor Documentation

statistics::stats::stats (  ) 

Definition at line 220 of file statistics.cpp.

statistics::stats::stats ( const config cfg  )  [explicit]

Definition at line 229 of file statistics.cpp.

References read().


Member Function Documentation

config statistics::stats::write (  )  const

void statistics::stats::write ( config_writer out  )  const

void statistics::stats::read ( const config cfg  ) 


Member Data Documentation

Definition at line 41 of file statistics.hpp.

Referenced by statistics::advance_unit(), merge_stats(), read(), and write().

const long long statistics::stats::desimal_shift = 1000 [static]

Definition at line 56 of file statistics.hpp.

Referenced by statistics::attack_context::attack_excepted_damage().

Todo:
FIXME: Since integers are used, rounding errors accumulate.

Definition at line 64 of file statistics.hpp.

Referenced by statistics::attack_context::attack_result(), statistics::attack_context::defend_result(), merge_stats(), read(), and write().


The documentation for this struct was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs