$treeview $search $mathjax
StdAir Logo  1.00.2
$projectbrief
$projectbrief
$searchbox

stdair/bom/EventStruct.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BAS_EVENTSTRUCT_HPP
00002 #define __STDAIR_BAS_EVENTSTRUCT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 #include <string>
00010 // StdAir
00011 #include <stdair/stdair_basic_types.hpp>
00012 #include <stdair/stdair_date_time_types.hpp>
00013 #include <stdair/stdair_event_types.hpp>
00014 #include <stdair/basic/StructAbstract.hpp>
00015 #include <stdair/basic/EventType.hpp>
00016 #include <stdair/bom/EventTypes.hpp>
00017 #include <stdair/bom/BookingRequestTypes.hpp>
00018 #include <stdair/bom/OptimisationNotificationTypes.hpp>
00019 #include <stdair/bom/SnapshotTypes.hpp>
00020 #include <stdair/bom/CancellationTypes.hpp>
00021 #include <stdair/bom/RMEventTypes.hpp>
00022 #include <stdair/bom/BreakPointTypes.hpp>
00023 
00024 namespace stdair {
00025 
00036   struct EventStruct : public StructAbstract {
00037 
00038     // ///////////// Getters ///////////
00039   public:
00041     const EventType::EN_EventType& getEventType() const {
00042       return _eventType;
00043     }  
00044 
00046     const LongDuration_T& getEventTimeStamp() const {
00047       return _eventTimeStamp;
00048     }  
00049 
00051     const DateTime_T& getEventTime () const;
00052 
00059     const BookingRequestStruct& getBookingRequest() const {
00060       assert (_bookingRequest != NULL);
00061       return *_bookingRequest;
00062     }
00063 
00070     const CancellationStruct& getCancellation() const {
00071       assert (_cancellation != NULL);
00072       return *_cancellation;
00073     }
00074 
00082     const OptimisationNotificationStruct&
00083     getOptimisationNotificationStruct() const {
00084       assert (_optimisationNotification != NULL);
00085       return *_optimisationNotification;
00086     }
00087     
00095     const SnapshotStruct& getSnapshotStruct() const {
00096       assert (_snapshot != NULL);
00097       return *_snapshot;
00098     }
00099     
00107     const RMEventStruct& getRMEvent() const {
00108       assert (_rmEvent != NULL);
00109       return *_rmEvent;
00110     }   
00111 
00118     const BreakPointStruct& getBreakPoint() const {
00119       assert (_breakPoint != NULL);
00120       return *_breakPoint;
00121     }
00122 
00123     // ////////// Display methods //////////
00124   public:
00127     void fromStream (std::istream& ioIn);
00128 
00130     const std::string describe() const;
00131 
00132     
00133     // ////////// Constructors and destructors /////////
00134   public:
00136     EventStruct();
00138     EventStruct (const EventType::EN_EventType&, BookingRequestPtr_T);
00140     EventStruct (const EventType::EN_EventType&, CancellationPtr_T);
00142     EventStruct (const EventType::EN_EventType&, const DateTime_T& iDCPDate,
00143                  OptimisationNotificationPtr_T);
00145     EventStruct (const EventType::EN_EventType&, SnapshotPtr_T);
00147     EventStruct (const EventType::EN_EventType&, RMEventPtr_T);   
00149     EventStruct (const EventType::EN_EventType&, BreakPointPtr_T);
00151     EventStruct (const EventStruct&);
00152 
00154     ~EventStruct();    
00155 
00156     // ////////// Modifiers /////////
00157   public:
00166     void incrementEventTimeStamp();
00167     
00168     // ////////////////// Attributes //////////////////
00169   private:
00173     EventType::EN_EventType _eventType;
00174 
00180     LongDuration_T _eventTimeStamp;
00181     
00185     BookingRequestPtr_T _bookingRequest;
00186     
00190     CancellationPtr_T _cancellation;
00191 
00195     OptimisationNotificationPtr_T _optimisationNotification;
00196 
00200     SnapshotPtr_T _snapshot;
00201 
00205     RMEventPtr_T _rmEvent; 
00206 
00210     BreakPointPtr_T _breakPoint;
00211   };
00212 
00213 }
00214 #endif // __STDAIR_BAS_EVENTSTRUCT_HPP