StdAir Logo  1.00.3
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
boost::shared_ptr< SnapshotStruct > SnapshotPtr_T
boost::posix_time::ptime DateTime_T
boost::shared_ptr< BookingRequestStruct > BookingRequestPtr_T
Handle on the StdAir library context.
const LongDuration_T & getEventTimeStamp() const
Definition: EventStruct.hpp:46
const EventType::EN_EventType & getEventType() const
Definition: EventStruct.hpp:41
void incrementEventTimeStamp()
boost::shared_ptr< BreakPointStruct > BreakPointPtr_T
boost::shared_ptr< CancellationStruct > CancellationPtr_T
const SnapshotStruct & getSnapshotStruct() const
Definition: EventStruct.hpp:95
const OptimisationNotificationStruct & getOptimisationNotificationStruct() const
Definition: EventStruct.hpp:83
Base class for the light structures.
const CancellationStruct & getCancellation() const
Definition: EventStruct.hpp:70
const BookingRequestStruct & getBookingRequest() const
Definition: EventStruct.hpp:59
void fromStream(std::istream &ioIn)
boost::shared_ptr< RMEventStruct > RMEventPtr_T
const std::string describe() const
const BreakPointStruct & getBreakPoint() const
const DateTime_T & getEventTime() const
long long int LongDuration_T
const RMEventStruct & getRMEvent() const
Structure holding the elements of a booking request.
boost::shared_ptr< OptimisationNotificationStruct > OptimisationNotificationPtr_T
Structure holding the elements of a travel solution.