14 const std::string EventType::_labels[
LAST_VALUE] =
15 {
"BookingRequest",
"Cancellation",
"OptimisationNotificationForFlightDate",
16 "OptimisationNotificationForNetwork",
"ScheduleChange",
"Snapshot",
17 "RevenueManagement",
"BreakPoint" };
20 const char EventType::
21 _typeLabels[
LAST_VALUE] = {
'B',
'X',
'F',
'N',
'C',
'S',
'R',
'P' };
25 EventType::EventType()
32 : _type (iEventType._type) {
37 : _type (iEventType) {
41 EventType::EventType (
const char iType) {
43 case 'B': _type =
BKG_REQ;
break;
44 case 'X': _type =
CX;
break;
47 case 'C': _type =
SKD_CHG;
break;
49 case 'R': _type =
RM;
break;
50 case 'P': _type =
BRK_PT;
break;
56 std::ostringstream oMessage;
57 oMessage <<
"The event type '" << iType
58 <<
"' is not known. Known event types: " << lLabels;
64 EventType::EventType (
const std::string& iTypeStr) {
65 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
66 if (iTypeStr.compare(_labels[idx]) == 0) {
75 std::ostringstream oMessage;
76 oMessage <<
"The event type '" << iTypeStr
77 <<
"' is not known. Known event types: " << lLabels;
84 return _labels[iType];
89 return _typeLabels[iType];
94 std::ostringstream oStr;
95 oStr << _typeLabels[iType];
101 std::ostringstream ostr;
102 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
106 ostr << _labels[idx];
118 std::ostringstream oStr;
119 oStr << _typeLabels[_type];
125 std::ostringstream ostr;
126 ostr << _labels[_type];
132 return (_type == iType);
EN_EventType getType() const
static char getTypeLabel(const EN_EventType &)
Handle on the StdAir library context.
static const std::string & getLabel(const EN_EventType &)
static std::string describeLabels()
static std::string getTypeLabelAsString(const EN_EventType &)
std::string getTypeAsString() const
bool operator==(const EN_EventType &) const
const std::string describe() const