The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Public Attributes | List of all members
statistics_record::campaign_stats_t Struct Reference

#include <statistics_record.hpp>

Public Member Functions

 campaign_stats_t ()=default
 campaign_stats_t (const config &cfg)
config to_config () const
void write (config_writer &out) const
void read (const config &cfg, bool append=false)
void new_scenario (const std::string &scenario_name)
 Adds an entry for anew scenario to wrte to. More...
void clear_current_scenario ()
 Delete the current scenario from the stats. More...

Public Attributes

std::vector< scenario_stats_tmaster_record

Detailed Description

Definition at line 106 of file statistics_record.hpp.

Constructor & Destructor Documentation

◆ campaign_stats_t() [1/2]

statistics_record::campaign_stats_t::campaign_stats_t ( )

◆ campaign_stats_t() [2/2]

statistics_record::campaign_stats_t::campaign_stats_t ( const config cfg)

Definition at line 109 of file statistics_record.hpp.

References read().

Member Function Documentation

◆ clear_current_scenario()

void statistics_record::campaign_stats_t::clear_current_scenario ( )

Delete the current scenario from the stats.

Definition at line 502 of file statistics_record.cpp.

Referenced by game_launcher::load_game(), and playsingle_controller::play_scenario_main_loop().

◆ new_scenario()

void statistics_record::campaign_stats_t::new_scenario ( const std::string &  scenario_name)

Adds an entry for anew scenario to wrte to.

Definition at line 497 of file statistics_record.cpp.

Referenced by saved_game::expand_carryover().

◆ read()

void statistics_record::campaign_stats_t::read ( const config cfg,
bool  append = false 

◆ to_config()

config statistics_record::campaign_stats_t::to_config ( ) const

Definition at line 467 of file statistics_record.cpp.

References config::add_child(), and i.

Referenced by saved_game::to_config().

◆ write()

void statistics_record::campaign_stats_t::write ( config_writer out) const

Member Data Documentation

◆ master_record

std::vector<scenario_stats_t> statistics_record::campaign_stats_t::master_record

Definition at line 122 of file statistics_record.hpp.

Referenced by statistics_t::master_stats().

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