OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
IATAType.hpp
Go to the documentation of this file.
1#ifndef __OPENTREP_IATATYPE_HPP
2#define __OPENTREP_IATATYPE_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <string>
9// OpenTrep
11
12// Forward declarations
13namespace treppb {
14 class PlaceType;
15}
16
17namespace OPENTREP {
18
42 struct IATAType {
43 public:
59
63 static const std::string& getLabel (const EN_IATAType&);
64
68 static EN_IATAType getType (const char);
69
73 static char getTypeLabel (const EN_IATAType&);
74
78 static std::string getTypeLabelAsString (const EN_IATAType&);
79
83 static treppb::PlaceType getTypeLabelAsPB (const EN_IATAType&);
84
88 static std::string describeLabels();
89
93 EN_IATAType getType() const;
94
98 char getTypeAsChar() const;
99
103 std::string getTypeAsString() const;
104
108 treppb::PlaceType getTypeAsPB() const;
109
113 const std::string describe() const;
114
115 public:
119 bool operator== (const EN_IATAType&) const;
120 bool operator== (const IATAType&) const;
121
122 public:
126 IATAType (const EN_IATAType&);
130 IATAType (const char iType);
134 IATAType (const std::string& iType);
138 IATAType (const IATAType&);
139
140 private:
144 IATAType();
145
146
147 private:
151 static const std::string _labels[LAST_VALUE];
155 static const char _typeLabels[LAST_VALUE];
156
157 private:
158 // //////// Attributes /////////
164 EN_IATAType _type;
165 };
166
167}
168#endif // __OPENTREP_IATATYPE_HPP
Enumeration of place/location types with respect to their use for transportation purposes.
Definition IATAType.hpp:42
bool operator==(const EN_IATAType &) const
Definition IATAType.cpp:193
static const std::string & getLabel(const EN_IATAType &)
Definition IATAType.cpp:113
treppb::PlaceType getTypeAsPB() const
Definition IATAType.cpp:181
char getTypeAsChar() const
Definition IATAType.cpp:168
const std::string describe() const
Definition IATAType.cpp:186
EN_IATAType getType() const
Definition IATAType.cpp:163
IATAType(const EN_IATAType &)
Definition IATAType.cpp:34
static treppb::PlaceType getTypeLabelAsPB(const EN_IATAType &)
Definition IATAType.cpp:130
std::string getTypeAsString() const
Definition IATAType.cpp:174
static char getTypeLabel(const EN_IATAType &)
Definition IATAType.cpp:118
static std::string getTypeLabelAsString(const EN_IATAType &)
Definition IATAType.cpp:123
static std::string describeLabels()
Definition IATAType.cpp:151