StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
22 
23 namespace stdair {
24 
35  struct EventStruct : public StructAbstract {
36  // Friend classes and structures
37  friend struct EventQueue;
38 
39  // ///////////// Getters ///////////
40  public:
43  return _eventType;
44  }
45 
53  assert (_bookingRequest != NULL);
54  return *_bookingRequest;
55  }
56 
64  assert (_cancellation != NULL);
65  return *_cancellation;
66  }
67 
77  assert (_optimisationNotification != NULL);
78  return *_optimisationNotification;
79  }
80 
89  assert (_snapshot != NULL);
90  return *_snapshot;
91  }
92 
100  const RMEventStruct& getRMEvent() const {
101  assert (_rmEvent != NULL);
102  return *_rmEvent;
103  }
104 
105  // ////////// Display methods //////////
106  public:
109  void fromStream (std::istream& ioIn);
110 
112  const std::string describe() const;
113 
114 
115  // ////////// Constructors and destructors /////////
116  public:
118  EventStruct();
124  EventStruct (const EventType::EN_EventType&, const DateTime_T& iDCPDate,
131  EventStruct (const EventStruct&);
132 
134  ~EventStruct();
135 
136 
137  // ////////////////// Attributes //////////////////
138  private:
142  EventType::EN_EventType _eventType;
143 
149  LongDuration_T _eventTimeStamp;
150 
154  BookingRequestPtr_T _bookingRequest;
155 
159  CancellationPtr_T _cancellation;
160 
164  OptimisationNotificationPtr_T _optimisationNotification;
165 
169  SnapshotPtr_T _snapshot;
170 
174  RMEventPtr_T _rmEvent;
175  };
176 
177 }
178 #endif // __STDAIR_BAS_EVENTSTRUCT_HPP