The Battle for Wesnoth  1.13.4+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 (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 rand_rng::mt_rngrng () const
 
rand_rng::mt_rngrng ()
 
const std::stringnext_scenario () const
 
const config to_config ()
 
void merge_old_carryover (const carryover_info &old_carryover)
 

Private Attributes

std::vector< carryovercarryover_sides_
 
config variables_
 
rand_rng::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 53 of file carryover.hpp.

Constructor & Destructor Documentation

carryover_info::carryover_info ( )
inline

Definition at line 56 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 123 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 151 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 147 of file carryover.cpp.

References carryover_sides_.

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

Definition at line 255 of file carryover.cpp.

References carryover_sides_.

const config& carryover_info::get_variables ( ) const
inline

Definition at line 79 of file carryover.hpp.

References variables_.

void carryover_info::merge_old_carryover ( const carryover_info old_carryover)

Definition at line 265 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 84 of file carryover.hpp.

References next_scenario_.

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

Definition at line 155 of file carryover.cpp.

References carryover_sides_.

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

Definition at line 81 of file carryover.hpp.

References rng_.

Referenced by saved_game::convert_to_start_save().

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

Definition at line 82 of file carryover.hpp.

References rng_.

void carryover_info::set_variables ( const config vars)
inline

Definition at line 78 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 94 of file carryover.hpp.

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

int carryover_info::next_underlying_unit_id_
private

Definition at line 95 of file carryover.hpp.

Referenced by to_config(), and transfer_to().

rand_rng::mt_rng carryover_info::rng_
private

Definition at line 92 of file carryover.hpp.

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

config carryover_info::variables_
private

Definition at line 91 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 93 of file carryover.hpp.

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


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