Go to the source code of this file.
Classes | |
class | unit_race |
Typedefs | |
typedef std::map< std::string, unit_race > | race_map |
Functions | |
unit_race::GENDER | string_gender (const std::string &str, unit_race::GENDER def=unit_race::MALE) |
const std::string & | gender_string (unit_race::GENDER gender) |
const config::attribute_value & | gender_value (const config &cfg, unit_race::GENDER gender, const std::string &male_key, const std::string &female_key, const std::string &default_key) |
Chooses a value from the given config based on gender. More... | |
const std::string& gender_string | ( | unit_race::GENDER | gender | ) |
Definition at line 142 of file race.cpp.
References unit_race::FEMALE, unit_race::MALE, unit_race::s_female, and unit_race::s_male.
Referenced by unit::add_trait_description(), wfl::unit_callable::get_value(), unit_race::unit_race(), and unit::write().
const config::attribute_value& gender_value | ( | const config & | cfg, |
unit_race::GENDER | gender, | ||
const std::string & | male_key, | ||
const std::string & | female_key, | ||
const std::string & | default_key | ||
) |
Chooses a value from the given config based on gender.
If the value for the specified gender is blank, then default_key is chosen instead.
Definition at line 161 of file race.cpp.
References config::get_or(), and unit_race::MALE.
Referenced by unit::init().
unit_race::GENDER string_gender | ( | const std::string & | str, |
unit_race::GENDER | def = unit_race::MALE |
||
) |
Definition at line 152 of file race.cpp.
References unit_race::FEMALE, unit_race::MALE, unit_race::s_female, and unit_race::s_male.
Referenced by unit_type::build_help_index(), unit_filter_impl::unit_filter_compound::fill(), generate_gender(), and SYNCED_COMMAND_HANDLER_FUNCTION().