Functions

race.cpp File Reference

Generate race-specific unit-names. More...

#include "global.hpp"
#include "race.hpp"
#include "log.hpp"
#include "random.hpp"
#include "simple_rng.hpp"
Include dependency graph for race.cpp:

Go to the source code of this file.

Functions

static const configempty_traits ()
static const configempty_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)

Detailed Description

Generate race-specific unit-names.

Definition in file race.cpp.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

static const config& empty_topics (  )  [static]

Definition at line 34 of file race.cpp.

static const config& empty_traits (  )  [static]

Definition at line 29 of file race.cpp.

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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