OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::IATAType Struct Reference

Enumeration of place/location types with respect to their use for transportation purposes. More...

#include <opentrep/IATAType.hpp>

Public Types

enum  EN_IATAType {
  CTY_AIRP = 0 , CTY_HPT , CTY_RSTN , CTY_BSTN ,
  CTY_FERRY , CITY , AIRP , HPT ,
  RSTN , BSTN , FERRY , OFF ,
  LAST_VALUE
}
 

Public Member Functions

EN_IATAType getType () const
 
char getTypeAsChar () const
 
std::string getTypeAsString () const
 
treppb::PlaceType getTypeAsPB () const
 
const std::string describe () const
 
bool operator== (const EN_IATAType &) const
 
bool operator== (const IATAType &) const
 
 IATAType (const EN_IATAType &)
 
 IATAType (const char iType)
 
 IATAType (const std::string &iType)
 
 IATAType (const IATAType &)
 

Static Public Member Functions

static const std::string & getLabel (const EN_IATAType &)
 
static EN_IATAType getType (const char)
 
static char getTypeLabel (const EN_IATAType &)
 
static std::string getTypeLabelAsString (const EN_IATAType &)
 
static treppb::PlaceType getTypeLabelAsPB (const EN_IATAType &)
 
static std::string describeLabels ()
 

Detailed Description

Enumeration of place/location types with respect to their use for transportation purposes.

IATA is the International Air Transport Association. The types are:

  • Combined city and airport, abbreviated CA
  • Combined city and airport, abbreviated CH
  • Combined city and railway station, abbreviated CR
  • Combined city and bus station, abbreviated CB
  • Combined city and ferry port, abbreviated CP
  • City, abbreviated C. For that type, there is no specific associated transport type
  • Airport, airfield or aerodrome, abbreviated A
  • Heliport, abbreviated H
  • Railway station, abbreviated R
  • Bus station, abbreviated B
  • Ferry/maritime port, abbreviated P
  • Off-line point, abbreviated O. It usually means that there is no specific transportation service.

Definition at line 42 of file IATAType.hpp.

Member Enumeration Documentation

◆ EN_IATAType

Enumerator
CTY_AIRP 
CTY_HPT 
CTY_RSTN 
CTY_BSTN 
CTY_FERRY 
CITY 
AIRP 
HPT 
RSTN 
BSTN 
FERRY 
OFF 
LAST_VALUE 

Definition at line 44 of file IATAType.hpp.

Constructor & Destructor Documentation

◆ IATAType() [1/4]

OPENTREP::IATAType::IATAType ( const EN_IATAType & iIATAType)

Main constructor.

Definition at line 34 of file IATAType.cpp.

References IATAType().

Referenced by IATAType(), IATAType(), IATAType(), IATAType(), and operator==().

◆ IATAType() [2/4]

OPENTREP::IATAType::IATAType ( const char iType)

Alternative constructor.

Definition at line 69 of file IATAType.cpp.

References getType(), and IATAType().

◆ IATAType() [3/4]

OPENTREP::IATAType::IATAType ( const std::string & iType)

Alternative constructor.

Definition at line 74 of file IATAType.cpp.

References AIRP, BSTN, CITY, CTY_AIRP, CTY_BSTN, CTY_FERRY, CTY_HPT, CTY_RSTN, describeLabels(), FERRY, HPT, IATAType(), LAST_VALUE, OFF, and RSTN.

◆ IATAType() [4/4]

OPENTREP::IATAType::IATAType ( const IATAType & iIATAType)

Default copy constructor.

Definition at line 29 of file IATAType.cpp.

References IATAType().

Member Function Documentation

◆ getLabel()

const std::string & OPENTREP::IATAType::getLabel ( const EN_IATAType & iType)
static

Get the label as a string (e.g., "CTY_AIRP", "CITY", "OFF").

Definition at line 113 of file IATAType.cpp.

◆ getType() [1/2]

IATAType::EN_IATAType OPENTREP::IATAType::getType ( const char iTypeChar)
static

Get the type value from parsing a single character (e.g., 'a', 'C', 'O')

Definition at line 39 of file IATAType.cpp.

References AIRP, BSTN, CITY, CTY_AIRP, CTY_BSTN, CTY_FERRY, CTY_HPT, CTY_RSTN, describeLabels(), FERRY, HPT, LAST_VALUE, OFF, and RSTN.

Referenced by IATAType().

◆ getTypeLabel()

char OPENTREP::IATAType::getTypeLabel ( const EN_IATAType & iType)
static

Get the label as a single character (e.g., 'a', 'C', 'O').

Definition at line 118 of file IATAType.cpp.

◆ getTypeLabelAsString()

std::string OPENTREP::IATAType::getTypeLabelAsString ( const EN_IATAType & iType)
static

Get the label as a string of a single char string (e.g., "a", "C", "O").

Definition at line 123 of file IATAType.cpp.

◆ getTypeLabelAsPB()

treppb::PlaceType OPENTREP::IATAType::getTypeLabelAsPB ( const EN_IATAType & iType)
static

Get the label as a Protobuf enum (e.g., treppb::CA, treppb::C).

Definition at line 130 of file IATAType.cpp.

References AIRP, BSTN, CITY, CTY_AIRP, CTY_BSTN, CTY_FERRY, CTY_HPT, CTY_RSTN, FERRY, HPT, OFF, and RSTN.

Referenced by getTypeAsPB().

◆ describeLabels()

std::string OPENTREP::IATAType::describeLabels ( )
static

List the labels.

Definition at line 151 of file IATAType.cpp.

References LAST_VALUE.

Referenced by getType(), and IATAType().

◆ getType() [2/2]

IATAType::EN_IATAType OPENTREP::IATAType::getType ( ) const

Get the enumerated value.

Definition at line 163 of file IATAType.cpp.

◆ getTypeAsChar()

char OPENTREP::IATAType::getTypeAsChar ( ) const

Get the enumerated value as a single character (e.g., 'a', 'C', 'O').

Definition at line 168 of file IATAType.cpp.

◆ getTypeAsString()

std::string OPENTREP::IATAType::getTypeAsString ( ) const

Get the enumerated value as a short string (e.g., "a", "C", "O").

Definition at line 174 of file IATAType.cpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getTypeAsPB()

treppb::PlaceType OPENTREP::IATAType::getTypeAsPB ( ) const

Get the enumerated value as a Protobuf enum (e.g., treppb::CA, treppb::C).

Definition at line 181 of file IATAType.cpp.

References getTypeLabelAsPB().

Referenced by OPENTREP::LocationExchange::exportLocation().

◆ describe()

const std::string OPENTREP::IATAType::describe ( ) const

Give a description of the structure (e.g., "CTY_AIRP", "CITY", "OFF").

Definition at line 186 of file IATAType.cpp.

◆ operator==() [1/2]

bool OPENTREP::IATAType::operator== ( const EN_IATAType & iType) const

Comparison operators.

Definition at line 193 of file IATAType.cpp.

◆ operator==() [2/2]

bool OPENTREP::IATAType::operator== ( const IATAType & iIATAType) const

Definition at line 198 of file IATAType.cpp.

References IATAType().


The documentation for this struct was generated from the following files: