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).
The primary key is composed of:
Definition at line 29 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.
References LocationKey().
Referenced by LocationKey(), LocationKey(), operator!=(), and operator==().
OPENTREP::LocationKey::LocationKey | ( | const LocationKey & | iLocationKey | ) |
OPENTREP::LocationKey::~LocationKey | ( | ) |
Destructor.
Definition at line 39 of file LocationKey.cpp.
|
inline |
Get the IATA code.
Definition at line 35 of file LocationKey.hpp.
Referenced by OPENTREP::Result::calculateCodeMatches(), and OPENTREP::LocationExchange::exportLocation().
|
inline |
Get the IATA location type (e.g., A for airport).
Definition at line 42 of file LocationKey.hpp.
Referenced by OPENTREP::LocationExchange::exportLocation().
|
inline |
Get the Geonames ID.
Definition at line 49 of file LocationKey.hpp.
Referenced by OPENTREP::LocationExchange::exportLocation().
|
inline |
State whether that POR is referenced by Geonames.
Definition at line 56 of file LocationKey.hpp.
Referenced by setIsGeonames().
|
inline |
Set the IATA code.
Definition at line 66 of file LocationKey.hpp.
|
inline |
Set the IATA location type (e.g., A for airport).
Definition at line 73 of file LocationKey.hpp.
|
inline |
Set the Geonames ID.
Definition at line 80 of file LocationKey.hpp.
|
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 OPENTREP::DBManager::insertPlaceInDB(), and 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.
Referenced by toString().
bool OPENTREP::LocationKey::operator== | ( | const LocationKey & | iLocationKey | ) | const |
|
inline |