OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
OpenXcom::StatString Class Reference

For adding statStrings to the game. More...

#include <StatString.h>

Public Member Functions

 StatString ()
 Creates a blank StatString ruleset. More...
 
virtual ~StatString ()
 Cleans up the StatString ruleset. More...
 
void load (const YAML::Node &node)
 Loads the StatString from YAML. More...
 
const std::vector
< StatStringCondition * > 
getConditions ()
 Get the conditions for this StatString. More...
 
const std::string getString ()
 Get the StatString string. More...
 

Static Public Member Functions

static const std::wstring calcStatString (UnitStats &currentStats, const std::vector< StatString * > &statStrings, bool psiStrengthEval)
 Calculate a StatString. More...
 
static std::map< std::string, int > getCurrentStats (UnitStats &currentStats)
 Get the CurrentStats. More...
 

Detailed Description

For adding statStrings to the game.

See http://ufopaedia.org/index.php?title=Statstrings

Constructor & Destructor Documentation

OpenXcom::StatString::StatString ( )

Creates a blank StatString ruleset.

Creates a blank StatString.

OpenXcom::StatString::~StatString ( )
virtual

Cleans up the StatString ruleset.

Cleans up the extra StatString.

Member Function Documentation

const std::wstring OpenXcom::StatString::calcStatString ( UnitStats currentStats,
const std::vector< StatString * > &  statStrings,
bool  psiStrengthEval 
)
static

Calculate a StatString.

Calculates the list of StatStrings that apply to certain unit stats.

Parameters
currentStatsUnit stats.
statStringsList of statString rules.
psiStrengthEvalAre psi stats available?
Returns
Resulting string of all valid StatStrings.
const std::vector< StatStringCondition * > OpenXcom::StatString::getConditions ( )

Get the conditions for this StatString.

Returns the conditions associated with this StatString.

Returns
List of StatStringConditions.
std::map< std::string, int > OpenXcom::StatString::getCurrentStats ( UnitStats currentStats)
static

Get the CurrentStats.

Get a map associating stat names to unit stats.

Parameters
currentStatsUnit stats to use.
Returns
Map of unit stats.
const std::string OpenXcom::StatString::getString ( )

Get the StatString string.

Returns the string to add to a name for this StatString.

Returns
StatString... string.
void OpenXcom::StatString::load ( const YAML::Node &  node)

Loads the StatString from YAML.

Loads the StatString from a YAML file.

Parameters
nodeYAML node.

The documentation for this class was generated from the following files: