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::RuleManufacture Class Reference

Represents the information needed to manufacture an object. More...

#include <RuleManufacture.h>

Public Member Functions

 RuleManufacture (const std::string &name)
 Creates a new manufacture. More...
 
void load (const YAML::Node &node, int listOrder)
 Loads the manufacture from YAML. More...
 
std::string getName () const
 Gets the manufacture name. More...
 
std::string getCategory () const
 Gets the manufacture category. More...
 
const std::vector< std::string > & getRequirements () const
 Gets the manufacture's requirements. More...
 
int getRequiredSpace () const
 Gets the required workshop space. More...
 
int getManufactureTime () const
 Gets the time required to manufacture one object. More...
 
int getManufactureCost () const
 Gets the cost of manufacturing one object. More...
 
const std::map< std::string,
int > & 
getRequiredItems () const
 Gets the list of items required to manufacture one object. More...
 
const std::map< std::string,
int > & 
getProducedItems () const
 Gets the list of items produced by completing "one object" of this project. by default: it contains only the "name" item with a value of 1. More...
 
int getListOrder () const
 Gets the list weight for this manufacture item. More...
 

Detailed Description

Represents the information needed to manufacture an object.

Constructor & Destructor Documentation

OpenXcom::RuleManufacture::RuleManufacture ( const std::string &  name)

Creates a new manufacture.

Creates a new Manufacture.

Parameters
nameThe unique manufacture name.

Member Function Documentation

std::string OpenXcom::RuleManufacture::getCategory ( ) const

Gets the manufacture category.

Gets the category shown in the manufacture list.

Returns
The category.
int OpenXcom::RuleManufacture::getListOrder ( ) const

Gets the list weight for this manufacture item.

Returns
The list weight for this manufacture item.
int OpenXcom::RuleManufacture::getManufactureCost ( ) const

Gets the cost of manufacturing one object.

Returns
The cost of manufacturing one object.
int OpenXcom::RuleManufacture::getManufactureTime ( ) const

Gets the time required to manufacture one object.

Gets the time needed to manufacture one object.

Returns
The time needed to manufacture one object (in man/hour).
std::string OpenXcom::RuleManufacture::getName ( ) const

Gets the manufacture name.

Gets the unique name of the manufacture.

Returns
The name.
const std::map< std::string, int > & OpenXcom::RuleManufacture::getProducedItems ( ) const

Gets the list of items produced by completing "one object" of this project. by default: it contains only the "name" item with a value of 1.

Gets the list of items produced by completing "one object" of this project.

Returns
The list of items produced by completing "one object" of this project.
const std::map< std::string, int > & OpenXcom::RuleManufacture::getRequiredItems ( ) const

Gets the list of items required to manufacture one object.

Returns
The list of items required to manufacture one object.
int OpenXcom::RuleManufacture::getRequiredSpace ( ) const

Gets the required workshop space.

Gets the required workspace to start production.

Returns
The required workspace.
const std::vector< std::string > & OpenXcom::RuleManufacture::getRequirements ( ) const

Gets the manufacture's requirements.

Gets the list of research required to manufacture this object.

Returns
A list of research IDs.
void OpenXcom::RuleManufacture::load ( const YAML::Node &  node,
int  listOrder 
)

Loads the manufacture from YAML.

Loads the manufacture project from a YAML file.

Parameters
nodeYAML node.
listOrderThe list weight for this manufacture.

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