OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP_Types.hpp
Go to the documentation of this file.
1#ifndef __OPENTREP_OPENTREP_TYPES_HPP
2#define __OPENTREP_OPENTREP_TYPES_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <exception>
9#include <string>
10#include <list>
11#include <map>
12#include <set>
13// Boost Date-Time
14#include <boost/date_time/gregorian/gregorian.hpp>
15#include <boost/date_time/posix_time/posix_time_types.hpp>
16// Boost Array
17#include <boost/array.hpp>
18// OpenTrep
21
22namespace OPENTREP {
23
24 // //////// Type definitions /////////
28 struct FilePath_T : public std::string {
29 public:
30 explicit FilePath_T (const std::string& iValue) : std::string (iValue) {
31 }
32 };
33
37 struct PORFilePath_T : public FilePath_T {
38 public:
39 explicit PORFilePath_T (const std::string& iValue) : FilePath_T (iValue) { }
40 };
41
46 struct TravelDBFilePath_T : public std::string {
47 public:
48 explicit TravelDBFilePath_T (const std::string& iValue)
49 : std::string (iValue) { }
50 };
51
56 struct SQLDBConnectionString_T : public std::string {
57 public:
58 explicit SQLDBConnectionString_T (const std::string& iValue)
59 : std::string (iValue) { }
60 };
61
66 struct SQLiteDBFilePath_T : public std::string {
67 public:
68 explicit SQLiteDBFilePath_T (const std::string& iValue)
69 : std::string (iValue) { }
70 };
71
76 struct RawDataString_T : public std::string {
77 public:
78 explicit RawDataString_T (const std::string& iValue)
79 : std::string (iValue) { }
80 };
81
108 typedef unsigned short DeploymentNumber_T;
109
137
142
147
154 struct IATACode_T : public std::string {
155 public:
156 explicit IATACode_T (const std::string& iValue) : std::string (iValue) { }
157 };
158
161 typedef std::list<IATACode_T> IATACodeList_T;
162
170 struct ICAOCode_T : public std::string {
171 public:
172 explicit ICAOCode_T (const std::string& iValue) : std::string (iValue) { }
173 };
174
177 typedef std::list<ICAOCode_T> ICAOCodeList_T;
178
182 typedef unsigned int GeonamesID_T;
186 typedef std::list<GeonamesID_T> GeonamesIDList_T;
187
191 typedef unsigned int EnvelopeID_T;
192
199 struct FAACode_T : public std::string {
200 public:
201 explicit FAACode_T (const std::string& iValue) : std::string (iValue) { }
202 };
203
213 struct TCLIDCode_T : public std::string {
214 public:
215 explicit TCLIDCode_T (const std::string& iValue) : std::string (iValue) { }
216 };
217
225 struct UNLOCode_T : public std::string {
226 public:
227 explicit UNLOCode_T (const std::string& iValue) : std::string (iValue) { }
228 };
229 typedef std::list<UNLOCode_T> UNLOCodeList_T;
230
238 typedef unsigned int UICCode_T;
242 typedef std::list<UICCode_T> UICCodeList_T;
243
247 struct LocationName_T : public std::string {
248 public:
249 explicit LocationName_T (const std::string& iValue) : std::string (iValue) {
250 }
251 };
252
257 struct CommonName_T : public LocationName_T {
258 public:
259 explicit CommonName_T (const std::string& iValue) : LocationName_T (iValue) {
260 }
261 };
262
266 struct ASCIIName_T : public LocationName_T {
267 public:
268 explicit ASCIIName_T (const std::string& iValue) : LocationName_T (iValue) {
269 }
270 };
271
278 public:
279 explicit AltNameShortListString_T (const std::string& iValue)
280 : LocationName_T (iValue) {
281 }
282 };
283 typedef std::list<AltNameShortListString_T> AltNameShortList_T;
284
289 struct TvlPORListString_T : public std::string {
290 public:
291 explicit TvlPORListString_T (const std::string& iValue)
292 : std::string (iValue) {
293 }
294 };
295
300 struct LanguageCode_T : public std::string {
301 public:
302 explicit LanguageCode_T (const std::string& iValue) : std::string (iValue) {
303 }
304 };
305
309 struct Comment_T : public std::string {
310 public:
311 explicit Comment_T (const std::string& iValue) : std::string (iValue) { }
312 };
313
317 struct CityCode_T : public IATACode_T {
318 public:
319 explicit CityCode_T (const std::string& iValue)
320 : IATACode_T (std::string (iValue)) {
321 }
322 };
323
327 struct CityUTFName_T : public std::string {
328 public:
329 explicit CityUTFName_T (const std::string& iValue) : std::string (iValue) { }
330 };
331
336 struct CityASCIIName_T : public std::string {
337 public:
338 explicit CityASCIIName_T (const std::string& iValue)
339 : std::string (iValue) { }
340 };
341
348 struct CityListString_T : public std::string {
349 public:
350 explicit CityListString_T (const std::string& iValue)
351 : std::string (iValue) {
352 }
353 };
354
358 struct StateCode_T : public std::string {
359 public:
360 explicit StateCode_T (const std::string& iValue) : std::string (iValue) { }
361 };
362
368 struct CountryCode_T : public std::string {
369 public:
370 explicit CountryCode_T (const std::string& iValue) : std::string (iValue) { }
371 };
372
380 struct AltCountryCode_T : public std::string {
381 public:
382 explicit AltCountryCode_T (const std::string& iValue)
383 : std::string (iValue) { }
384 };
385
391 struct CountryName_T : public std::string {
392 public:
393 explicit CountryName_T (const std::string& iValue) : std::string (iValue) { }
394 };
395
403 typedef unsigned int WAC_T;
404
410 struct WACName_T : public std::string {
411 public:
412 explicit WACName_T (const std::string& iValue) : std::string (iValue) { }
413 };
414
420 struct CurrencyCode_T : public std::string {
421 public:
422 explicit CurrencyCode_T (const std::string& iValue): std::string (iValue) { }
423 };
424
428 struct ContinentCode_T : public std::string {
429 public:
430 explicit ContinentCode_T (const std::string& iValue) : std::string (iValue) {
431 }
432 };
433
437 struct ContinentName_T : public std::string {
438 public:
439 explicit ContinentName_T (const std::string& iValue) : std::string (iValue) {
440 }
441 };
442
448 struct Admin1Code_T : public std::string {
449 public:
450 explicit Admin1Code_T (const std::string& iValue) : std::string (iValue) { }
451 };
452
458 struct Admin1UTFName_T : public std::string {
459 public:
460 explicit Admin1UTFName_T (const std::string& iValue)
461 : std::string (iValue) { }
462 };
463
469 struct Admin1ASCIIName_T : public std::string {
470 public:
471 explicit Admin1ASCIIName_T (const std::string& iValue)
472 : std::string (iValue) { }
473 };
474
480 struct Admin2Code_T : public std::string {
481 public:
482 explicit Admin2Code_T (const std::string& iValue) : std::string (iValue) { }
483 };
484
490 struct Admin2UTFName_T : public std::string {
491 public:
492 explicit Admin2UTFName_T (const std::string& iValue)
493 : std::string (iValue) { }
494 };
495
501 struct Admin2ASCIIName_T : public std::string {
502 public:
503 explicit Admin2ASCIIName_T (const std::string& iValue)
504 : std::string (iValue) { }
505 };
506
512 struct Admin3Code_T : public std::string {
513 public:
514 explicit Admin3Code_T (const std::string& iValue) : std::string (iValue) { }
515 };
516
522 struct Admin4Code_T : public std::string {
523 public:
524 explicit Admin4Code_T (const std::string& iValue) : std::string (iValue) { }
525 };
526
532 struct FeatureClass_T : public std::string {
533 public:
534 explicit FeatureClass_T (const std::string& iValue) : std::string (iValue) {
535 }
536 };
537
543 struct FeatureCode_T : public std::string {
544 public:
545 explicit FeatureCode_T (const std::string& iValue) : std::string (iValue) { }
546 };
547
553 struct FeatureName_T : public std::string {
554 public:
555 explicit FeatureName_T (const std::string& iValue) : std::string (iValue) { }
556 };
557 typedef std::list<FeatureName_T> FeatureNameList_T;
558
562 typedef double GeoCoord_T;
565
569 struct WikiLink_T : public std::string {
570 public:
571 explicit WikiLink_T (const std::string& iValue) : std::string (iValue) { }
572 };
573
579 typedef boost::gregorian::date Date_T;
580
586 typedef unsigned int Population_T;
587
593 typedef int Elevation_T;
594
600 typedef int GTopo30_T;
601
605 struct TimeZone_T : public std::string {
606 public:
607 explicit TimeZone_T (const std::string& iValue) : std::string (iValue) { }
608 };
609
613 typedef float GMTOffset_T;
614
618 typedef float DSTOffset_T;
619
623 typedef float RawOffset_T;
624
630 typedef double PageRank_T;
631
635 typedef bool IsGeonames_T;
636
640 typedef bool IsAirport_T;
641
645 typedef bool IsCommercial_T;
646
650 typedef unsigned int XapianDocID_T;
651
655 typedef unsigned short Weight_T;
656
660 typedef std::string TravelQuery_T;
661
665 typedef double MatchingPercentage_T;
666
670 typedef double Percentage_T;
671
675 typedef double Score_T;
676
680 typedef unsigned int NbOfDBEntries_T;
681
685 typedef std::string Word_T;
686
690 typedef std::list<Word_T> WordList_T;
691
695 typedef std::set<std::string> WordSet_T;
696
700 typedef std::set<std::string> BlackList_T;
701
705 typedef unsigned int NbOfLetters_T;
706
710 typedef unsigned short NbOfWords_T;
711
715 typedef unsigned short NbOfMatches_T;
716
720 typedef unsigned short NbOfErrors_T;
721
725 typedef std::map<NbOfLetters_T, NbOfErrors_T> DistanceErrorScale_T;
726
730 typedef boost::array<NbOfLetters_T, 5> DistanceErrorScaleArray_T;
731}
732#endif // __OPENTREP_OPENTREP_TYPES_HPP
std::list< Word_T > WordList_T
unsigned int NbOfLetters_T
unsigned short Weight_T
unsigned int UICCode_T
unsigned short NbOfErrors_T
std::set< std::string > BlackList_T
bool shouldAddPORInSQLDB_T
std::string Word_T
std::list< ICAOCode_T > ICAOCodeList_T
unsigned int NbOfDBEntries_T
std::string TravelQuery_T
double MatchingPercentage_T
double Percentage_T
std::list< IATACode_T > IATACodeList_T
GeoCoord_T Latitude_T
boost::gregorian::date Date_T
double PageRank_T
unsigned int EnvelopeID_T
double GeoCoord_T
GeoCoord_T Longitude_T
unsigned int WAC_T
std::list< UICCode_T > UICCodeList_T
std::list< UNLOCode_T > UNLOCodeList_T
std::map< NbOfLetters_T, NbOfErrors_T > DistanceErrorScale_T
std::list< FeatureName_T > FeatureNameList_T
bool shouldIndexPORInXapian_T
unsigned short DeploymentNumber_T
boost::array< NbOfLetters_T, 5 > DistanceErrorScaleArray_T
std::set< std::string > WordSet_T
unsigned short NbOfMatches_T
std::list< GeonamesID_T > GeonamesIDList_T
unsigned int Population_T
unsigned int GeonamesID_T
bool shouldIndexNonIATAPOR_T
std::list< AltNameShortListString_T > AltNameShortList_T
unsigned int XapianDocID_T
unsigned short NbOfWords_T
ASCIIName_T(const std::string &iValue)
Admin1ASCIIName_T(const std::string &iValue)
Admin1Code_T(const std::string &iValue)
Admin1UTFName_T(const std::string &iValue)
Admin2ASCIIName_T(const std::string &iValue)
Admin2Code_T(const std::string &iValue)
Admin2UTFName_T(const std::string &iValue)
Admin3Code_T(const std::string &iValue)
Admin4Code_T(const std::string &iValue)
AltCountryCode_T(const std::string &iValue)
AltNameShortListString_T(const std::string &iValue)
CityASCIIName_T(const std::string &iValue)
CityCode_T(const std::string &iValue)
CityListString_T(const std::string &iValue)
CityUTFName_T(const std::string &iValue)
Comment_T(const std::string &iValue)
CommonName_T(const std::string &iValue)
ContinentCode_T(const std::string &iValue)
ContinentName_T(const std::string &iValue)
CountryCode_T(const std::string &iValue)
CountryName_T(const std::string &iValue)
CurrencyCode_T(const std::string &iValue)
FAACode_T(const std::string &iValue)
FeatureClass_T(const std::string &iValue)
FeatureCode_T(const std::string &iValue)
FeatureName_T(const std::string &iValue)
FilePath_T(const std::string &iValue)
IATACode_T(const std::string &iValue)
ICAOCode_T(const std::string &iValue)
LanguageCode_T(const std::string &iValue)
LocationName_T(const std::string &iValue)
PORFilePath_T(const std::string &iValue)
RawDataString_T(const std::string &iValue)
SQLDBConnectionString_T(const std::string &iValue)
SQLiteDBFilePath_T(const std::string &iValue)
StateCode_T(const std::string &iValue)
TCLIDCode_T(const std::string &iValue)
TimeZone_T(const std::string &iValue)
TravelDBFilePath_T(const std::string &iValue)
TvlPORListString_T(const std::string &iValue)
UNLOCode_T(const std::string &iValue)
WACName_T(const std::string &iValue)