53 TCIter citer = attr->
begin();
54 TCIter cend = attr->
end();
56 for ( ; citer != cend; ++citer ) {
57 reg.
Set( driver_name, citer->first, citer->second );
76 param_value = params.
GetParam(
"reuse_context");
77 if (!param_value.empty()) {
84 param_value = params.
GetParam(
"packet");
85 if (!param_value.empty()) {
92 param_value = params.
GetParam(
"prog_name");
93 if (!param_value.empty()) {
100 param_value = params.
GetParam(
"host_name");
101 if (!param_value.empty()) {
165 const string& driver_name,
169 const string& driver_name,
199 #ifndef NCBI_COMPILER_COMPAQ
250 const string& driver_name,
267 catch (
const exception& e ) {
279 const string& driver_name,
282 unique_ptr<TPluginManagerParamTree> pt;
285 if ( attr !=
NULL ) {
312 return s_DrvMgr->GetDriverContext( driver_name, attr );
326 s_DrvMgr->ResetDllSearchPath( previous_paths );
333 return s_DrvMgr->SetDllStdSearchPath( standard_paths );
340 return s_DrvMgr->GetDllStdSearchPath();
346 const string& driver_name,
349 return s_DrvMgr->GetDriverContext( driver_name, attr );
355 const string& driver_name,
358 return s_DrvMgr->GetDriverContext( driver_name, attr );
375 unique_ptr<TPluginManagerParamTree> pt;
377 if ( attr !=
NULL ) {
384 drv = ReaderManager->CreateInstance(
393 catch (
const exception& e ) {
415 unique_ptr<TPluginManagerParamTree> pt;
420 drv = ReaderManager->CreateInstance(
429 catch (
const exception& e ) {
CPluginManagerException –.
static TPluginManager * Get(void)
Service class for DLLs resolution.
definition of a Culling tree
CDllResolver::TExtraDllPath SetDllStdSearchPath(CDllResolver::TExtraDllPath standard_paths)
Specify which standard locations should be used for the DLL lookup (for all resolvers).
I_DriverContext * GetDriverContext(const string &driver_name, const TPluginManagerParamTree *const attr=NULL)
CDllResolver::TExtraDllPath GetDllStdSearchPath(void) const
Get standard locations which should be used for the DLL lookup.
CPluginManager< I_DriverContext > TContextManager
void AddDllSearchPath(const string &path)
Add path for the DLL lookup.
CRef< TContextManager > m_ContextManager
CPluginManagerGetter< I_DriverContext > TContextManagerStore
virtual ~C_xDriverMgr(void)
void ResetDllSearchPath(vector< string > *previous_paths=NULL)
Delete all user-installed paths for the DLL lookup (for all resolvers)
vector< SDrivers > m_Drivers
const_iterator begin() const
const_iterator end() const
static CSafeStatic< C_xDriverMgr > s_DrvMgr
TPluginManagerParamTree * MakePluginManagerParamTree(const string &driver_name, const map< string, string > *attr)
void ResetDllSearchPath(vector< string > *previous_paths=NULL)
Delete all user-installed paths for the DLL lookup (for all resolvers)
I_DriverContext * Get_I_DriverContext(const string &driver_name, const map< string, string > *attr)
CDllResolver::TExtraDllPath SetDllStdSearchPath(CDllResolver::TExtraDllPath standard_paths)
Specify which standard locations should be used for the DLL lookup (for all resolvers).
I_DriverContext * GetDriverContextFromTree(const string &driver_name, const TPluginManagerParamTree *const attr=NULL)
I_DriverContext * GetDriverContext(const string &driver_name, string *err_msg=0, const map< string, string > *attr=0)
I_DriverContext * MakeDriverContext(const CDBConnParams ¶ms)
I_DriverContext * GetDriverContextFromMap(const string &driver_name, const map< string, string > *attr=NULL)
C_DriverMgr(unsigned int nof_drivers=16)
CDllResolver::TExtraDllPath GetDllStdSearchPath(void) const
Get standard locations which should be used for the DLL lookup.
void AddDllSearchPath(const string &path)
Add path for the DLL lookup.
#define DATABASE_DRIVER_ERROR(message, err_code)
virtual EEncoding GetEncoding(void) const =0
virtual Uint4 GetProtocolVersion(void) const =0
virtual string GetDriverName(void) const =0
virtual string GetParam(const string &key) const =0
Parameters, which are not listed above explicitly, should be retrieved via SetParam() method.
static TParamTree * ConvertRegToTree(const IRegistry ®, NStr::ECase use_case=NStr::eNocase)
Reconstruct param tree from the application registry.
virtual void SetDllNamePrefix(const string &prefix)
Set DLL file name prefix.
#define NCBI_INTERFACE_VERSION(iface)
Macro to construct CVersionInfo class using interface name (relies on CInterfaceVersion class)
CPluginManager_DllResolver * operator()(void)
bool Set(const string §ion, const string &name, const string &value, TFlags flags=0, const string &comment=kEmptyStr)
Set the configuration parameter value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
const TTreeType * FindNode(const TKeyType &key, TNodeSearchMode sflag=eImmediateAndTop) const
Search for node.
const TYPE & Get(const CNamedParameterList *param)
Static variables safety - create on demand, destroy on application termination.
Define class Dll and for Portable DLL handling.
Process information in the NCBI Registry, including working with configuration files.
Plugin manager (using class factory paradigm).
Helper classes and templates to implement plugins.
Node data template for id-value trees.
FDBAPI_CreateContext drv_func
I_DriverContext *(* FDBAPI_CreateContext)(const map< string, string > *attr)
SDrivers(const string &name, FDBAPI_CreateContext func)