The Battle for Wesnoth  1.19.0-dev
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 std::string & get_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::string > previous_recruits_
 
std::vector< configrecall_list_
 
std::string save_id_
 
config variables_
 

Detailed Description

Definition at line 26 of file carryover.hpp.

Constructor & Destructor Documentation

◆ carryover() [1/2]

carryover::carryover ( )
inline

Definition at line 29 of file carryover.hpp.

◆ carryover() [2/2]

carryover::carryover ( const config side)
explicit

Definition at line 27 of file carryover.cpp.

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

◆ ~carryover()

carryover::~carryover ( )
inline

Definition at line 39 of file carryover.hpp.

Member Function Documentation

◆ get_recruits()

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

Definition at line 79 of file carryover.cpp.

References preferences::erase(), utils::join(), and previous_recruits_.

Referenced by to_config(), and to_string().

◆ get_save_id()

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

Definition at line 41 of file carryover.hpp.

References save_id_.

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

◆ to_config()

void carryover::to_config ( config cfg)

◆ to_string()

const std::string carryover::to_string ( )

Definition at line 89 of file carryover.cpp.

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

◆ transfer_all_gold_to()

void carryover::transfer_all_gold_to ( config side_cfg)

◆ transfer_all_recalls_to()

void carryover::transfer_all_recalls_to ( config side_cfg)

Definition at line 72 of file carryover.cpp.

References config::add_child(), and recall_list_.

◆ transfer_all_recruits_to()

void carryover::transfer_all_recruits_to ( config side_cfg)

Definition at line 66 of file carryover.cpp.

References utils::join(), and previous_recruits_.

Member Data Documentation

◆ add_

bool carryover::add_
private

Definition at line 48 of file carryover.hpp.

Referenced by to_config(), and transfer_all_gold_to().

◆ current_player_

std::string carryover::current_player_
private

Definition at line 49 of file carryover.hpp.

Referenced by to_config().

◆ gold_

int carryover::gold_
private

Definition at line 50 of file carryover.hpp.

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

◆ previous_recruits_

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

Definition at line 51 of file carryover.hpp.

Referenced by get_recruits(), and transfer_all_recruits_to().

◆ recall_list_

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

Definition at line 55 of file carryover.hpp.

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

◆ save_id_

std::string carryover::save_id_
private

Definition at line 56 of file carryover.hpp.

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

◆ variables_

config carryover::variables_
private

Definition at line 57 of file carryover.hpp.

Referenced by to_config(), and transfer_all_gold_to().


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