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 | List of all members
OpenXcom::ResearchProject Class Reference

Represent a ResearchProject Contain information about assigned scientist, time already spent and cost of the project. More...

#include <ResearchProject.h>

Public Member Functions

bool step ()
 Game logic. Called every new day to compute time spent. More...
 
void setAssigned (int nb)
 set the number of scientist assigned to this ResearchProject More...
 
int getAssigned () const
 get the number of scientist assigned to this ResearchProject More...
 
int getSpent () const
 get time already spent on this ResearchProject More...
 
void setSpent (int spent)
 set time already spent on this ResearchProject More...
 
int getCost () const
 get time cost of this ResearchProject More...
 
void setCost (int f)
 set time cost of this ResearchProject More...
 
const RuleResearchgetRules () const
 get the ResearchProject Ruleset
 
void load (const YAML::Node &node)
 load the ResearchProject from YAML More...
 
YAML::Node save () const
 save the ResearchProject to YAML More...
 
std::string getResearchProgress () const
 Get a string describing current progress. More...
 

Detailed Description

Represent a ResearchProject Contain information about assigned scientist, time already spent and cost of the project.

Member Function Documentation

int OpenXcom::ResearchProject::getAssigned ( ) const

get the number of scientist assigned to this ResearchProject

Returns the number of scientist assigned to this project.

Returns
Number of assigned scientist.
int OpenXcom::ResearchProject::getCost ( ) const

get time cost of this ResearchProject

Returns the cost of the ResearchProject.

Returns
the cost of the ResearchProject(in man/day)
std::string OpenXcom::ResearchProject::getResearchProgress ( ) const

Get a string describing current progress.

Return a string describing Research progress.

Returns
a string describing Research progress.
int OpenXcom::ResearchProject::getSpent ( ) const

get time already spent on this ResearchProject

Returns the time already spent on this project.

Returns
the time already spent on this ResearchProject(in man/day)
void OpenXcom::ResearchProject::load ( const YAML::Node &  node)

load the ResearchProject from YAML

Loads the research project from a YAML file.

Parameters
nodeYAML node.
YAML::Node OpenXcom::ResearchProject::save ( ) const

save the ResearchProject to YAML

Saves the research project to a YAML file.

Returns
YAML node.
void OpenXcom::ResearchProject::setAssigned ( int  nb)

set the number of scientist assigned to this ResearchProject

Changes the number of scientist to the ResearchProject.

Parameters
nbnumber of scientist assigned to this ResearchProject
void OpenXcom::ResearchProject::setCost ( int  f)

set time cost of this ResearchProject

Changes the cost of the ResearchProject.

Parameters
fnew project cost(in man/day)
void OpenXcom::ResearchProject::setSpent ( int  spent)

set time already spent on this ResearchProject

Changes the cost of the ResearchProject.

Parameters
spentnew project cost(in man/day)
bool OpenXcom::ResearchProject::step ( )

Game logic. Called every new day to compute time spent.

Called every day to compute time spent on this ResearchProject.

Returns
true if the ResearchProject is finished

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