14 const std::string PassengerType::_labels[
LAST_VALUE] =
15 {
"Leisure",
"Business",
"First" };
17 const char PassengerType::_typeLabels[
LAST_VALUE] = {
'L',
'B',
'F' };
22 : _type (iPassengerType) {
28 case 'L': _type =
LEISURE;
break;
30 case 'F': _type =
FIRST;
break;
36 std::ostringstream oMessage;
37 oMessage <<
"The passenger type '" << iType
38 <<
"' is not known. Known passenger types: " << lLabels;
45 return _labels[iType];
50 return _typeLabels[iType];
56 std::ostringstream oStr;
57 oStr << _typeLabels[iType];
63 std::ostringstream ostr;
64 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
80 std::ostringstream oStr;
81 oStr << _typeLabels[_type];
87 std::ostringstream ostr;
88 ostr << _labels[_type];
94 return (_type == iType);
PassengerType(const EN_PassengerType &)
static char getTypeLabel(const EN_PassengerType &)
Handle on the StdAir library context.
static std::string getTypeLabelAsString(const EN_PassengerType &)
static const std::string & getLabel(const EN_PassengerType &)
const std::string describe() const
bool operator==(const EN_PassengerType &) const
EN_PassengerType getType() const
std::string getTypeAsString() const
static std::string describeLabels()