OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::City Class Reference

Represents a city of the world. More...

#include <City.h>

Inheritance diagram for OpenXcom::City:
OpenXcom::Target

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.
 
std::string getName (Language *lang) const
 Gets the city's name. More...
 
int getMarker () const
 Gets the city's marker. More...
 
- Public Member Functions inherited from OpenXcom::Target
virtual ~Target ()
 Cleans up the target. More...
 
virtual void load (const YAML::Node &node)
 Loads the target from YAML. More...
 
virtual YAML::Node save () const
 Saves the target to YAML. More...
 
YAML::Node saveId () const
 Saves the target's ID to 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...
 
int getId () const
 Gets the target's ID. More...
 
void setId (int id)
 Sets the target's ID. More...
 
void setName (const std::string &newName)
 Sets the target's name. More...
 
virtual std::string getDefaultName (Language *lang) const
 Gets the target's default name. More...
 
virtual std::string getMarkerName () const
 Gets the target's marker name. More...
 
std::vector< MovingTarget * > * getFollowers ()
 Gets the target's followers. More...
 
std::vector< Craft * > getCraftFollowers () const
 Gets the target's craft 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 city of the world.

Aliens target cities for certain missions.

Constructor & Destructor Documentation

◆ City()

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

◆ getMarker()

int OpenXcom::City::getMarker ( ) const
virtual

Gets the city's marker.

Returns the globe marker for the UFO.

Returns
Marker sprite, -1 if none.

Implements OpenXcom::Target.

◆ getName()

std::string OpenXcom::City::getName ( Language lang) const
virtual

Gets the city's name.

Returns the city's unique identifying name.

Parameters
langLanguage to get strings from.
Returns
Full name.

Reimplemented from OpenXcom::Target.


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