$treeview $search $mathjax
AirInv Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

AIRINV_Master_ServiceContext.hpp

Go to the documentation of this file.
00001 #ifndef __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP
00002 #define __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // Boost
00010 #include <boost/shared_ptr.hpp>
00011 // StdAir
00012 #include <stdair/stdair_service_types.hpp>
00013 #include <stdair/bom/Inventory.hpp>
00014 #include <stdair/service/ServiceAbstract.hpp>
00015 // SEvMgr
00016 #include <sevmgr/SEVMGR_Types.hpp>
00017 // AirInv
00018 #include <airinv/AIRINV_Types.hpp>
00019 
00020 namespace AIRINV {
00021 
00023   class AIRINV_Service;
00024 
00028   class AIRINV_Master_ServiceContext : public stdair::ServiceAbstract {
00034     friend class AIRINV_Master_Service;
00035     friend class FacAirinvMasterServiceContext;
00036 
00037   private:
00038     // ///////////////// Getters ///////////////////
00042     stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00043       return _stdairService;
00044     }    
00045 
00049     SEVMGR::SEVMGR_ServicePtr_T getSEVMGR_ServicePtr() const {
00050       return _sevmgrService;
00051     }
00052 
00056     stdair::STDAIR_Service& getSTDAIR_Service() const {
00057       assert (_stdairService != NULL);
00058       return *_stdairService;
00059     }
00060 
00064     const bool getOwnStdairServiceFlag() const {
00065       return _ownStdairService;
00066     }    
00067 
00071     const bool getOwnSEVMGRServiceFlag() const {
00072       return _ownSEVMGRService;
00073     }
00074 
00079     AIRINV_Service& getAIRINV_Service() const {
00080       assert (_airinvService != NULL);
00081       return *_airinvService;
00082     }
00083 
00084     // ///////////////// Setters ///////////////////
00088     void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00089                             const bool iOwnStdairService) {
00090       _stdairService = ioSTDAIR_ServicePtr;
00091       _ownStdairService = iOwnStdairService;
00092     }  
00093 
00097     void setSEVMGR_Service (SEVMGR::SEVMGR_ServicePtr_T ioSEVMGR_ServicePtr,
00098                             const bool iOwnSEVMGRService) {
00099       _sevmgrService = ioSEVMGR_ServicePtr; 
00100       _ownSEVMGRService = iOwnSEVMGRService;
00101     }
00102 
00106     void setAIRINV_Service (AIRINV_ServicePtr_T ioAIRINV_ServicePtr) {
00107       _airinvService = ioAIRINV_ServicePtr;
00108     }
00109 
00110 
00111   private:
00112     // //////////////////// Display Methods /////////////////////
00116     const std::string shortDisplay() const;
00117 
00121     const std::string display() const;
00122 
00126     const std::string describe() const;
00127 
00128 
00129   private:
00131 
00134     AIRINV_Master_ServiceContext();
00138     AIRINV_Master_ServiceContext (const AIRINV_Master_ServiceContext&);
00139 
00143     ~AIRINV_Master_ServiceContext();
00144 
00148     void reset();
00149 
00150 
00151   private:
00152     // /////////////// Children ///////////////
00156     stdair::STDAIR_ServicePtr_T _stdairService;
00157 
00161     bool _ownStdairService;  
00162 
00166     SEVMGR::SEVMGR_ServicePtr_T _sevmgrService; 
00167 
00171     bool _ownSEVMGRService;  
00172 
00173 
00174   private:
00175     // //////////// Attributes //////////////////
00179     AIRINV_ServicePtr_T _airinvService;
00180   };
00181 
00182 }
00183 #endif // __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP