SEvMgr Logo  0.2.0
C++ Simulation-Oriented Discrete Event Management Library
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 
00016 namespace SEVMGR {
00017 
00021   class SEVMGR_ServiceContext : public stdair::ServiceAbstract {
00027     friend class SEVMGR_Service;
00028     friend class FacSEVMGRServiceContext;
00029     
00030   private:
00031     // ///////// Getters //////////
00035     stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00036       return _stdairService;
00037     }
00038 
00042     stdair::STDAIR_Service& getSTDAIR_Service() const {
00043       assert (_stdairService != NULL);
00044       return *_stdairService;
00045     }
00046 
00050     const bool getOwnStdairServiceFlag() const {
00051       return _ownStdairService;
00052     }
00053 
00054 
00055   private:
00056     // ///////// Setters //////////
00060     void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00061                             const bool iOwnStdairService) {
00062       _stdairService = ioSTDAIR_ServicePtr;
00063       _ownStdairService = iOwnStdairService;
00064     }
00065 
00066     
00067   private:
00068     // ///////// Display Methods //////////
00072     const std::string shortDisplay() const;
00073     
00077     const std::string display() const;
00078     
00082     const std::string describe() const;
00083 
00084     
00085   private:
00087 
00090     SEVMGR_ServiceContext();
00091     SEVMGR_ServiceContext (const std::string& iServiceName);
00095     SEVMGR_ServiceContext (const SEVMGR_ServiceContext&);
00096 
00100     ~SEVMGR_ServiceContext();
00101 
00105     void reset();
00106 
00107     
00108   private:
00109     // /////////////// Children ///////////////
00113     stdair::STDAIR_ServicePtr_T _stdairService;
00114 
00118     bool _ownStdairService;
00119 
00120 
00121   private:
00122     // ////////////// Attributes ////////////////
00123     // No attributes for now
00124   };
00125 
00126 }
00127 #endif // __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines