OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::SoldierCommendations Class Reference

Each entry will be its own commendation. More...

#include <SoldierDiary.h>

Public Member Functions

 SoldierCommendations (const YAML::Node &node)
 Creates a new commendation and loads its contents from YAML. More...
 
 SoldierCommendations (std::string commendationName, std::string noun="noNoun")
 Creates a commendation of the specified type. More...
 
 ~SoldierCommendations ()
 Cleans up the commendation.
 
void load (const YAML::Node &node)
 Loads the commendation information from YAML. More...
 
YAML::Node save () const
 Saves the commendation information to YAML. More...
 
std::string getType () const
 Get commendation name. More...
 
std::string getNoun () const
 Get commendation noun. More...
 
std::string getDecorationLevelName (int skipCounter) const
 Get the commendation's decoration level's name. More...
 
std::string getDecorationDescription () const
 Get the commendation's decoration description. More...
 
int getDecorationLevelInt () const
 Get the commendation's decoration level's int. More...
 
bool isNew () const
 Get the newness of the commendation. More...
 
void makeOld ()
 Set the commendation newness to false. More...
 
void addDecoration ()
 Increment decoration level. More...
 

Detailed Description

Each entry will be its own commendation.

Constructor & Destructor Documentation

◆ SoldierCommendations() [1/2]

OpenXcom::SoldierCommendations::SoldierCommendations ( const YAML::Node &  node)

Creates a new commendation and loads its contents from YAML.

Initializes a new commendation entry from YAML.

Parameters
nodeYAML node.

◆ SoldierCommendations() [2/2]

OpenXcom::SoldierCommendations::SoldierCommendations ( std::string  commendationName,
std::string  noun = "noNoun" 
)

Creates a commendation of the specified type.

Initializes a soldier commendation.

Member Function Documentation

◆ addDecoration()

void OpenXcom::SoldierCommendations::addDecoration ( )

Increment decoration level.

Add a level of decoration to the commendation.

Sets isNew to true.

◆ getDecorationDescription()

std::string OpenXcom::SoldierCommendations::getDecorationDescription ( ) const

Get the commendation's decoration description.

Get the soldier commendation level's description.

Returns
string Commendation level description.

◆ getDecorationLevelInt()

int OpenXcom::SoldierCommendations::getDecorationLevelInt ( ) const

Get the commendation's decoration level's int.

Get the soldier commendation level's int.

Returns
int Commendation level.

◆ getDecorationLevelName()

std::string OpenXcom::SoldierCommendations::getDecorationLevelName ( int  skipCounter) const

Get the commendation's decoration level's name.

Get the soldier commendation level's name.

Returns
string Commendation level.

◆ getNoun()

std::string OpenXcom::SoldierCommendations::getNoun ( ) const

Get commendation noun.

Get the soldier's commendation's noun.

Returns
string Commendation noun

◆ getType()

std::string OpenXcom::SoldierCommendations::getType ( ) const

Get commendation name.

Get the soldier's commendation's name.

Returns
string Commendation name.

◆ isNew()

bool OpenXcom::SoldierCommendations::isNew ( ) const

Get the newness of the commendation.

Get newness of commendation.

Returns
bool Is the commendation new?

◆ load()

void OpenXcom::SoldierCommendations::load ( const YAML::Node &  node)

Loads the commendation information from YAML.

Loads the commendation from a YAML file.

Parameters
nodeYAML node.

◆ makeOld()

void OpenXcom::SoldierCommendations::makeOld ( )

Set the commendation newness to false.

Set the newness of the commendation to old.

◆ save()

YAML::Node OpenXcom::SoldierCommendations::save ( ) const

Saves the commendation information to YAML.

Saves the commendation to a YAML file.

Returns
YAML node.

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