NCBI C++ ToolKit
|
Classes | |
class | C_DriverMgr |
class | CDllResolver_Getter< I_DriverContext > |
class | CSafeStatic_Allocator< T > |
Helper class for object allocation/deallocation. More... | |
class | CDriverManager |
Typedefs | |
typedef multimap< string, class IDataSource * > | CDriverManager::TDsContainer |
Variables | |
CMutex | CDriverManager::m_Mutex |
TDsContainer | CDriverManager::m_ds_list |
Friends | |
class | CDriverManager::CSafeStatic_Allocator< CDriverManager > |
|
protected |
Definition at line 113 of file driver_mgr.hpp.
Add path for the DLL lookup.
Definition at line 317 of file driver_mgr.cpp.
References s_DrvMgr.
Referenced by init_common().
C_DriverMgr::C_DriverMgr | ( | unsigned int | nof_drivers = 16 | ) |
Definition at line 299 of file driver_mgr.cpp.
|
protected |
Definition at line 68 of file driver_mgr.cpp.
IDataSource * CDriverManager::CreateDs | ( | const string & | driver_name, |
const map< string, string > * | attr = 0 , |
||
const string & | tag = kEmptyStr |
||
) |
Definition at line 100 of file driver_mgr.cpp.
References CHECK_NCBI_DBAPI, ctx, multimap_checker< Container >::end(), multimap_checker< Container >::find(), C_DriverMgr::GetDriverContextFromMap(), CDriverManager::m_ds_list, CDriverManager::m_Mutex, CDriverManager::RegisterDs(), and tag.
Referenced by CDriverManager::CreateDs(), CDriverManager::CreateDsFrom(), CDbapiTest::Run(), CDbCopyApp::Run(), s_GetDataSource(), and CDbapiSimpleApp::SetupDb().
|
inline |
Definition at line 85 of file driver_mgr.hpp.
References CDriverManager::CreateDs(), NULL, and tag.
IDataSource * CDriverManager::CreateDsFrom | ( | const string & | drivers, |
const IRegistry * | reg = 0 , |
||
const string & | tag = kEmptyStr |
||
) |
Definition at line 123 of file driver_mgr.cpp.
References ctx, entries, IRegistry::EnumerateEntries(), NStr::fSplit_Tokenize, IRegistry::Get(), C_DriverMgr::GetDriverContextFromMap(), CDriverManager::m_Mutex, names, NULL, CDriverManager::RegisterDs(), NStr::Split(), and tag.
|
inline |
Definition at line 92 of file driver_mgr.hpp.
References CDriverManager::CreateDs(), NULL, and tag.
void CDriverManager::DestroyDs | ( | const IDataSource * | ds | ) |
Definition at line 201 of file driver_mgr.cpp.
References multimap_checker< Container >::begin(), multimap_checker< Container >::end(), multimap_checker< Container >::erase(), CDriverManager::m_ds_list, and CDriverManager::m_Mutex.
Definition at line 190 of file driver_mgr.cpp.
References multimap_checker< Container >::end(), multimap_checker< Container >::erase(), multimap_checker< Container >::find(), CDriverManager::m_ds_list, and CDriverManager::m_Mutex.
Referenced by CDbapiSimpleApp::Exit().
I_DriverContext* Get_I_DriverContext | ( | const string & | driver_name, |
const map< string, string > * | attr = NULL |
||
) |
Definition at line 364 of file driver_mgr.cpp.
References _ASSERT, DATABASE_DRIVER_ERROR, CTreeNode< TValue, TKeyGetterP >::FindNode(), Get(), MakePluginManagerParamTree(), NCBI_INTERFACE_VERSION, and NULL.
CDllResolver::TExtraDllPath C_DriverMgr::GetDllStdSearchPath | ( | void | ) | const |
Get standard locations which should be used for the DLL lookup.
Definition at line 338 of file driver_mgr.cpp.
References s_DrvMgr.
I_DriverContext * C_DriverMgr::GetDriverContext | ( | const string & | driver_name, |
string * | err_msg = 0 , |
||
const map< string, string > * | attr = 0 |
||
) |
Definition at line 308 of file driver_mgr.cpp.
References s_DrvMgr.
Referenced by CDbapiSampleApp::GetDriverContext(), main(), MergeExternal(), CPubseqReader::x_ConnectAtSlot(), CPubseq2Reader::x_ConnectAtSlot(), and CId2FetchApp::x_InitPubSeqConnection().
I_DriverContext * C_DriverMgr::GetDriverContextFromMap | ( | const string & | driver_name, |
const map< string, string > * | attr = NULL |
||
) |
Definition at line 354 of file driver_mgr.cpp.
References s_DrvMgr.
Referenced by CDriverManager::CreateDs(), and CDriverManager::CreateDsFrom().
I_DriverContext * C_DriverMgr::GetDriverContextFromTree | ( | const string & | driver_name, |
const TPluginManagerParamTree *const | attr = NULL |
||
) |
Definition at line 345 of file driver_mgr.cpp.
References s_DrvMgr.
|
static |
Definition at line 54 of file driver_mgr.cpp.
References CSafeStaticLifeSpan::eLifeSpan_Long, and CSafeStatic< T, Callbacks >::Get().
Referenced by CDataSourceInitializer::CDataSourceInitializer(), CDbapiSimpleApp::Exit(), init_common(), CDbapiTest::Run(), CDbCopyApp::Run(), s_GetDataSource(), and CDbapiSimpleApp::SetupDb().
|
inline |
Definition at line 108 of file driver_mgr.hpp.
References CDbapiConnMgr::GetMaxConnect().
I_DriverContext* MakeDriverContext | ( | const CDBConnParams & | params | ) |
Definition at line 405 of file driver_mgr.cpp.
References _ASSERT, DATABASE_DRIVER_ERROR, Get(), CDBConnParams::GetDriverName(), MakePluginManagerParamTree(), NCBI_INTERFACE_VERSION, and NULL.
Referenced by CDriverManager::MakeDs().
IDataSource * CDriverManager::MakeDs | ( | const CDBConnParams & | params, |
const string & | tag = kEmptyStr |
||
) |
Definition at line 157 of file driver_mgr.cpp.
References CHECK_NCBI_DBAPI, ctx, multimap_checker< Container >::end(), multimap_checker< Container >::find(), CDBConnParams::GetDriverName(), CDriverManager::m_ds_list, CDriverManager::m_Mutex, MakeDriverContext(), CDriverManager::RegisterDs(), and tag.
Referenced by python::CConnection::CConnection(), and CDataSourceInitializer::CDataSourceInitializer().
CPluginManager_DllResolver * CDllResolver_Getter< I_DriverContext >::operator() | ( | void | ) |
Definition at line 127 of file driver_mgr.cpp.
References CDll::eNoAutoUnload, CVersionInfo::kAny, kEmptyStr, and CPluginManager_DllResolver::SetDllNamePrefix().
|
protected |
Definition at line 180 of file driver_mgr.cpp.
References ctx, multimap_checker< Container >::insert(), CDriverManager::m_ds_list, and CDriverManager::m_Mutex.
Referenced by CDriverManager::CreateDs(), CDriverManager::CreateDsFrom(), and CDriverManager::MakeDs().
|
static |
Definition at line 63 of file driver_mgr.cpp.
Delete all user-installed paths for the DLL lookup (for all resolvers)
previous_paths | If non-NULL, store the prevously set search paths in this container |
Definition at line 324 of file driver_mgr.cpp.
References s_DrvMgr.
CDllResolver::TExtraDllPath C_DriverMgr::SetDllStdSearchPath | ( | CDllResolver::TExtraDllPath | standard_paths | ) |
Specify which standard locations should be used for the DLL lookup (for all resolvers).
If standard locations are not set explicitelly using this method CDllResolver::fDefaultDllPath will be used by default.
Definition at line 331 of file driver_mgr.cpp.
References s_DrvMgr.
|
inline |
Definition at line 103 of file driver_mgr.hpp.
References CDbapiConnMgr::SetMaxConnect().
|
virtual |
Definition at line 304 of file driver_mgr.cpp.
|
protectedvirtual |
Definition at line 73 of file driver_mgr.cpp.
References multimap_checker< Container >::clear(), IDataSource::GetDriverContext(), ITERATE, kEmptyStr, CDriverManager::m_ds_list, CDriverManager::m_Mutex, NCBI_CATCH_ALL_X, and I_DriverContext::NofConnections().
|
protected |
Definition at line 125 of file driver_mgr.hpp.
Referenced by CDriverManager::CreateDs(), CDriverManager::DestroyDs(), CDriverManager::MakeDs(), CDriverManager::RegisterDs(), and CDriverManager::~CDriverManager().
|
mutableprotected |
Definition at line 124 of file driver_mgr.hpp.
Referenced by CDriverManager::CreateDs(), CDriverManager::CreateDsFrom(), CDriverManager::DestroyDs(), CDriverManager::MakeDs(), CDriverManager::RegisterDs(), and CDriverManager::~CDriverManager().
|
friend |
Definition at line 1 of file driver_mgr.hpp.