Functions | Variables

settings Namespace Reference

Contains the general settings which have a default. More...

Functions

int get_turns (const std::string &value)
 Gets the number of turns.
int get_village_gold (const std::string &value)
 Gets the village gold.
int get_village_support (const std::string &value)
 Gets the village unit level support.
int get_xp_modifier (const std::string &value)
 Gets the xp modifier.

Variables

const int turns_min = 1
const int turns_max = 100
const int turns_default = 100
const int turns_step = 1

Detailed Description

Contains the general settings which have a default.

These values can be used to initialize the preferences, but also to set map values if these aren't defined.


Function Documentation

int settings::get_turns ( const std::string &  value  ) 

Gets the number of turns.

If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.

Parameters:
value string containing the number of turns
Returns:
the number of turns

Referenced by mp::create::process_event().

Here is the caller graph for this function:

int settings::get_village_gold ( const std::string &  value  ) 

Gets the village gold.

If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.

Parameters:
value string containing the village gold
Returns:
the village gold

Referenced by mp::create::process_event().

Here is the caller graph for this function:

int settings::get_village_support ( const std::string &  value  ) 

Gets the village unit level support.

If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.

Parameters:
value string containing the village support
Returns:
the village support

Referenced by mp::create::process_event().

Here is the caller graph for this function:

int settings::get_xp_modifier ( const std::string &  value  ) 

Gets the xp modifier.

If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.

Parameters:
value string containing the xp modifier
Returns:
the xp modifier

Referenced by mp::create::process_event().

Here is the caller graph for this function:


Variable Documentation

const int settings::turns_default = 100

Definition at line 47 of file settings.hpp.

const int settings::turns_max = 100

Definition at line 46 of file settings.hpp.

Referenced by mp::create::create().

const int settings::turns_min = 1

Definition at line 45 of file settings.hpp.

Referenced by mp::create::create().

const int settings::turns_step = 1

Definition at line 48 of file settings.hpp.

Referenced by mp::create::create().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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