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

Represents a city of the world. More...

#include <City.h>

Public Member Functions

 City (const std::string &name, double lon, double lat)
 Creates a new city at a certain position. More...
 
 ~City ()
 Cleans up the city.
 
void load (const YAML::Node &node)
 Loads the city from YAML. More...
 
std::string getName () const
 Gets the city's name. More...
 
double getLatitude () const
 Gets the city's latitude. More...
 
double getLongitude () const
 Gets the city's longitude. More...
 

Detailed Description

Represents a city of the world.

Aliens target cities for certain missions.

Constructor & Destructor Documentation

OpenXcom::City::City ( const std::string &  name,
double  lon,
double  lat 
)

Creates a new city at a certain position.

Initializes a city with certain data.

Parameters
nameName of the city.
lonLongitude of the city.
latLatitude of the city.

Member Function Documentation

double OpenXcom::City::getLatitude ( ) const

Gets the city's latitude.

Returns the latitude coordinate of the city.

Returns
The city's latitude in radians.
double OpenXcom::City::getLongitude ( ) const

Gets the city's longitude.

Returns the longitude coordinate of the city.

Returns
The city's longitude in radians.
std::string OpenXcom::City::getName ( ) const

Gets the city's name.

Returns the name of the city.

Returns
The city's name.
void OpenXcom::City::load ( const YAML::Node &  node)

Loads the city from YAML.

Loads the region type from a YAML file.

Parameters
nodeYAML node.

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