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 Member Functions | Private Attributes | List of all members
carryover Class Reference

#include <carryover.hpp>

Public Member Functions

 carryover ()
 
 carryover (const config &side)
 
 carryover (const team &t, const int gold, const bool add)
 
 ~carryover ()
 
const std::stringget_save_id () const
 
void transfer_all_gold_to (config &side_cfg)
 
void transfer_all_recruits_to (config &side_cfg)
 
void transfer_all_recalls_to (config &side_cfg)
 
const std::string to_string ()
 
void to_config (config &cfg)
 

Private Member Functions

std::string get_recruits (bool erase=false)
 

Private Attributes

bool add_
 
std::string current_player_
 
int gold_
 
std::set< std::stringprevious_recruits_
 
std::vector< configrecall_list_
 
std::string save_id_
 
config variables_
 

Detailed Description

Definition at line 16 of file carryover.hpp.

Constructor & Destructor Documentation

carryover::carryover ( )
inline

Definition at line 19 of file carryover.hpp.

carryover::carryover ( const config side)
explicit

Definition at line 24 of file carryover.cpp.

References config::child_range(), recall_list_, and config::remove_attributes().

carryover::carryover ( const team t,
const int  gold,
const bool  add 
)

Definition at line 41 of file carryover.cpp.

References team::recall_list(), and recall_list_.

carryover::~carryover ( )
inline

Definition at line 30 of file carryover.hpp.

Member Function Documentation

std::string carryover::get_recruits ( bool  erase = false)
private

Definition at line 91 of file carryover.cpp.

References utils::join(), and previous_recruits_.

Referenced by to_config(), and to_string().

const std::string& carryover::get_save_id ( ) const
inline

Definition at line 32 of file carryover.hpp.

References save_id_.

Referenced by carryover_info::merge_old_carryover(), and save_id_equals::operator()().

void carryover::to_config ( config cfg)
const std::string carryover::to_string ( )

Definition at line 101 of file carryover.cpp.

References get_recruits(), gold_, recall_list_, and save_id_.

void carryover::transfer_all_gold_to ( config side_cfg)
void carryover::transfer_all_recalls_to ( config side_cfg)

Definition at line 84 of file carryover.cpp.

References config::add_child(), config::clear(), and recall_list_.

void carryover::transfer_all_recruits_to ( config side_cfg)

Definition at line 78 of file carryover.cpp.

References utils::join(), and previous_recruits_.

Member Data Documentation

bool carryover::add_
private

Definition at line 39 of file carryover.hpp.

Referenced by to_config(), and transfer_all_gold_to().

std::string carryover::current_player_
private

Definition at line 40 of file carryover.hpp.

Referenced by to_config().

int carryover::gold_
private

Definition at line 41 of file carryover.hpp.

Referenced by to_config(), to_string(), and transfer_all_gold_to().

std::set<std::string> carryover::previous_recruits_
private

Definition at line 42 of file carryover.hpp.

Referenced by get_recruits(), and transfer_all_recruits_to().

std::vector<config> carryover::recall_list_
private

Definition at line 46 of file carryover.hpp.

Referenced by carryover(), to_config(), to_string(), and transfer_all_recalls_to().

std::string carryover::save_id_
private

Definition at line 47 of file carryover.hpp.

Referenced by get_save_id(), to_config(), and to_string().

config carryover::variables_
private

Definition at line 48 of file carryover.hpp.

Referenced by to_config(), and transfer_all_gold_to().


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