Public Types | Public Member Functions | Private Attributes

unit_race Class Reference

#include <race.hpp>

Collaboration diagram for unit_race:
Collaboration graph
[legend]

List of all members.

Public Types

enum  GENDER { MALE, FEMALE, NUM_GENDERS }

Public Member Functions

 unit_race ()
 unit_race (const config &cfg)
const configget_cfg () const
const std::string & id () const
const t_stringname (GENDER gender=MALE) const
const t_stringplural_name () const
const t_stringdescription () const
std::string generate_name (GENDER gender, rand_rng::simple_rng *rng=0) const
bool uses_global_traits () const
const config::const_child_itorsadditional_traits () const
const config::const_child_itorsadditional_topics () const
unsigned int num_traits () const
const std::string & undead_variation () const

Private Attributes

const config cfg_
std::string id_
t_string name_ [NUM_GENDERS]
t_string plural_name_
t_string description_
unsigned int ntraits_
markov_prefix_map next_ [NUM_GENDERS]
int chain_size_
config::const_child_itors traits_
config::const_child_itors topics_
bool global_traits_
std::string undead_variation_

Detailed Description

Definition at line 29 of file race.hpp.


Member Enumeration Documentation

Enumerator:
MALE 
FEMALE 
NUM_GENDERS 

Definition at line 32 of file race.hpp.


Constructor & Destructor Documentation

unit_race::unit_race (  ) 

Definition at line 140 of file race.cpp.

References name_.

unit_race::unit_race ( const config cfg  ) 

Definition at line 156 of file race.cpp.

References chain_size_, t_string::empty(), FEMALE, id_, MALE, markov_prefixes(), name_, next_, plural_name_, utils::split(), and lg::wml_error.

Here is the call graph for this function:


Member Function Documentation

const config::const_child_itors & unit_race::additional_topics (  )  const

Definition at line 211 of file race.cpp.

References topics_.

const config::const_child_itors & unit_race::additional_traits (  )  const

Definition at line 206 of file race.cpp.

References traits_.

Referenced by unit_type::build_full().

Here is the caller graph for this function:

const t_string& unit_race::description (  )  const [inline]

Definition at line 41 of file race.hpp.

References description_.

Referenced by impl_race_get().

Here is the caller graph for this function:

std::string unit_race::generate_name ( unit_race::GENDER  gender,
rand_rng::simple_rng rng = 0 
) const

Definition at line 194 of file race.cpp.

References chain_size_, markov_generate_name(), next_, and utils::wstring_to_string().

Referenced by unit::generate_name(), and generate_name().

Here is the call graph for this function:

Here is the caller graph for this function:

const config& unit_race::get_cfg (  )  const [inline]

Definition at line 37 of file race.hpp.

References cfg_.

Referenced by impl_race_get().

Here is the caller graph for this function:

const std::string& unit_race::id (  )  const [inline]

Definition at line 38 of file race.hpp.

References id_.

Referenced by unit_type::hide_help(), unit::internal_matches_filter(), unit_type_data::set_config(), unit_race(), and unit::write().

Here is the caller graph for this function:

const t_string& unit_race::name ( GENDER  gender = MALE  )  const [inline]

Definition at line 39 of file race.hpp.

References name_.

Referenced by dialogs::units_list_preview_pane::get_details(), impl_race_get(), and unit_race().

Here is the caller graph for this function:

unsigned int unit_race::num_traits (  )  const

Definition at line 216 of file race.cpp.

References ntraits_.

Referenced by unit_type::build_help_index(), and impl_race_get().

Here is the caller graph for this function:

const t_string& unit_race::plural_name (  )  const [inline]

Definition at line 40 of file race.hpp.

References plural_name_.

Referenced by impl_race_get().

Here is the caller graph for this function:

const std::string& unit_race::undead_variation (  )  const [inline]

Definition at line 50 of file race.hpp.

References undead_variation_.

Referenced by unit_type::build_full(), and impl_race_get().

Here is the caller graph for this function:

bool unit_race::uses_global_traits (  )  const

Definition at line 201 of file race.cpp.

References global_traits_.

Referenced by unit_type::build_full(), and impl_race_get().

Here is the caller graph for this function:


Member Data Documentation

const config unit_race::cfg_ [private]

Definition at line 50 of file race.hpp.

Referenced by get_cfg().

int unit_race::chain_size_ [private]

Definition at line 61 of file race.hpp.

Referenced by generate_name(), and unit_race().

Definition at line 58 of file race.hpp.

Referenced by description().

bool unit_race::global_traits_ [private]

Definition at line 65 of file race.hpp.

Referenced by uses_global_traits().

std::string unit_race::id_ [private]

Definition at line 55 of file race.hpp.

Referenced by id(), and unit_race().

t_string unit_race::name_[NUM_GENDERS] [private]

Definition at line 56 of file race.hpp.

Referenced by name(), and unit_race().

markov_prefix_map unit_race::next_[NUM_GENDERS] [private]

Definition at line 60 of file race.hpp.

Referenced by generate_name(), and unit_race().

unsigned int unit_race::ntraits_ [private]

Definition at line 59 of file race.hpp.

Referenced by num_traits().

Definition at line 57 of file race.hpp.

Referenced by plural_name(), and unit_race().

Definition at line 64 of file race.hpp.

Referenced by additional_topics().

Definition at line 63 of file race.hpp.

Referenced by additional_traits().

std::string unit_race::undead_variation_ [private]

Definition at line 66 of file race.hpp.

Referenced by undead_variation().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:17:40 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs