![]() |
|
|
Generated: 24 Nov 2008 |
00001 // $Id: PoolDbCacheSvc.h,v 1.10 2008/01/30 13:49:09 marcocle Exp $ 00002 //==================================================================== 00003 // PoolCacheMgr.h 00004 //-------------------------------------------------------------------- 00005 // 00006 // Author : M.Frank 00007 //==================================================================== 00008 // $Header: /local/reps/Gaudi/GaudiPoolDb/GaudiPoolDb/PoolDbCacheSvc.h,v 1.10 2008/01/30 13:49:09 marcocle Exp $ 00009 #ifndef POOLDB_POOLDBCACHESVC_H 00010 #define POOLDB_POOLDBCACHESVC_H 00011 00012 // Framework include files 00013 #include "StorageSvc/DbOptionCallback.h" 00014 #include "StorageSvc/DbSession.h" 00015 #include "GaudiPoolDb/IPoolCacheSvc.h" 00016 #include "GaudiKernel/Service.h" 00017 #include "GaudiKernel/System.h" 00018 00019 // STL include files 00020 #include <vector> 00021 00032 class PoolDbCacheSvc : public Service, 00033 public pool::DbOptionCallback, 00034 virtual public IPoolCacheSvc 00035 { 00036 00037 protected: 00039 pool::DbSession m_session; 00040 00042 pool::DbOptionCallback* m_callbackHandler; 00043 00045 std::vector<std::string> m_dlls; 00046 00048 std::vector<std::string> m_domainOpts; 00049 00051 std::vector<std::string> m_databaseOpts; 00052 00054 std::vector<std::string> m_databaseOpenOpts; 00055 00057 std::vector<std::string> m_containerOpts; 00058 00060 std::vector<std::string> m_containerOpenOpts; 00061 00063 std::vector<System::ImageHandle> m_sharedHdls; 00064 00065 protected: 00066 00068 StatusCode loadLibraries(); 00069 00070 public: 00072 PoolDbCacheSvc(const std::string& name, ISvcLocator* svc); 00073 00075 virtual ~PoolDbCacheSvc(); 00076 00078 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); 00079 00081 virtual StatusCode initialize(); 00082 00084 virtual StatusCode finalize(); 00085 00089 virtual pool::DbSession& session() { 00090 return m_session; 00091 } 00092 00094 00098 virtual StatusCode loadDictionary(const std::string& name); 00099 00103 virtual pool::DbOptionCallback* callbackHandler() const { 00104 return m_callbackHandler; 00105 } 00106 00108 00114 virtual pool::DbStatus setMyOptions(pool::IDbOptionProxy* pObj, 00115 pool::DbOptionCallback::OptionType typ, 00116 const std::string& name); 00117 00119 00124 virtual pool::DbStatus setCallbackOptions(pool::IDbOptionProxy* pObj, 00125 const std::vector<std::string>& v, 00126 const std::string& name); 00127 }; 00128 00129 #endif // POOLDB_POOLDBCACHESVC_H