14 const std::string EventType::_labels[
LAST_VALUE] =
15 {
"BookingRequest",
"Cancellation",
"OptimisationNotificationForFlightDate",
16 "OptimisationNotificationForNetwork",
"ScheduleChange",
"Snapshot",
17 "RevenueMangement",
"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;
65 return _labels[iType];
70 return _typeLabels[iType];
75 std::ostringstream oStr;
76 oStr << _typeLabels[iType];
82 std::ostringstream ostr;
83 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
99 std::ostringstream oStr;
100 oStr << _typeLabels[_type];
106 std::ostringstream ostr;
107 ostr << _labels[_type];
113 return (_type == iType);