$treeview $search $mathjax
00001 #ifndef __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP 00002 #define __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <string> 00009 // StdAir 00010 #include <stdair/stdair_basic_types.hpp> 00011 #include <stdair/basic/BasLogParams.hpp> 00012 #include <stdair/basic/BasDBParams.hpp> 00013 #include <stdair/bom/ConfigHolderStruct.hpp> 00014 #include <stdair/basic/ServiceInitialisationType.hpp> 00015 #include <stdair/service/ServiceAbstract.hpp> 00016 00017 namespace stdair { 00018 00020 class BomRoot; 00021 00025 class STDAIR_ServiceContext : public ServiceAbstract { 00029 friend class STDAIR_Service; 00030 friend class FacSTDAIRServiceContext; 00031 00032 private: 00033 // ///////// Getters ////////// 00037 BomRoot& getPersistentBomRoot() const; 00038 00042 BomRoot& getCloneBomRoot() const; 00043 00047 ConfigHolderStruct& getConfigHolder() const; 00048 00052 const BasDBParams& getDBParams() const { 00053 return _dbParams; 00054 } 00055 00059 const ServiceInitialisationType& getServiceInitialisationType() const { 00060 return _initType; 00061 } 00062 00063 00064 private: 00065 // ///////// Setters ////////// 00069 void setDBParams (const BasDBParams& iDBParams) { 00070 _dbParams = iDBParams; 00071 } 00072 00076 void setServiceInitialisationType (const ServiceInitialisationType& iSIT) { 00077 _initType = iSIT; 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: 00100 // /////// Construction / initialisation //////// 00104 STDAIR_ServiceContext(); 00105 00112 STDAIR_ServiceContext (const STDAIR_ServiceContext&); 00113 00117 ~STDAIR_ServiceContext(); 00118 00126 void init(); 00127 00134 void initBomRoot(); 00135 00142 void initCloneBomRoot(); 00143 00149 void initConfigHolder(); 00150 00151 private: 00152 // ///////////// Children //////////// 00156 BomRoot* _cloneBomRoot; 00157 00161 BomRoot* _persistentBomRoot; 00162 00166 ConfigHolderPtr_T _configHolderPtr; 00167 00171 BasDBParams _dbParams; 00172 00186 ServiceInitialisationType _initType; 00187 }; 00188 00189 } 00190 #endif // __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP