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

EventQueueManager.hpp

Go to the documentation of this file.
00001 #ifndef __SEVMGR_CMD_EVENTQUEUEMANAGER_HPP
00002 #define __SEVMGR_CMD_EVENTQUEUEMANAGER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/stdair_basic_types.hpp>
00009 #include <stdair/command/CmdAbstract.hpp>
00010 #include <stdair/stdair_service_types.hpp>
00011 // SEvMgr
00012 #include <sevmgr/SEVMGR_Types.hpp>
00013 
00014 // Forward declarations
00015 namespace stdair {
00016   struct ProgressStatusSet;
00017 }
00018 
00019 namespace SEVMGR {
00020 
00021   // Forward declarations
00022   class EventQueue;
00023 
00027   class EventQueueManager : public stdair::CmdAbstract {
00028     friend class SEVMGR_Service;
00029     
00030   private:
00031     // //////// Business methodes //////////
00035     static void buildSampleQueue (stdair::STDAIR_ServicePtr_T,
00036                                   EventQueue&); 
00037 
00041     static stdair::BookingRequestStruct buildSampleBookingRequest(stdair::STDAIR_ServicePtr_T,
00042                                                                   const bool isForCRS = false);
00043     
00047     static void reset (EventQueue&);
00048 
00052     static void addEvent (EventQueue&, stdair::EventStruct&);
00053 
00057     static const std::string describeKey (const EventQueue&);   
00058 
00062     static const std::string list (const EventQueue&);   
00063 
00067     static const std::string list (const EventQueue&,
00068                                    const stdair::EventType::EN_EventType&);
00069 
00073     static stdair::ProgressStatusSet popEvent (EventQueue&,
00074                                                stdair::EventStruct&);
00075 
00079     static void run (EventQueue&, stdair::EventStruct&);
00080 
00097     static bool select (EventQueue&, stdair::EventStruct&, const stdair::DateTime_T&); 
00098     
00102     static void updateStatus (EventQueue&,
00103                               const stdair::EventType::EN_EventType&,
00104                               const stdair::Count_T&);
00109     static void addStatus (EventQueue&,
00110                            const stdair::EventType::EN_EventType&,
00111                            const stdair::Count_T&);
00112 
00117     static bool hasProgressStatus (const EventQueue&,
00118                                    const stdair::EventType::EN_EventType&);
00119 
00123     static bool isQueueDone (const EventQueue&);
00124 
00125 
00129     static const stdair::Count_T& getQueueSize(const EventQueue&); 
00130 
00134     static const stdair::Count_T& 
00135     getExpectedTotalNumberOfEventsToBeGenerated(const EventQueue&);
00136 
00140     static const stdair::Count_T&
00141     getExpectedTotalNumberOfEventsToBeGenerated(const EventQueue&,
00142                                                 const stdair::EventType::EN_EventType&); 
00143      
00147     static const stdair::Count_T&
00148     getActualTotalNumberOfEventsToBeGenerated(const EventQueue&);
00149 
00153     static const stdair::Count_T&
00154     getActualTotalNumberOfEventsToBeGenerated(const EventQueue&,
00155                                               const stdair::EventType::EN_EventType&);
00156 
00160     static const stdair::ProgressStatus& getStatus (const EventQueue&,
00161                                                     const stdair::EventType::EN_EventType&); 
00162     
00167     static const stdair::ProgressStatus& getStatus (const EventQueue&);
00168 
00169   };
00170 
00171 }
00172 #endif // __SEVMGR_CMD_EVENTQUEUEMANAGER_HPP