#include <race.hpp>
Public Types | |
enum | GENDER { MALE, FEMALE, NUM_GENDERS } |
Public Member Functions | |
unit_race (const config &cfg) | |
const config & | get_cfg () const |
const std::string & | id () const |
const t_string & | name (GENDER gender=MALE) const |
const t_string & | plural_name () const |
const t_string & | description () const |
std::string | generate_name (GENDER gender) const |
const name_generator & | generator (GENDER gender) const |
bool | uses_global_traits () const |
const config::const_child_itors & | additional_traits () const |
const config::const_child_itors & | additional_topics () const |
unsigned int | num_traits () const |
const std::string & | undead_variation () const |
Static Public Attributes | |
static const std::string | s_female |
Standard string id (not translatable) for FEMALE. More... | |
static const std::string | s_male |
Standard string id (not translatable) for MALE. More... | |
static const unit_race | null_race |
Dummy race used when a race is not yet known. More... | |
Private Member Functions | |
unit_race () | |
Only used to construct null_race. More... | |
Private Attributes | |
const config | cfg_ |
std::string | id_ |
t_string | name_ [NUM_GENDERS] |
t_string | plural_name_ |
t_string | description_ |
unsigned int | ntraits_ |
boost::shared_ptr< name_generator > | name_generator_ [NUM_GENDERS] |
config::const_child_itors | traits_ |
config::const_child_itors | topics_ |
bool | global_traits_ |
std::string | undead_variation_ |
enum unit_race::GENDER |
|
explicit |
Definition at line 63 of file race.cpp.
References config::attribute_value::blank(), t_string::empty(), FEMALE, id_, MALE, name_, name_generator_, plural_name_, utils::split(), and lg::wml_error().
|
private |
const config::const_child_itors & unit_race::additional_topics | ( | ) | const |
const config::const_child_itors & unit_race::additional_traits | ( | ) | const |
Definition at line 138 of file race.cpp.
References traits_.
Referenced by unit_type::build_full(), and impl_race_get().
|
inline |
std::string unit_race::generate_name | ( | unit_race::GENDER | gender | ) | const |
Definition at line 123 of file race.cpp.
References unit::gender(), and name_generator_.
Referenced by unit::generate_name().
const name_generator & unit_race::generator | ( | unit_race::GENDER | gender | ) | const |
Definition at line 128 of file race.cpp.
References unit::gender(), and name_generator_.
Referenced by impl_race_get().
|
inline |
|
inline |
Definition at line 33 of file race.hpp.
References id_.
Referenced by unit_callable::get_value(), unit_type::hide_help(), impl_unit_get(), basic_unit_filter_impl::internal_matches_filter(), luaW_pushrace(), unit_type_data::set_config(), unit_race(), and unit::write().
Definition at line 34 of file race.hpp.
References name_.
Referenced by dialogs::units_list_preview_pane::get_details(), dialogs::unit_types_preview_pane::get_details(), impl_race_get(), gui2::tunit_preview_pane::set_displayed_type(), and unit_race().
unsigned int unit_race::num_traits | ( | ) | const |
Definition at line 148 of file race.cpp.
References ntraits_.
Referenced by unit_type::build_help_index(), and impl_race_get().
|
inline |
Definition at line 35 of file race.hpp.
References plural_name_.
Referenced by impl_race_get(), and help::unit_topic_generator::operator()().
|
inline |
Definition at line 46 of file race.hpp.
References undead_variation_.
Referenced by unit_type::build_full(), and impl_race_get().
bool unit_race::uses_global_traits | ( | ) | const |
Definition at line 133 of file race.cpp.
References global_traits_.
Referenced by unit_type::build_full(), and impl_race_get().
|
private |
|
private |
Definition at line 60 of file race.hpp.
Referenced by description().
|
private |
Definition at line 66 of file race.hpp.
Referenced by uses_global_traits().
|
private |
Definition at line 57 of file race.hpp.
Referenced by id(), and unit_race().
|
private |
Definition at line 58 of file race.hpp.
Referenced by name(), and unit_race().
|
private |
Definition at line 62 of file race.hpp.
Referenced by generate_name(), generator(), and unit_race().
|
private |
Definition at line 61 of file race.hpp.
Referenced by num_traits().
|
static |
Dummy race used when a race is not yet known.
Definition at line 49 of file race.hpp.
Referenced by unit_type::build_full(), unit_type::build_help_index(), and unit::unit().
|
private |
Definition at line 59 of file race.hpp.
Referenced by plural_name(), and unit_race().
|
static |
Standard string id (not translatable) for FEMALE.
Definition at line 26 of file race.hpp.
Referenced by gender_string(), unit_type::get_gender_unit_type(), ng::flg_manager::reset_gender_combo(), string_gender(), and ng::flg_manager::update_available_genders().
|
static |
Standard string id (not translatable) for MALE.
Definition at line 27 of file race.hpp.
Referenced by gender_string(), unit_type::get_gender_unit_type(), ng::flg_manager::reset_gender_combo(), string_gender(), and ng::flg_manager::update_available_genders().
|
private |
Definition at line 65 of file race.hpp.
Referenced by additional_topics().
|
private |
Definition at line 64 of file race.hpp.
Referenced by additional_traits().
|
private |
Definition at line 67 of file race.hpp.
Referenced by undead_variation().