#include <unit_types.hpp>

Public Types | |
| typedef std::map< std::string, unit_type > | unit_type_map |
Public Member Functions | |
| unit_type_data () | |
| const unit_type_map & | types () const |
| const race_map & | races () const |
| const config::const_child_itors | traits () const |
| void | set_config (config &cfg) |
| const unit_type * | find (const std::string &key, unit_type::BUILD_STATUS status=unit_type::FULL) const |
| void | check_types (const std::vector< std::string > &types) const |
| const unit_race * | find_race (const std::string &) const |
| void | build_all (unit_type::BUILD_STATUS status) |
| bool | hide_help (const std::string &type_id, const std::string &race_id) const |
| Checks if the [hide_help] tag contains these IDs. | |
Private Member Functions | |
| unit_type_data (const unit_type_data &) | |
| void | read_hide_help (const config &cfg) |
| Parses the [hide_help] tag. | |
| void | set_unit_config (const config &unit_cfg) |
| const config & | find_config (const std::string &key) const |
| std::pair < unit_type_map::iterator, bool > | insert (const std::pair< std::string, unit_type > &utype) |
| void | clear () |
| unit_type & | build_unit_type (const unit_type_map::iterator &ut, unit_type::BUILD_STATUS status) const |
| void | add_advancefrom (const config &unit_cfg) const |
| void | add_advancement (unit_type &to_unit) const |
Private Attributes | |
| unit_type_map | types_ |
| movement_type_map | movement_types_ |
| race_map | races_ |
| bool | hide_help_all_ |
| True if [hide_help] contains a 'all=yes' at its root. | |
| std::vector< std::set < std::string > > | hide_help_type_ |
| std::vector< std::set < std::string > > | hide_help_race_ |
| const config * | unit_cfg_ |
| unit_type::BUILD_STATUS | build_status_ |
Definition at line 363 of file unit_types.hpp.
| typedef std::map<std::string,unit_type> unit_type_data::unit_type_map |
Definition at line 368 of file unit_types.hpp.
| unit_type_data::unit_type_data | ( | ) |
Definition at line 1125 of file unit_types.cpp.
| unit_type_data::unit_type_data | ( | const unit_type_data & | ) | [private] |
| void unit_type_data::add_advancefrom | ( | const config & | unit_cfg | ) | const [private] |
| void unit_type_data::add_advancement | ( | unit_type & | to_unit | ) | const [private] |
Definition at line 1340 of file unit_types.cpp.
References config::child_range(), DBG_UT, error(), unit_type::get_cfg(), unit_type::id(), and types_.
Referenced by build_all().


| void unit_type_data::build_all | ( | unit_type::BUILD_STATUS | status | ) |
Definition at line 1259 of file unit_types.cpp.
References add_advancement(), build_status_, build_unit_type(), loadscreen::increment_progress(), types_, and unit_cfg_.
Referenced by unit_type::advances_from(), ai::formula_ai::get_value(), ai::testing_ai_default::recruitment_phase::recruit_usage(), ai::ai_default_recruitment_stage::recruit_usage(), and set_config().


| unit_type & unit_type_data::build_unit_type | ( | const unit_type_map::iterator & | ut, | |
| unit_type::BUILD_STATUS | status | |||
| ) | const [private] |
Definition at line 1275 of file unit_types.cpp.
References config::child_range(), unit_type::CREATED, DBG_UT, unit_type::HELP_INDEX, movement_types_, races_, and unit_cfg_.
Referenced by build_all(), and find().


| void unit_type_data::check_types | ( | const std::vector< std::string > & | types | ) | const |
Definition at line 1227 of file unit_types.cpp.
Referenced by unit::set_advances_to(), and unit::set_recruits().


| void unit_type_data::clear | ( | ) | [private] |
Definition at line 1247 of file unit_types.cpp.
References build_status_, hide_help_all_, hide_help_race_, hide_help_type_, movement_types_, races_, and types_.
Referenced by set_config().

| const unit_type * unit_type_data::find | ( | const std::string & | key, | |
| unit_type::BUILD_STATUS | status = unit_type::FULL | |||
| ) | const |
Definition at line 1205 of file unit_types.cpp.
References build_unit_type(), DBG_CF, and types_.
Referenced by unit::add_modification(), advancement_tree_internal(), unit::advances_to_translated(), ai::testing_ai_default::recruitment_phase::analyze_potential_recruit_combat(), ai::ai_default_recruitment_stage::analyze_potential_recruit_combat(), ai::ai_default_recruitment_stage::analyze_potential_recruit_movements(), check_types(), wb::recruit::create_corresponding_unit(), events::menu_handler::create_unit(), events::menu_handler::create_unit_2(), events::console_handler::do_create(), events::menu_handler::do_recruit(), do_replay_handle(), mp::wait::leader_preview_pane::draw_contents(), mp::wait::generate_menu(), unit::generate_traits(), get_advanced_unit(), ai::ai_default_recruitment_stage::get_combat_score_vs(), dialogs::unit_types_preview_pane::get_details(), get_unit_type(), ai::formula_ai::get_value(), impl_unit_type_get(), intf_add_known_unit(), intf_transform_unit(), help::make_unit_link(), team::minimum_recruit_price(), help::unit_topic_generator::operator()(), ai::testing_ai_default::potential_recruit_converter::operator()(), ai::unit_combat_score_getter::operator()(), leader_list_manager::populate_leader_combo(), gui2::tunit_create::pre_show(), wb::recruit::recruit(), events::menu_handler::recruit(), ai::testing_ai_default::recruitment_phase::recruit_usage(), ai::ai_default_recruitment_stage::recruit_usage(), mp::connect::side::resolve_random(), mp::connect::side::side(), attack::unit_killed(), leader_list_manager::update_gender_list(), and unit::write().


