The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
carryover_info Class Reference

#include <carryover.hpp>

Public Member Functions

 carryover_info ()
 
 carryover_info (const config &cfg, bool from_snapshot=false)
 Turns config from a loaded savegame into carryover_info. More...
 
carryoverget_side (const std::string &save_id)
 
std::vector< carryover > & get_all_sides ()
 
void add_side (const config &cfg)
 
void add_side (const team &t, const int gold, const bool add)
 
void remove_side (const std::string &id)
 
void transfer_all_to (config &side_cfg)
 
void transfer_to (config &level)
 
void set_variables (const config &vars)
 
const configget_variables () const
 
const randomness::mt_rngrng () const
 
randomness::mt_rngrng ()
 
const std::string & next_scenario () const
 
const config to_config ()
 
void merge_old_carryover (const carryover_info &old_carryover)
 

Private Attributes

std::vector< carryovercarryover_sides_
 
config variables_
 
randomness::mt_rng rng_
 
boost::ptr_vector< configwml_menu_items_
 
std::string next_scenario_
 the scenario coming next (for campaigns) More...
 
int next_underlying_unit_id_
 

Detailed Description

Definition at line 63 of file carryover.hpp.

Constructor & Destructor Documentation

carryover_info::carryover_info ( )
inline

Definition at line 66 of file carryover.hpp.

carryover_info::carryover_info ( const config cfg,
bool  from_snapshot = false 
)
explicit

Turns config from a loaded savegame into carryover_info.

Parameters
from_snapshottrue if cfg is a [snapshot], false if cfg is [carryover_sides(_start)]

Definition at line 121 of file carryover.cpp.

References carryover_sides_, config::child_range(), and wml_menu_items_.

Member Function Documentation

void carryover_info::add_side ( const config cfg)

Definition at line 149 of file carryover.cpp.

References carryover_sides_.

void carryover_info::add_side ( const team t,
const int  gold,
const bool  add 
)
std::vector< carryover > & carryover_info::get_all_sides ( )

Definition at line 145 of file carryover.cpp.

References carryover_sides_.

carryover * carryover_info::get_side ( const std::string &  save_id)

Definition at line 251 of file carryover.cpp.

References carryover_sides_.

const config& carryover_info::get_variables ( ) const
inline

Definition at line 89 of file carryover.hpp.

References variables_.

void carryover_info::merge_old_carryover ( const carryover_info old_carryover)

Definition at line 261 of file carryover.cpp.

References carryover_sides_, and carryover::get_save_id().

Referenced by saved_game::convert_to_start_save().

const std::string& carryover_info::next_scenario ( ) const
inline

Definition at line 94 of file carryover.hpp.

References next_scenario_.

void carryover_info::remove_side ( const std::string &  id)

Definition at line 153 of file carryover.cpp.

References carryover_sides_.

const randomness::mt_rng& carryover_info::rng ( ) const
inline

Definition at line 91 of file carryover.hpp.

References rng_.

Referenced by saved_game::convert_to_start_save().

randomness::mt_rng& carryover_info::rng ( )
inline

Definition at line 92 of file carryover.hpp.

References rng_.

void carryover_info::set_variables ( const config vars)
inline

Definition at line 88 of file carryover.hpp.

References variables_.

const config carryover_info::to_config ( )
void carryover_info::transfer_all_to ( config side_cfg)
void carryover_info::transfer_to ( config level)

Member Data Documentation

std::vector<carryover> carryover_info::carryover_sides_
private
std::string carryover_info::next_scenario_
private

the scenario coming next (for campaigns)

Definition at line 104 of file carryover.hpp.

Referenced by next_scenario(), to_config(), and transfer_to().

int carryover_info::next_underlying_unit_id_
private

Definition at line 105 of file carryover.hpp.

Referenced by to_config(), and transfer_to().

randomness::mt_rng carryover_info::rng_
private

Definition at line 102 of file carryover.hpp.

Referenced by rng(), to_config(), and transfer_to().

config carryover_info::variables_
private

Definition at line 101 of file carryover.hpp.

Referenced by get_variables(), set_variables(), to_config(), and transfer_to().

boost::ptr_vector<config> carryover_info::wml_menu_items_
private

Definition at line 103 of file carryover.hpp.

Referenced by carryover_info(), to_config(), and transfer_to().


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