StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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
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