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

Represents a fixed waypoint on the world. More...

#include <Waypoint.h>

Inheritance diagram for OpenXcom::Waypoint:
OpenXcom::Target

Public Member Functions

 Waypoint ()
 Creates a waypoint. More...
 
 ~Waypoint ()
 Cleans up the waypoint.
 
void load (const YAML::Node &node)
 Loads the waypoint from YAML. More...
 
YAML::Node save () const
 Saves the waypoint to YAML. More...
 
YAML::Node saveId () const
 Saves the waypoint's ID to YAML. More...
 
int getId () const
 Gets the waypoint's ID. More...
 
void setId (int id)
 Sets the waypoint's ID. More...
 
std::wstring getName (Language *lang) const
 Gets the waypoint's name. More...
 
- Public Member Functions inherited from OpenXcom::Target
virtual ~Target ()
 Cleans up the target. More...
 
void load (const YAML::Node &node)
 Loads the moving target from YAML. More...
 
double getLongitude () const
 Gets the target's longitude. More...
 
void setLongitude (double lon)
 Sets the target's longitude. More...
 
double getLatitude () const
 Gets the target's latitude. More...
 
void setLatitude (double lat)
 Sets the target's latitude. More...
 
std::vector< Target * > * getFollowers ()
 Gets the target's followers. More...
 
double getDistance (const Target *target) const
 Gets the distance to another target. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenXcom::Target
 Target ()
 Creates a target. More...
 

Detailed Description

Represents a fixed waypoint on the world.

Constructor & Destructor Documentation

OpenXcom::Waypoint::Waypoint ( )

Creates a waypoint.

Initializes a waypoint.

Member Function Documentation

int OpenXcom::Waypoint::getId ( ) const

Gets the waypoint's ID.

Returns the waypoint's unique ID.

Returns
Unique ID.
std::wstring OpenXcom::Waypoint::getName ( Language lang) const
virtual

Gets the waypoint's name.

Returns the waypoint's unique identifying name.

Parameters
langLanguage to get strings from.
Returns
Full name.

Implements OpenXcom::Target.

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

Loads the waypoint from YAML.

Loads the waypoint from a YAML file.

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

Saves the waypoint to YAML.

Saves the waypoint to a YAML file.

Returns
YAML node.

Reimplemented from OpenXcom::Target.

YAML::Node OpenXcom::Waypoint::saveId ( ) const
virtual

Saves the waypoint's ID to YAML.

Saves the waypoint's unique identifiers to a YAML file.

Returns
YAML node.

Reimplemented from OpenXcom::Target.

void OpenXcom::Waypoint::setId ( int  id)

Sets the waypoint's ID.

Changes the waypoint's unique ID.

Parameters
idUnique ID.

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