OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::LocationKey Struct Reference

Class modelling the primary key of a location/POR (point of reference). More...

#include <opentrep/LocationKey.hpp>

+ Inheritance diagram for OPENTREP::LocationKey:

Public Member Functions

const IATACode_TgetIataCode () const
 
const IATATypegetIataType () const
 
const GeonamesID_TgetGeonamesID () const
 
const IsGeonames_TisGeonames () const
 
void setIataCode (const std::string &iIataCode)
 
void setIataType (const IATAType &iIATAType)
 
void setGeonamesID (const GeonamesID_T &iGeonamesID)
 
void setIsGeonames (const IsGeonames_T &isGeonames)
 
void toStream (std::ostream &) const
 
void fromStream (std::istream &)
 
std::string toString () const
 
std::string describe () const
 
 LocationKey (const IATACode_T &, const IATAType &, const GeonamesID_T &)
 
 LocationKey (const LocationKey &)
 
 ~LocationKey ()
 
bool operator== (const LocationKey &) const
 
bool operator!= (const LocationKey &iLocationKey) const
 

Detailed Description

Class modelling the primary key of a location/POR (point of reference).

Definition at line 21 of file LocationKey.hpp.

Constructor & Destructor Documentation

OPENTREP::LocationKey::LocationKey ( const IATACode_T iIataCode,
const IATAType iIataType,
const GeonamesID_T iGeonamesID 
)

Main constructor.

Definition at line 13 of file LocationKey.cpp.

OPENTREP::LocationKey::LocationKey ( const LocationKey iLocationKey)

Default copy constructor.

Definition at line 32 of file LocationKey.cpp.

OPENTREP::LocationKey::~LocationKey ( )

Destructor.

Definition at line 39 of file LocationKey.cpp.

Member Function Documentation

const IATACode_T& OPENTREP::LocationKey::getIataCode ( ) const
inline
const IATAType& OPENTREP::LocationKey::getIataType ( ) const
inline

Get the IATA location type (e.g., A for airport).

Definition at line 34 of file LocationKey.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Location::getIataType(), and OPENTREP::DBManager::retrievePlace().

const GeonamesID_T& OPENTREP::LocationKey::getGeonamesID ( ) const
inline
const IsGeonames_T& OPENTREP::LocationKey::isGeonames ( ) const
inline

State whether that POR is referenced by Geonames.

Definition at line 48 of file LocationKey.hpp.

Referenced by OPENTREP::Location::isGeonames(), and setIsGeonames().

void OPENTREP::LocationKey::setIataCode ( const std::string &  iIataCode)
inline

Set the IATA code.

Definition at line 58 of file LocationKey.hpp.

Referenced by OPENTREP::Location::setIataCode().

void OPENTREP::LocationKey::setIataType ( const IATAType iIATAType)
inline

Set the IATA location type (e.g., A for airport).

Definition at line 65 of file LocationKey.hpp.

Referenced by OPENTREP::Location::setIataType().

void OPENTREP::LocationKey::setGeonamesID ( const GeonamesID_T iGeonamesID)
inline

Set the Geonames ID.

Definition at line 72 of file LocationKey.hpp.

Referenced by OPENTREP::Location::setGeonamesID().

void OPENTREP::LocationKey::setIsGeonames ( const IsGeonames_T isGeonames)
inline

Set the Geonames flag.

Definition at line 79 of file LocationKey.hpp.

References isGeonames().

void OPENTREP::LocationKey::toStream ( std::ostream &  ioOut) const
virtual

Dump the structure into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 67 of file LocationKey.cpp.

References toString().

void OPENTREP::LocationKey::fromStream ( std::istream &  ioIn)
virtual

Read a structure from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 72 of file LocationKey.cpp.

std::string OPENTREP::LocationKey::toString ( ) const
virtual

Get the serialised version of the structure.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 60 of file LocationKey.cpp.

References describe().

Referenced by toStream().

std::string OPENTREP::LocationKey::describe ( ) const

Get a string describing the whole key (differentiating two objects at any level).

Definition at line 51 of file LocationKey.cpp.

References OPENTREP::IATAType::getTypeAsString().

Referenced by OPENTREP::Location::describeShortKey(), and toString().

bool OPENTREP::LocationKey::operator== ( const LocationKey iLocationKey) const

Comparison operator.

Definition at line 43 of file LocationKey.cpp.

bool OPENTREP::LocationKey::operator!= ( const LocationKey iLocationKey) const
inline

Comparison operator.

Definition at line 137 of file LocationKey.hpp.


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