Generate race-specific unit-names. More...
#include "global.hpp"#include "race.hpp"#include "log.hpp"#include "random.hpp"#include "simple_rng.hpp"
Go to the source code of this file.
Functions | |
| static const config & | empty_traits () |
| static const config & | empty_topics () |
| static void | add_prefixes (const wide_string &str, size_t length, markov_prefix_map &res) |
| static markov_prefix_map | markov_prefixes (const std::vector< std::string > &items, size_t length) |
| static wide_string | markov_generate_name (const markov_prefix_map &prefixes, size_t chain_size, size_t max_len, rand_rng::simple_rng *rng) |
| std::string const & | gender_string (unit_race::GENDER gender) |
| unit_race::GENDER | string_gender (const std::string &str, unit_race::GENDER def) |
Generate race-specific unit-names.
Definition in file race.cpp.
| static void add_prefixes | ( | const wide_string & | str, | |
| size_t | length, | |||
| markov_prefix_map & | res | |||
| ) | [static] |
Definition at line 39 of file race.cpp.
References editor::start().
Referenced by markov_prefixes().


| std::string const& gender_string | ( | unit_race::GENDER | gender | ) |
Definition at line 218 of file race.cpp.
References unit_race::FEMALE, and unit_race::MALE.
Referenced by unit::add_trait_description(), dialogs::unit_types_preview_pane::get_details(), string_gender(), and unit::write().

| static wide_string markov_generate_name | ( | const markov_prefix_map & | prefixes, | |
| size_t | chain_size, | |||
| size_t | max_len, | |||
| rand_rng::simple_rng * | rng | |||
| ) | [static] |
Definition at line 60 of file race.cpp.
References gui2::event::find(), rand_rng::simple_rng::get_next_random(), and get_random_nocheck().
Referenced by unit_race::generate_name().


| static markov_prefix_map markov_prefixes | ( | const std::vector< std::string > & | items, | |
| size_t | length | |||
| ) | [static] |
Definition at line 49 of file race.cpp.
References add_prefixes(), and utils::string_to_wstring().
Referenced by unit_race::unit_race().


| unit_race::GENDER string_gender | ( | const std::string & | str, | |
| unit_race::GENDER | def | |||
| ) |
Definition at line 230 of file race.cpp.
References unit_race::FEMALE, gender_string(), and unit_race::MALE.
Referenced by unit_type::build_help_index(), generate_gender(), and unit::internal_matches_filter().


| Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:45 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |