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

Represents a node/spawnpoint in the battlescape, loaded from RMP files. More...

#include <Node.h>

Public Member Functions

 Node ()
 Creates a Node.
 
 Node (int id, Position pos, int segment, int type, int rank, int flags, int reserved, int priority)
 Initializes a Node. More...
 
 ~Node ()
 Cleans up the Node. More...
 
void load (const YAML::Node &node)
 Loads the node from YAML. More...
 
YAML::Node save () const
 Saves the node to YAML. More...
 
int getID () const
 get the node's id More...
 
std::vector< int > * getNodeLinks ()
 get the node's paths
 
NodeRank getRank () const
 Gets node's rank. More...
 
int getPriority () const
 Gets node's priority. More...
 
const PositiongetPosition () const
 Gets the node's position. More...
 
int getSegment () const
 Gets the node's segment. More...
 
int getType () const
 Gets the node's type. More...
 
void setType (int type)
 Sets the node's type, surprisingly.
 
int getFlags ()
 gets "flags" variable, which is really the patrolling desirability value
 
bool operator< (Node &b)
 compares the _flags variables of the nodes (for the purpose of patrol decisions!)
 

Detailed Description

Represents a node/spawnpoint in the battlescape, loaded from RMP files.

See also
http://www.ufopaedia.org/index.php?title=ROUTES

Constructor & Destructor Documentation

OpenXcom::Node::Node ( int  id,
Position  pos,
int  segment,
int  type,
int  rank,
int  flags,
int  reserved,
int  priority 
)

Initializes a Node.

Parameters
id
pos
segment
type
rank
flags
reserved
priority
OpenXcom::Node::~Node ( )

Cleans up the Node.

clean up node.

Member Function Documentation

int OpenXcom::Node::getID ( ) const

get the node's id

Get the node's id.

Returns
unique id
const Position & OpenXcom::Node::getPosition ( ) const

Gets the node's position.

Gets the Node's position.

Returns
position
int OpenXcom::Node::getPriority ( ) const

Gets node's priority.

Get the priority of this spawnpoint.

Returns
priority
NodeRank OpenXcom::Node::getRank ( ) const

Gets node's rank.

Get the rank of units that can spawn on this node.

Returns
noderank
int OpenXcom::Node::getSegment ( ) const

Gets the node's segment.

Gets the Node's segment.

Returns
segment
int OpenXcom::Node::getType ( ) const

Gets the node's type.

Gets the Node's type.

Returns
type
void OpenXcom::Node::load ( const YAML::Node &  node)

Loads the node from YAML.

Loads the UFO from a YAML file.

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

Saves the node to YAML.

Saves the UFO to a YAML file.

Returns
YAML node.

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