| const config & unit_type_data::find_config | ( | const std::string & | key | ) | const [private] |
Definition at line 1234 of file unit_types.cpp.
References ERR_CF, error(), config::find_child(), and unit_cfg_.
Referenced by set_config().


| const unit_race * unit_type_data::find_race | ( | const std::string & | key | ) | const |
Definition at line 1365 of file unit_types.cpp.
References races_.
Referenced by events::menu_handler::create_unit(), help::generate_races_sections(), help::generate_unit_topics(), dialogs::unit_types_preview_pane::get_details(), impl_race_get(), help::unit_topic_generator::operator()(), gui2::tunit_create::pre_show(), and unit::unit().

| bool unit_type_data::hide_help | ( | const std::string & | type_id, | |
| const std::string & | race_id | |||
| ) | const |
Checks if the [hide_help] tag contains these IDs.
Definition at line 1325 of file unit_types.cpp.
References preferences::editor::TransitionUpdateMode::count, hide_help_all_, hide_help_race_, and hide_help_type_.
Referenced by unit_type::hide_help(), and set_config().

| std::pair<unit_type_map::iterator, bool> unit_type_data::insert | ( | const std::pair< std::string, unit_type > & | utype | ) | [inline, private] |
Definition at line 393 of file unit_types.hpp.
References types_.
Referenced by set_config().

| const race_map& unit_type_data::races | ( | ) | const [inline] |
Definition at line 371 of file unit_types.hpp.
References races_.
Referenced by LuaKernel::initialize(), read_hide_help(), and editor::unit_palette::setup().

| void unit_type_data::read_hide_help | ( | const config & | cfg | ) | [private] |
Parses the [hide_help] tag.
Definition at line 1297 of file unit_types.cpp.
References config::child(), hide_help_race_, hide_help_type_, races(), utils::split(), types(), and types_.
Referenced by set_config().


| void unit_type_data::set_config | ( | config & | cfg | ) |
Definition at line 1137 of file unit_types.cpp.
References build_all(), config::child(), clear(), unit_type::CREATED, DBG_UT, config::debug(), ERR_CF, error(), gui2::event::find(), find_config(), hide_help(), hide_help_all_, unit_race::id(), loadscreen::increment_progress(), insert(), LOG_CONFIG, config::merge_with(), movement_types_, unit_movement_type::name(), font::race, races_, read_hide_help(), config::remove_child(), set_unit_config(), step(), config::swap(), and unit_type().
Referenced by test_utils::game_config_manager::game_config_manager(), and game_controller::set_unit_data().


| void unit_type_data::set_unit_config | ( | const config & | unit_cfg | ) | [inline, private] |
Definition at line 390 of file unit_types.hpp.
References unit_cfg_.
Referenced by set_config().

| const config::const_child_itors unit_type_data::traits | ( | ) | const [inline] |
Definition at line 372 of file unit_types.hpp.
References config::child_range(), and unit_cfg_.
Referenced by intf_get_traits().


| const unit_type_map& unit_type_data::types | ( | ) | const [inline] |
Definition at line 370 of file unit_types.hpp.
References types_.
Referenced by unit_type::advances_from(), events::menu_handler::create_unit(), events::console_handler::do_discover(), help::generate_ability_topics(), help::generate_races_sections(), help::generate_unit_topics(), help::generate_weapon_special_topics(), LuaKernel::initialize(), gui2::tunit_create::pre_show(), read_hide_help(), and editor::unit_palette::setup().

Definition at line 411 of file unit_types.hpp.
Referenced by build_all(), and clear().
bool unit_type_data::hide_help_all_ [private] |
True if [hide_help] contains a 'all=yes' at its root.
Definition at line 405 of file unit_types.hpp.
Referenced by clear(), hide_help(), and set_config().
std::vector< std::set<std::string> > unit_type_data::hide_help_race_ [private] |
Definition at line 408 of file unit_types.hpp.
Referenced by clear(), hide_help(), and read_hide_help().
std::vector< std::set<std::string> > unit_type_data::hide_help_type_ [private] |
Definition at line 407 of file unit_types.hpp.
Referenced by clear(), hide_help(), and read_hide_help().
Definition at line 401 of file unit_types.hpp.
Referenced by build_unit_type(), clear(), and set_config().
race_map unit_type_data::races_ [private] |
Definition at line 402 of file unit_types.hpp.
Referenced by build_unit_type(), clear(), find_race(), races(), and set_config().
unit_type_map unit_type_data::types_ [mutable, private] |
Definition at line 400 of file unit_types.hpp.
Referenced by add_advancement(), build_all(), clear(), find(), insert(), read_hide_help(), and types().
const config* unit_type_data::unit_cfg_ [private] |
Definition at line 410 of file unit_types.hpp.
Referenced by build_all(), build_unit_type(), find_config(), set_unit_config(), and traits().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:17:46 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |