OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::IATAType Struct Reference

Enumeration of output types. 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 output types.

Definition at line 22 of file IATAType.hpp.

Member Enumeration Documentation

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

Definition at line 24 of file IATAType.hpp.

Constructor & Destructor Documentation

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

Main constructor.

Definition at line 34 of file IATAType.cpp.

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

Alternative constructor.

Definition at line 69 of file IATAType.cpp.

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, LAST_VALUE, OFF, and RSTN.

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

Default copy constructor.

Definition at line 29 of file IATAType.cpp.

Member Function Documentation

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.

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

Get the type value from parsing a single char (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.

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

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

Definition at line 118 of file IATAType.cpp.

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

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

Definition at line 123 of file IATAType.cpp.

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().

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().

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

Get the enumerated value.

Definition at line 163 of file IATAType.cpp.

char OPENTREP::IATAType::getTypeAsChar ( ) const

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

Definition at line 168 of file IATAType.cpp.

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::LocationKey::describe(), and OPENTREP::DBManager::retrievePlace().

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().

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.

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

Comparison operators.

Definition at line 193 of file IATAType.cpp.

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

Definition at line 198 of file IATAType.cpp.


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