StdAir Logo  1.00.10
C++ Standard Airline IT Object Library
EventStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BAS_EVENTSTRUCT_HPP
2 #define __STDAIR_BAS_EVENTSTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
23 
24 namespace stdair {
25 
36  struct EventStruct : public StructAbstract {
37 
38  // ///////////// Getters ///////////
39  public:
42  return _eventType;
43  }
44 
47  return _eventTimeStamp;
48  }
49 
51  const DateTime_T& getEventTime () const;
52 
60  assert (_bookingRequest != NULL);
61  return *_bookingRequest;
62  }
63 
71  assert (_cancellation != NULL);
72  return *_cancellation;
73  }
74 
84  assert (_optimisationNotification != NULL);
85  return *_optimisationNotification;
86  }
87 
96  assert (_snapshot != NULL);
97  return *_snapshot;
98  }
99 
107  const RMEventStruct& getRMEvent() const {
108  assert (_rmEvent != NULL);
109  return *_rmEvent;
110  }
111 
119  assert (_breakPoint != NULL);
120  return *_breakPoint;
121  }
122 
123  // ////////// Display methods //////////
124  public:
127  void fromStream (std::istream& ioIn);
128 
130  const std::string describe() const;
131 
132 
133  // ////////// Constructors and destructors /////////
134  public:
136  EventStruct();
142  EventStruct (const EventType::EN_EventType&, const DateTime_T& iDCPDate,
151  EventStruct (const EventStruct&);
152 
154  ~EventStruct();
155 
156  // ////////// Modifiers /////////
157  public:
167 
168  // ////////////////// Attributes //////////////////
169  private:
173  EventType::EN_EventType _eventType;
174 
180  LongDuration_T _eventTimeStamp;
181 
185  BookingRequestPtr_T _bookingRequest;
186 
190  CancellationPtr_T _cancellation;
191 
195  OptimisationNotificationPtr_T _optimisationNotification;
196 
200  SnapshotPtr_T _snapshot;
201 
205  RMEventPtr_T _rmEvent;
206 
210  BreakPointPtr_T _breakPoint;
211  };
212 
213 }
214 #endif // __STDAIR_BAS_EVENTSTRUCT_HPP
stdair::LongDuration_T
long long int LongDuration_T
Definition: stdair_date_time_types.hpp:47
stdair::BookingRequestPtr_T
boost::shared_ptr< BookingRequestStruct > BookingRequestPtr_T
Definition: BookingRequestTypes.hpp:16
BreakPointTypes.hpp
stdair::CancellationPtr_T
boost::shared_ptr< CancellationStruct > CancellationPtr_T
Definition: CancellationTypes.hpp:14
stdair::EventStruct::fromStream
void fromStream(std::istream &ioIn)
Definition: EventStruct.cpp:247
stdair::EventStruct::getBookingRequest
const BookingRequestStruct & getBookingRequest() const
Definition: EventStruct.hpp:59
stdair::EventStruct::getSnapshotStruct
const SnapshotStruct & getSnapshotStruct() const
Definition: EventStruct.hpp:95
stdair::OptimisationNotificationStruct
Definition: OptimisationNotificationStruct.hpp:19
EventTypes.hpp
stdair::EventStruct
Definition: EventStruct.hpp:36
stdair::EventStruct::getOptimisationNotificationStruct
const OptimisationNotificationStruct & getOptimisationNotificationStruct() const
Definition: EventStruct.hpp:83
stdair_date_time_types.hpp
stdair::SnapshotPtr_T
boost::shared_ptr< SnapshotStruct > SnapshotPtr_T
Definition: SnapshotTypes.hpp:14
stdair::EventStruct::EventStruct
EventStruct()
Definition: EventStruct.cpp:26
stdair::BreakPointPtr_T
boost::shared_ptr< BreakPointStruct > BreakPointPtr_T
Definition: BreakPointTypes.hpp:16
stdair_event_types.hpp
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
stdair::DateTime_T
boost::posix_time::ptime DateTime_T
Definition: stdair_date_time_types.hpp:26
stdair::EventStruct::incrementEventTimeStamp
void incrementEventTimeStamp()
Definition: EventStruct.cpp:357
stdair::EventType::EN_EventType
EN_EventType
Definition: EventType.hpp:17
stdair::EventStruct::describe
const std::string describe() const
Definition: EventStruct.cpp:251
stdair::EventStruct::getBreakPoint
const BreakPointStruct & getBreakPoint() const
Definition: EventStruct.hpp:118
stdair::EventStruct::getEventType
const EventType::EN_EventType & getEventType() const
Definition: EventStruct.hpp:41
OptimisationNotificationTypes.hpp
CancellationTypes.hpp
stdair::EventStruct::getCancellation
const CancellationStruct & getCancellation() const
Definition: EventStruct.hpp:70
stdair::CancellationStruct
Structure holding the elements of a travel solution.
Definition: CancellationStruct.hpp:23
stdair::OptimisationNotificationPtr_T
boost::shared_ptr< OptimisationNotificationStruct > OptimisationNotificationPtr_T
Definition: OptimisationNotificationTypes.hpp:14
StructAbstract.hpp
SnapshotTypes.hpp
EventType.hpp
BookingRequestTypes.hpp
stdair::EventStruct::getEventTimeStamp
const LongDuration_T & getEventTimeStamp() const
Definition: EventStruct.hpp:46
stdair::EventStruct::getEventTime
const DateTime_T & getEventTime() const
Definition: EventStruct.cpp:311
stdair_basic_types.hpp
stdair::SnapshotStruct
Definition: SnapshotStruct.hpp:19
stdair::BookingRequestStruct
Structure holding the elements of a booking request.
Definition: BookingRequestStruct.hpp:21
RMEventTypes.hpp
stdair::BreakPointStruct
Definition: BreakPointStruct.hpp:18
stdair::EventStruct::getRMEvent
const RMEventStruct & getRMEvent() const
Definition: EventStruct.hpp:107
stdair::RMEventStruct
Definition: RMEventStruct.hpp:19
stdair::StructAbstract
Base class for the light structures.
Definition: StructAbstract.hpp:16
stdair::EventStruct::~EventStruct
~EventStruct()
Definition: EventStruct.cpp:243
stdair::RMEventPtr_T
boost::shared_ptr< RMEventStruct > RMEventPtr_T
Definition: RMEventTypes.hpp:16