Class modelling the primary key of a location/POR (point of reference). More...
#include <opentrep/LocationKey.hpp>
Public Member Functions | |
const IATACode_T & | getIataCode () const |
const IATAType & | getIataType () const |
const GeonamesID_T & | getGeonamesID () const |
const IsGeonames_T & | isGeonames () 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 |
Class modelling the primary key of a location/POR (point of reference).
Definition at line 21 of file LocationKey.hpp.
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.
|
inline |
Get the IATA code.
Definition at line 27 of file LocationKey.hpp.
Referenced by OPENTREP::Result::calculateCodeMatches(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Location::getIataCode(), and OPENTREP::DBManager::retrievePlace().
|
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().
|
inline |
Get the Geonames ID.
Definition at line 41 of file LocationKey.hpp.
Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Location::getGeonamesID(), and OPENTREP::DBManager::retrievePlace().
|
inline |
State whether that POR is referenced by Geonames.
Definition at line 48 of file LocationKey.hpp.
Referenced by OPENTREP::Location::isGeonames(), and setIsGeonames().
|
inline |
Set the IATA code.
Definition at line 58 of file LocationKey.hpp.
Referenced by OPENTREP::Location::setIataCode().
|
inline |
Set the IATA location type (e.g., A for airport).
Definition at line 65 of file LocationKey.hpp.
Referenced by OPENTREP::Location::setIataType().
|
inline |
Set the Geonames ID.
Definition at line 72 of file LocationKey.hpp.
Referenced by OPENTREP::Location::setGeonamesID().
|
inline |
|
virtual |
Dump the structure into an output stream.
ostream& | the output stream. |
Implements OPENTREP::OPENTREP_Abstract.
Definition at line 67 of file LocationKey.cpp.
References toString().
|
virtual |
Read a structure from an input stream.
istream& | the input stream. |
Implements OPENTREP::OPENTREP_Abstract.
Definition at line 72 of file LocationKey.cpp.
|
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.
|
inline |
Comparison operator.
Definition at line 137 of file LocationKey.hpp.