OpenXcom  1.0
Open-source clone of the original X-Com
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...
 
Position getPosition () 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 () const
 gets "flags" variable, which is really the patrolling desirability value
 
bool operator< (Node &b) const
 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

◆ Node()

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

◆ ~Node()

OpenXcom::Node::~Node ( )

Cleans up the Node.

clean up node.

Member Function Documentation

◆ getID()

int OpenXcom::Node::getID ( ) const

get the node's id

Get the node's id.

Returns
unique id

◆ getPosition()

Position OpenXcom::Node::getPosition ( ) const

Gets the node's position.

Gets the Node's position.

Returns
position

◆ getPriority()

int OpenXcom::Node::getPriority ( ) const

Gets node's priority.

Get the priority of this spawnpoint.

Returns
priority

◆ getRank()

NodeRank OpenXcom::Node::getRank ( ) const

Gets node's rank.

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

Returns
noderank

◆ getSegment()

int OpenXcom::Node::getSegment ( ) const

Gets the node's segment.

Gets the Node's segment.

Returns
segment

◆ getType()

int OpenXcom::Node::getType ( ) const

Gets the node's type.

Gets the Node's type.

Returns
type

◆ load()

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

Loads the node from YAML.

Loads the UFO from a YAML file.

Parameters
nodeYAML node.

◆ save()

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: