7 #if BOOST_VERSION >= 103900
8 #include <boost/make_shared.hpp>
9 #else // BOOST_VERSION >= 103900
10 #include <boost/shared_ptr.hpp>
11 #endif // BOOST_VERSION >= 103900
26 : _eventType (
EventType::BKG_REQ), _eventTimeStamp (0) {
32 : _eventType (iEventType) {
35 assert (ioRequestPtr != NULL);
36 #if BOOST_VERSION >= 103900
37 _bookingRequest = boost::make_shared<BookingRequestStruct> (*ioRequestPtr);
38 #else // BOOST_VERSION >= 103900
39 _bookingRequest = ioRequestPtr;
40 #endif // BOOST_VERSION >= 103900
41 assert (_bookingRequest != NULL);
50 _eventTimeStamp = lDuration.total_milliseconds();
56 : _eventType (iEventType) {
59 assert (ioCancellationPtr != NULL);
60 #if BOOST_VERSION >= 103900
61 _cancellation = boost::make_shared<CancellationStruct> (*ioCancellationPtr);
62 #else // BOOST_VERSION >= 103900
63 _cancellation = ioCancellationPtr;
64 #endif // BOOST_VERSION >= 103900
65 assert (_cancellation != NULL);
74 _eventTimeStamp = lDuration.total_milliseconds();
82 : _eventType (iEventType) {
85 assert (ioOptimisationNotificationPtr != NULL);
86 #if BOOST_VERSION >= 103900
87 _optimisationNotification =
88 boost::make_shared<OptimisationNotificationStruct> (*ioOptimisationNotificationPtr);
89 #else // BOOST_VERSION >= 103900
90 _optimisationNotification = ioOptimisationNotificationPtr;
91 #endif // BOOST_VERSION >= 103900
92 assert (_optimisationNotification != NULL);
100 _eventTimeStamp = lDuration.total_milliseconds();
106 : _eventType (iEventType) {
109 assert (ioSnapshotPtr != NULL);
111 #if BOOST_VERSION >= 103900
112 _snapshot = boost::make_shared<SnapshotStruct> (*ioSnapshotPtr);
113 #else // BOOST_VERSION >= 103900
114 _snapshot = ioSnapshotPtr;
115 #endif // BOOST_VERSION >= 103900
116 assert (_snapshot != NULL);
125 _eventTimeStamp = lDuration.total_milliseconds();
131 : _eventType (iEventType) {
134 assert (ioRMEventPtr != NULL);
136 #if BOOST_VERSION >= 103900
137 _rmEvent = boost::make_shared<RMEventStruct> (*ioRMEventPtr);
138 #else // BOOST_VERSION >= 103900
139 _rmEvent = ioRMEventPtr;
140 #endif // BOOST_VERSION >= 103900
141 assert (_rmEvent != NULL);
150 _eventTimeStamp = lDuration.total_milliseconds();
155 : _eventType (iEventStruct._eventType),
156 _eventTimeStamp (iEventStruct._eventTimeStamp) {
159 if (iEventStruct._bookingRequest != NULL) {
160 #if BOOST_VERSION >= 103900
162 boost::make_shared<BookingRequestStruct>(*iEventStruct._bookingRequest);
163 #else // BOOST_VERSION >= 103900
164 _bookingRequest = iEventStruct._bookingRequest;
165 #endif // BOOST_VERSION >= 103900
169 if (iEventStruct._cancellation != NULL) {
170 #if BOOST_VERSION >= 103900
172 boost::make_shared<CancellationStruct>(*iEventStruct._cancellation);
173 #else // BOOST_VERSION >= 103900
174 _cancellation = iEventStruct._cancellation;
175 #endif // BOOST_VERSION >= 103900
179 if (iEventStruct._optimisationNotification != NULL) {
180 #if BOOST_VERSION >= 103900
181 _optimisationNotification =
182 boost::make_shared<OptimisationNotificationStruct> (*iEventStruct._optimisationNotification);
183 #else // BOOST_VERSION >= 103900
184 _optimisationNotification = iEventStruct._optimisationNotification;
185 #endif // BOOST_VERSION >= 103900
189 if (iEventStruct._snapshot != NULL) {
190 #if BOOST_VERSION >= 103900
191 _snapshot = boost::make_shared<SnapshotStruct> (*iEventStruct._snapshot);
192 #else // BOOST_VERSION >= 103900
193 _snapshot = iEventStruct._snapshot;
194 #endif // BOOST_VERSION >= 103900
198 if (iEventStruct._rmEvent != NULL) {
199 #if BOOST_VERSION >= 103900
200 _rmEvent = boost::make_shared<RMEventStruct> (*iEventStruct._rmEvent);
201 #else // BOOST_VERSION >= 103900
202 _rmEvent = iEventStruct._rmEvent;
203 #endif // BOOST_VERSION >= 103900
217 std::ostringstream oStr;
221 boost::posix_time::milliseconds (_eventTimeStamp);
223 + lEventDateTimeDelta);
224 oStr << lEventDateTime;
227 switch (_eventType) {
229 assert (_bookingRequest != NULL);
230 oStr <<
", " << _eventType <<
", " << _bookingRequest->describe();
234 assert (_cancellation != NULL);
235 oStr <<
", " << _eventType <<
", " << _cancellation->describe();
239 assert (_optimisationNotification != NULL);
240 oStr <<
", " << _eventType
241 <<
", " << _optimisationNotification->describe();
245 assert (_snapshot != NULL);
246 oStr <<
", " << _eventType
247 <<
", " << _snapshot->describe();
251 assert (_rmEvent != NULL);
252 oStr <<
", " << _eventType
253 <<
", " << _rmEvent->describe();
257 oStr <<
", " << _eventType <<
" (not yet recognised)";