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

Public Member Functions

 team_builder (const config &side_cfg, std::vector< team > &teams, const config &level, game_board &board)
 
void build_team_stage_one ()
 
void build_team_stage_two ()
 

Protected Member Functions

void log_step (const char *s) const
 
void init ()
 
void gold ()
 
void new_team ()
 
void objectives ()
 
void previous_recruits ()
 
void handle_unit (const config &u, const char *origin)
 
void handle_leader (const config &leader)
 
void leader ()
 
void prepare_units ()
 
void place_units ()
 

Protected Attributes

int gold_info_ngold_
 
std::deque< configleader_configs_
 
const configlevel_
 
game_boardboard_
 
bool player_exists_
 
std::set< std::stringseen_ids_
 
int side_
 
const configside_cfg_
 
teamt_
 
std::vector< team > & teams_
 
std::vector< const config * > unit_configs_
 

Detailed Description

Definition at line 38 of file teambuilder.cpp.

Constructor & Destructor Documentation

team_builder::team_builder ( const config side_cfg,
std::vector< team > &  teams,
const config level,
game_board board 
)
inline

Definition at line 40 of file teambuilder.cpp.

Member Function Documentation

void team_builder::build_team_stage_one ( )
inline
void team_builder::build_team_stage_two ( )
inline

Definition at line 84 of file teambuilder.cpp.

References place_units().

void team_builder::gold ( )
inlineprotected

Definition at line 148 of file teambuilder.cpp.

References DBG_NG_TC, and log_step().

Referenced by build_team_stage_one().

void team_builder::handle_leader ( const config leader)
inlineprotected
void team_builder::handle_unit ( const config u,
const char *  origin 
)
inlineprotected
void team_builder::init ( )
inlineprotected

Definition at line 114 of file teambuilder.cpp.

References DBG_NG_TC, gamemap::empty(), error(), log_step(), game_board::map(), and side_.

Referenced by build_team_stage_one().

void team_builder::leader ( )
inlineprotected
void team_builder::log_step ( const char *  s) const
inlineprotected

Definition at line 108 of file teambuilder.cpp.

References LOG_NG_TC.

Referenced by gold(), init(), leader(), new_team(), objectives(), place_units(), and previous_recruits().

void team_builder::new_team ( )
inlineprotected

Definition at line 158 of file teambuilder.cpp.

References team::build(), gold_info_ngold_, log_step(), and game_board::map().

Referenced by build_team_stage_one().

void team_builder::objectives ( )
inlineprotected
void team_builder::place_units ( )
inlineprotected
void team_builder::prepare_units ( )
inlineprotected

Definition at line 269 of file teambuilder.cpp.

References config::child_range(), and handle_unit().

Referenced by build_team_stage_one().

void team_builder::previous_recruits ( )
inlineprotected

Definition at line 176 of file teambuilder.cpp.

References team::add_recruit(), DBG_NG_TC, config::get(), log_step(), and utils::split().

Referenced by build_team_stage_one().

Member Data Documentation

game_board& team_builder::board_
protected

Definition at line 98 of file teambuilder.cpp.

Referenced by place_units().

int team_builder::gold_info_ngold_
protected

Definition at line 94 of file teambuilder.cpp.

Referenced by new_team().

std::deque<config> team_builder::leader_configs_
protected

Definition at line 95 of file teambuilder.cpp.

const config& team_builder::level_
protected

Definition at line 97 of file teambuilder.cpp.

bool team_builder::player_exists_
protected

Definition at line 100 of file teambuilder.cpp.

std::set<std::string> team_builder::seen_ids_
protected

Definition at line 101 of file teambuilder.cpp.

int team_builder::side_
protected

Definition at line 102 of file teambuilder.cpp.

Referenced by init().

const config& team_builder::side_cfg_
protected

Definition at line 103 of file teambuilder.cpp.

team* team_builder::t_
protected

Definition at line 104 of file teambuilder.cpp.

Referenced by build_team_stage_one().

std::vector<team>& team_builder::teams_
protected

Definition at line 105 of file teambuilder.cpp.

std::vector<const config*> team_builder::unit_configs_
protected

Definition at line 106 of file teambuilder.cpp.


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