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

SEVMGR_ServiceContext.hpp

Go to the documentation of this file.
00001 #ifndef __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP
00002 #define __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // StdAir
00010 #include <stdair/stdair_basic_types.hpp>
00011 #include <stdair/stdair_service_types.hpp>
00012 #include <stdair/service/ServiceAbstract.hpp>
00013 // SEvMgr
00014 #include <sevmgr/SEVMGR_Types.hpp>
00015 
00017 namespace stdair {
00018   class FacBomManager;
00019   template <typename BOM> class FacBom;
00020 }
00021 
00022 namespace SEVMGR { 
00023 
00025   class EventQueue;
00026 
00030   class SEVMGR_ServiceContext : public stdair::ServiceAbstract {
00036     friend class SEVMGR_Service;
00037     friend class FacSEVMGRServiceContext;
00038     
00039   private:
00040     // ///////// Getters //////////
00044     stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00045       return _stdairService;
00046     }
00047 
00051     stdair::STDAIR_Service& getSTDAIR_Service() const {
00052       assert (_stdairService != NULL);
00053       return *_stdairService;
00054     }
00055 
00059     const bool getOwnStdairServiceFlag() const {
00060       return _ownStdairService;
00061     }   
00062 
00066     EventQueue& getEventQueue() const;
00067 
00068 
00069   private:
00070     // ///////// Setters //////////
00074     void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00075                             const bool iOwnStdairService) {
00076       _stdairService = ioSTDAIR_ServicePtr;
00077       _ownStdairService = iOwnStdairService;
00078     }
00079 
00080     
00081   private:
00082     // ///////// Display Methods //////////
00086     const std::string shortDisplay() const;
00087     
00091     const std::string display() const;
00092     
00096     const std::string describe() const;
00097 
00098     
00099   private:
00101 
00104     SEVMGR_ServiceContext();
00108     SEVMGR_ServiceContext (const SEVMGR_ServiceContext&);
00109 
00113     ~SEVMGR_ServiceContext();
00114 
00118     void reset();    
00119 
00127     void init();
00128    
00135     void initEventQueue();
00136 
00137     
00138   private:
00139     // /////////////// Children ///////////////
00143     stdair::STDAIR_ServicePtr_T _stdairService;
00144 
00148     bool _ownStdairService;
00149 
00150 
00151   private:
00152     // ////////////// Attributes ////////////////
00156     EventQueue* _eventQueue;
00157   };
00158 
00159 }
00160 #endif // __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP