0.08.01
C++ Open Travel Request Parsing Library
Toggle main menu visibility
Loading...
Searching...
No Matches
LocationKey.hpp
Go to the documentation of this file.
1
#ifndef __OPENTREP_LOCATIONKEY_HPP
2
#define __OPENTREP_LOCATIONKEY_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// OpenTrep
11
#include <
opentrep/OPENTREP_Types.hpp
>
12
#include <
opentrep/OPENTREP_Abstract.hpp
>
13
#include <
opentrep/IATAType.hpp
>
14
15
namespace
OPENTREP
{
16
29
struct
LocationKey
:
public
OPENTREP_Abstract
{
30
public
:
31
// //////////////// Getters ///////////////
35
const
IATACode_T
&
getIataCode
()
const
{
36
return
_iataCode;
37
}
38
42
const
IATAType
&
getIataType
()
const
{
43
return
_iataType;
44
}
45
49
const
GeonamesID_T
&
getGeonamesID
()
const
{
50
return
_geonamesID;
51
}
52
56
const
IsGeonames_T
&
isGeonames
()
const
{
57
return
_isGeonames;
58
}
59
60
61
public
:
62
// ////////////////// Setters /////////////////
66
void
setIataCode
(
const
std::string& iIataCode) {
67
_iataCode =
IATACode_T
(iIataCode);
68
}
69
73
void
setIataType
(
const
IATAType
& iIATAType) {
74
_iataType = iIATAType;
75
}
76
80
void
setGeonamesID
(
const
GeonamesID_T
& iGeonamesID) {
81
_geonamesID = iGeonamesID;
82
}
83
87
void
setIsGeonames
(
const
IsGeonames_T
&
isGeonames
) {
88
_isGeonames =
isGeonames
;
89
}
90
91
92
public
:
93
// ////////////// Display methods //////////////
99
void
toStream
(std::ostream&)
const
;
100
106
void
fromStream
(std::istream&);
107
111
std::string
toString
()
const
;
112
117
std::string
describe
()
const
;
118
119
120
public
:
121
// ////////////// Constructors and destructors //////////////
125
LocationKey
(
const
IATACode_T
&,
const
IATAType
&,
const
GeonamesID_T
&);
126
130
LocationKey
(
const
LocationKey
&);
131
135
~LocationKey
();
136
140
bool
operator==
(
const
LocationKey
&)
const
;
141
145
bool
operator!=
(
const
LocationKey
& iLocationKey)
const
{
146
return
!(iLocationKey == *
this
);
147
}
148
149
private
:
153
LocationKey
();
154
155
156
private
:
157
// //////////////////// Attributes ///////////////////////
163
IATACode_T
_iataCode;
164
170
IATAType
_iataType;
171
177
GeonamesID_T
_geonamesID;
178
182
IsGeonames_T
_isGeonames;
183
};
184
185
}
186
#endif
// __OPENTREP_LOCATIONKEY_HPP
IATAType.hpp
OPENTREP_Abstract.hpp
OPENTREP_Types.hpp
OPENTREP
Definition
BasChronometer.cpp:10
OPENTREP::IsGeonames_T
bool IsGeonames_T
Definition
OPENTREP_Types.hpp:635
OPENTREP::GeonamesID_T
unsigned int GeonamesID_T
Definition
OPENTREP_Types.hpp:182
OPENTREP::IATACode_T
Definition
OPENTREP_Types.hpp:154
OPENTREP::IATAType
Enumeration of place/location types with respect to their use for transportation purposes.
Definition
IATAType.hpp:42
OPENTREP::LocationKey
Class modelling the primary key of a location/POR (point of reference).
Definition
LocationKey.hpp:29
OPENTREP::LocationKey::~LocationKey
~LocationKey()
Definition
LocationKey.cpp:39
OPENTREP::LocationKey::toStream
void toStream(std::ostream &) const
Definition
LocationKey.cpp:67
OPENTREP::LocationKey::setIataCode
void setIataCode(const std::string &iIataCode)
Definition
LocationKey.hpp:66
OPENTREP::LocationKey::getIataType
const IATAType & getIataType() const
Definition
LocationKey.hpp:42
OPENTREP::LocationKey::describe
std::string describe() const
Definition
LocationKey.cpp:51
OPENTREP::LocationKey::setGeonamesID
void setGeonamesID(const GeonamesID_T &iGeonamesID)
Definition
LocationKey.hpp:80
OPENTREP::LocationKey::LocationKey
LocationKey(const IATACode_T &, const IATAType &, const GeonamesID_T &)
Definition
LocationKey.cpp:13
OPENTREP::LocationKey::toString
std::string toString() const
Definition
LocationKey.cpp:60
OPENTREP::LocationKey::setIataType
void setIataType(const IATAType &iIATAType)
Definition
LocationKey.hpp:73
OPENTREP::LocationKey::getIataCode
const IATACode_T & getIataCode() const
Definition
LocationKey.hpp:35
OPENTREP::LocationKey::setIsGeonames
void setIsGeonames(const IsGeonames_T &isGeonames)
Definition
LocationKey.hpp:87
OPENTREP::LocationKey::operator==
bool operator==(const LocationKey &) const
Definition
LocationKey.cpp:43
OPENTREP::LocationKey::getGeonamesID
const GeonamesID_T & getGeonamesID() const
Definition
LocationKey.hpp:49
OPENTREP::LocationKey::fromStream
void fromStream(std::istream &)
Definition
LocationKey.cpp:72
OPENTREP::LocationKey::isGeonames
const IsGeonames_T & isGeonames() const
Definition
LocationKey.hpp:56
OPENTREP::LocationKey::operator!=
bool operator!=(const LocationKey &iLocationKey) const
Definition
LocationKey.hpp:145
OPENTREP::OPENTREP_Abstract::OPENTREP_Abstract
OPENTREP_Abstract()
Definition
OPENTREP_Abstract.hpp:43
Generated on
for OpenTREP by
1.17.0