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 | Protected Member Functions | List of all members
OpenXcom::ArticleDefinition Class Reference

ArticleDefinition is the base class for all article types. More...

#include <ArticleDefinition.h>

Inheritance diagram for OpenXcom::ArticleDefinition:
OpenXcom::ArticleDefinitionArmor OpenXcom::ArticleDefinitionBaseFacility OpenXcom::ArticleDefinitionCraft OpenXcom::ArticleDefinitionCraftWeapon OpenXcom::ArticleDefinitionItem OpenXcom::ArticleDefinitionText OpenXcom::ArticleDefinitionTextImage OpenXcom::ArticleDefinitionUfo OpenXcom::ArticleDefinitionVehicle

Public Member Functions

virtual ~ArticleDefinition ()
 Destructor.
 
UfopaediaTypeId getType () const
 Gets the type of article definition. More...
 
virtual void load (const YAML::Node &node, int listOrder)
 Loads the article from YAML. More...
 
int getListOrder () const
 Gets the article's list weight. More...
 

Protected Member Functions

 ArticleDefinition (UfopaediaTypeId type_id)
 Constructor (protected, so this class cannot be instantiated directly). More...
 

Detailed Description

ArticleDefinition is the base class for all article types.

This class is used to store all information about articles required to generate an ArticleState from.

Constructor & Destructor Documentation

OpenXcom::ArticleDefinition::ArticleDefinition ( UfopaediaTypeId  type_id)
protected

Constructor (protected, so this class cannot be instantiated directly).

Constructor.

Parameters
type_idArticle type of this instance.

Member Function Documentation

int OpenXcom::ArticleDefinition::getListOrder ( ) const

Gets the article's list weight.

Gets the list weight of the article.

Returns
The list weight of the article.
UfopaediaTypeId OpenXcom::ArticleDefinition::getType ( ) const

Gets the type of article definition.

Gets the article definition type.

(Text, TextImage, Craft, ...)

Returns
The type of article definition of this instance.
void OpenXcom::ArticleDefinition::load ( const YAML::Node &  node,
int  listOrder 
)
virtual

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