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

Represents a region of the world. More...

#include <Region.h>

Public Member Functions

 Region (RuleRegion *rules)
 Creates a new region of the specified type. More...
 
 ~Region ()
 Cleans up the region.
 
void load (const YAML::Node &node)
 Loads the region from YAML. More...
 
YAML::Node save () const
 Saves the region to YAML. More...
 
RuleRegiongetRules () const
 Gets the region's ruleset. More...
 
void addActivityXcom (int activity)
 add xcom activity in this region More...
 
void addActivityAlien (int activity)
 add alien activity in this region More...
 
const std::vector< int > & getActivityXcom () const
 get xcom activity to this region More...
 
const std::vector< int > & getActivityAlien () const
 get xcom activity to this region More...
 
void newMonth ()
 start new month of activity More...
 

Detailed Description

Represents a region of the world.

Contains variable info about a region like X-Com and alien activity in it.

Constructor & Destructor Documentation

OpenXcom::Region::Region ( RuleRegion rules)

Creates a new region of the specified type.

Initializes a region of the specified type.

Parameters
rulesPointer to ruleset.

Member Function Documentation

void OpenXcom::Region::addActivityAlien ( int  activity)

add alien activity in this region

Adds to the region's alien activity level.

Parameters
activityAmount to add.
void OpenXcom::Region::addActivityXcom ( int  activity)

add xcom activity in this region

Adds to the region's xcom activity level.

Parameters
activityAmount to add.
const std::vector< int > & OpenXcom::Region::getActivityAlien ( ) const

get xcom activity to this region

Gets the region's alien activity level.

Returns
activity level.
const std::vector< int > & OpenXcom::Region::getActivityXcom ( ) const

get xcom activity to this region

Gets the region's xcom activity level.

Returns
activity level.
RuleRegion * OpenXcom::Region::getRules ( ) const

Gets the region's ruleset.

Returns the ruleset for the region's type.

Returns
Pointer to ruleset.
void OpenXcom::Region::load ( const YAML::Node &  node)

Loads the region from YAML.

Loads the region from a YAML file.

Parameters
nodeYAML node.
void OpenXcom::Region::newMonth ( )

start new month of activity

Store last month's counters, start new counters.

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

Saves the region to YAML.

Saves the region to a YAML file.

Returns
YAML node.

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