Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

team_builder Class Reference

Collaboration diagram for team_builder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 team_builder (const config &side_cfg, const std::string &save_id, std::vector< team > &teams, const config &level, gamemap &map, unit_map &units, bool snapshot, const config &starting_pos)
void build_team_stage_one ()
void build_team_stage_two ()

Protected Member Functions

void log_step (const char *s) const
void init ()
bool use_player_cfg () const
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_
bool gold_info_add_
std::deque< configleader_configs_
const configlevel_
gamemapmap_
const configplayer_cfg_
bool player_exists_
const std::string save_id_
std::set< std::string > seen_ids_
int side_
const configside_cfg_
bool snapshot_
const configstarting_pos_
teamt_
std::vector< team > & teams_
std::vector< const config * > unit_configs_
unit_mapunits_

Static Protected Attributes

static const std::string default_gold_qty_ = "100"

Detailed Description

Definition at line 583 of file gamestatus.cpp.


Constructor & Destructor Documentation

team_builder::team_builder ( const config side_cfg,
const std::string &  save_id,
std::vector< team > &  teams,
const config level,
gamemap map,
unit_map units,
bool  snapshot,
const config starting_pos 
) [inline]

Definition at line 585 of file gamestatus.cpp.


Member Function Documentation

void team_builder::build_team_stage_one (  )  [inline]

Definition at line 609 of file gamestatus.cpp.

References gold(), init(), leader(), new_team(), objectives(), prepare_units(), previous_recruits(), and t_.

Here is the call graph for this function:

void team_builder::build_team_stage_two (  )  [inline]

Definition at line 637 of file gamestatus.cpp.

References place_units().

Here is the call graph for this function:

void team_builder::gold (  )  [inline, protected]

Definition at line 735 of file gamestatus.cpp.

References DBG_NG_TC, default_gold_qty_, ERR_NG_TC, gold_info_add_, gold_info_ngold_, log_step(), player_cfg_, player_exists_, save_id_, side_cfg_, and use_player_cfg().

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::handle_leader ( const config leader  )  [inline, protected]

Definition at line 844 of file gamestatus.cpp.

References config::attribute_value::blank(), handle_unit(), and leader_configs_.

Referenced by leader().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::handle_unit ( const config u,
const char *  origin 
) [inline, protected]

Definition at line 815 of file gamestatus.cpp.

References DBG_NG_TC, team::recall_list(), seen_ids_, side_, str_cast(), t_, and unit_configs_.

Referenced by handle_leader(), and prepare_units().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::init (  )  [inline, protected]

Deprecated:
r37519 [player] instead of [side] in starting_pos

Definition at line 674 of file gamestatus.cpp.

References DBG_NG_TC, gamemap::empty(), config::find_child(), level_, log_step(), map_, player_cfg_, player_exists_, save_id_, seen_ids_, side_, side_cfg_, snapshot_, starting_pos_, t_, teams_, and unit_configs_.

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::leader (  )  [inline, protected]

Definition at line 856 of file gamestatus.cpp.

References config::child_range(), error(), handle_leader(), log_step(), side_cfg_, utils::split(), and vgettext().

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::log_step ( const char *  s  )  const [inline, protected]

Definition at line 668 of file gamestatus.cpp.

References LOG_NG_TC, and side_.

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

Here is the caller graph for this function:

void team_builder::new_team (  )  [inline, protected]

Definition at line 780 of file gamestatus.cpp.

References team::build(), gold_info_add_, gold_info_ngold_, log_step(), map_, team::set_gold_add(), side_cfg_, and t_.

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::objectives (  )  [inline, protected]

Definition at line 788 of file gamestatus.cpp.

References t_string::empty(), level_, log_step(), team::objectives(), team::set_objectives(), and t_.

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::place_units (  )  [inline, protected]

Definition at line 909 of file gamestatus.cpp.

References team::current_player(), unit_map::find_first_leader(), log_step(), map_, config::remove_attribute(), team::set_current_player(), team::side(), side_, gamemap::starting_position(), t_, unit_configs_, and resources::units.

Referenced by build_team_stage_two().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::prepare_units (  )  [inline, protected]

Definition at line 888 of file gamestatus.cpp.

References config::child_range(), handle_unit(), log_step(), side_cfg_, and use_player_cfg().

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

void team_builder::previous_recruits (  )  [inline, protected]

Definition at line 798 of file gamestatus.cpp.

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

Referenced by build_team_stage_one().

Here is the call graph for this function:

Here is the caller graph for this function:

bool team_builder::use_player_cfg (  )  const [inline, protected]

Definition at line 730 of file gamestatus.cpp.

References player_cfg_, and snapshot_.

Referenced by gold(), and prepare_units().

Here is the caller graph for this function:


Member Data Documentation

const std::string team_builder::default_gold_qty_ = "100" [static, protected]

Definition at line 647 of file gamestatus.cpp.

Referenced by gold().

bool team_builder::gold_info_add_ [protected]

Definition at line 650 of file gamestatus.cpp.

Referenced by gold(), and new_team().

Definition at line 649 of file gamestatus.cpp.

Referenced by gold(), and new_team().

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

Definition at line 651 of file gamestatus.cpp.

Referenced by handle_leader().

const config& team_builder::level_ [protected]

Definition at line 652 of file gamestatus.cpp.

Referenced by init(), and objectives().

Definition at line 653 of file gamestatus.cpp.

Referenced by init(), new_team(), and place_units().

const config* team_builder::player_cfg_ [protected]

Definition at line 654 of file gamestatus.cpp.

Referenced by gold(), init(), previous_recruits(), and use_player_cfg().

bool team_builder::player_exists_ [protected]

Definition at line 655 of file gamestatus.cpp.

Referenced by gold(), and init().

const std::string team_builder::save_id_ [protected]

Definition at line 656 of file gamestatus.cpp.

Referenced by gold(), and init().

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

Definition at line 657 of file gamestatus.cpp.

Referenced by handle_unit(), and init().

int team_builder::side_ [protected]

Definition at line 658 of file gamestatus.cpp.

Referenced by handle_unit(), init(), log_step(), and place_units().

const config& team_builder::side_cfg_ [protected]

Definition at line 659 of file gamestatus.cpp.

Referenced by gold(), init(), leader(), new_team(), and prepare_units().

bool team_builder::snapshot_ [protected]

Definition at line 660 of file gamestatus.cpp.

Referenced by init(), and use_player_cfg().

const config& team_builder::starting_pos_ [protected]

Definition at line 661 of file gamestatus.cpp.

Referenced by init().

team* team_builder::t_ [protected]
std::vector<team>& team_builder::teams_ [protected]

Definition at line 663 of file gamestatus.cpp.

Referenced by init().

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

Definition at line 664 of file gamestatus.cpp.

Referenced by handle_unit(), init(), and place_units().

Definition at line 665 of file gamestatus.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:16:26 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs