NCBI C++ ToolKit
|
Classes | |
class | CPluginManagerException |
CPluginManagerException –. More... | |
class | CInterfaceVersion< TClass > |
CInterfaceVersion<> –. More... | |
class | CDefaultDriverVersion< TInterface > |
struct | SDriverInfo |
class | IClassFactory< TClass > |
IClassFactory<> –. More... | |
struct | CPluginManagerBase |
class | CDllResolver_Getter< TClass > |
Template function to create dll resolver for interface. More... | |
class | CPluginManager< TClass > |
CPluginManager<> –. More... | |
struct | CPluginManager< TClass >::SDriverInfo |
Information about a driver, with maybe a pointer to an instantiated class factory that contains the driver. More... | |
class | CPluginManager_DllResolver |
Service class for DLLs resolution. More... | |
class | CInvalidDrvVer< TClass > |
class | CSimpleClassFactoryImpl< IFace, TDriver > |
Template class helps to implement one driver class factory. More... | |
struct | CHostEntryPointImpl< TClassFactory > |
Template implements entry point. More... | |
Macros | |
#define | NCBI_DECLARE_INTERFACE_VERSION(iface, iface_name, major, minor, patch_level) |
Macro to auto-setup the current interface name and version. More... | |
#define | NCBI_INTERFACE_VERSION(iface) |
Macro to construct CVersionInfo class using interface name (relies on CInterfaceVersion class) More... | |
Enumerations | |
enum | CPluginManagerException::EErrCode { CPluginManagerException::eResolveFailure , CPluginManagerException::eParameterMissing , CPluginManagerException::eNullInstance } |
enum | { CDefaultDriverVersion< TInterface >::eMajor = ncbi::CInterfaceVersion<TInterface>::eMajor , CDefaultDriverVersion< TInterface >::eMinor = ncbi::CInterfaceVersion<TInterface>::eMinor , CDefaultDriverVersion< TInterface >::ePatchLevel = ncbi::CInterfaceVersion<TInterface>::ePatchLevel } |
enum | CPluginManager< TClass >::EEntryPointRequest { CPluginManager< TClass >::eGetFactoryInfo , CPluginManager< TClass >::eInstantiateFactory } |
Actions performed by the entry point. More... | |
enum | CPluginManager_DllResolver::EVersionLocation { CPluginManager_DllResolver::eBeforeSuffix , CPluginManager_DllResolver::eAfterSuffix } |
#define NCBI_DECLARE_INTERFACE_VERSION | ( | iface, | |
iface_name, | |||
major, | |||
minor, | |||
patch_level | |||
) |
Macro to auto-setup the current interface name and version.
This macro must be "called" once per interface, usually in the very header that describes that interface.
Example: NCBI_INTERFACE_VERSION(IFooBar, "IFooBar", 1, 3, 8);
Definition at line 134 of file plugin_manager.hpp.
#define NCBI_INTERFACE_VERSION | ( | iface | ) |
Macro to construct CVersionInfo class using interface name (relies on CInterfaceVersion class)
Definition at line 150 of file plugin_manager.hpp.
typedef CPluginManager<TInterface>::EEntryPointRequest CHostEntryPointImpl< TClassFactory >::EEntryPointRequest |
Definition at line 222 of file plugin_manager_impl.hpp.
typedef void(* CPluginManager< TClass >::FNCBI_EntryPoint) (TDriverInfoList &info_list, EEntryPointRequest method) |
Entry point to get drivers' info, and (if requested) their class factories.
This function is usually (but not necessarily) called by RegisterWithEntryPoint().
Usually, it's called twice – the first time to get the info about the drivers exported by the entry point, and then to instantiate selected factories.
Caller is responsible for the proper destruction (deallocation) of the instantiated factories.
Definition at line 437 of file plugin_manager.hpp.
typedef ncbi::SDriverInfo IClassFactory< TClass >::SDriverInfo |
Definition at line 196 of file plugin_manager.hpp.
typedef TClassFactory::SDriverInfo CHostEntryPointImpl< TClassFactory >::TCFDriverInfo |
Definition at line 223 of file plugin_manager_impl.hpp.
typedef IClassFactory<TClass> CPluginManager< TClass >::TClassFactory |
Definition at line 295 of file plugin_manager.hpp.
typedef CDefaultDriverVersion<TClass> IClassFactory< TClass >::TDefaultDriverVersion |
Definition at line 198 of file plugin_manager.hpp.
typedef CDefaultDriverVersion<TClass> CPluginManager< TClass >::TDefaultDriverVersion |
Definition at line 296 of file plugin_manager.hpp.
|
protected |
Definition at line 533 of file plugin_manager.hpp.
typedef TParent::SDriverInfo CSimpleClassFactoryImpl< IFace, TDriver >::TDriverInfo |
Definition at line 67 of file plugin_manager_impl.hpp.
typedef CPluginManager<TInterface>::SDriverInfo CHostEntryPointImpl< TClassFactory >::TDriverInfo |
Definition at line 217 of file plugin_manager_impl.hpp.
typedef list<SDriverInfo> CPluginManager< TClass >::TDriverInfoList |
List of driver information.
It is used to communicate using the entry points mechanism.
Definition at line 386 of file plugin_manager.hpp.
typedef CPluginManager<TInterface>::TDriverInfoList CHostEntryPointImpl< TClassFactory >::TDriverInfoList |
Definition at line 220 of file plugin_manager_impl.hpp.
typedef list<SDriverInfo> TDriverList |
Definition at line 182 of file plugin_manager.hpp.
typedef ncbi::TDriverList IClassFactory< TClass >::TDriverList |
Definition at line 197 of file plugin_manager.hpp.
typedef TParent::TDriverList CSimpleClassFactoryImpl< IFace, TDriver >::TDriverList |
Definition at line 68 of file plugin_manager_impl.hpp.
|
protected |
Definition at line 530 of file plugin_manager.hpp.
|
protected |
Definition at line 531 of file plugin_manager.hpp.
typedef TDriver CSimpleClassFactoryImpl< IFace, TDriver >::TImplementation |
Definition at line 64 of file plugin_manager_impl.hpp.
typedef TClass IClassFactory< TClass >::TInterface |
Definition at line 195 of file plugin_manager.hpp.
typedef IFace CSimpleClassFactoryImpl< IFace, TDriver >::TInterface |
Definition at line 65 of file plugin_manager_impl.hpp.
typedef TClassFactory::TInterface CHostEntryPointImpl< TClassFactory >::TInterface |
Definition at line 215 of file plugin_manager_impl.hpp.
typedef IClassFactory<IFace> CSimpleClassFactoryImpl< IFace, TDriver >::TParent |
Definition at line 66 of file plugin_manager_impl.hpp.
typedef CPluginManager<TInterface> CHostEntryPointImpl< TClassFactory >::TPluginManager |
Definition at line 216 of file plugin_manager_impl.hpp.
Definition at line 167 of file plugin_manager.hpp.
|
protected |
Definition at line 532 of file plugin_manager.hpp.
typedef vector<string> CPluginManager< TClass >::TSearchPaths |
Container for the DLL search paths.
Definition at line 300 of file plugin_manager.hpp.
typedef vector<string> CPluginManager_DllResolver::TSearchPaths |
Container for the DLL search paths.
Definition at line 571 of file plugin_manager.hpp.
|
protected |
Definition at line 534 of file plugin_manager.hpp.
|
protected |
Definition at line 535 of file plugin_manager.hpp.
typedef CPluginManager<TClass>::SDriverInfo CInvalidDrvVer< TClass >::TValue |
Definition at line 1005 of file plugin_manager.hpp.
anonymous enum |
Enumerator | |
---|---|
eMajor | |
eMinor | |
ePatchLevel |
Definition at line 160 of file plugin_manager.hpp.
enum CPluginManager::EEntryPointRequest |
Actions performed by the entry point.
Definition at line 409 of file plugin_manager.hpp.
Enumerator | |
---|---|
eResolveFailure | Cannot resolve interface driver. |
eParameterMissing | Missing mandatory parameter. |
eNullInstance | Factory returned NULL instance. |
Definition at line 97 of file plugin_manager.hpp.
Enumerator | |
---|---|
eBeforeSuffix | |
eAfterSuffix |
Definition at line 638 of file plugin_manager.hpp.
void CPluginManager< TClass >::AddDllSearchPath | ( | const string & | path | ) |
Add path for the DLL lookup (for all resolvers)
path | Additional path for the DLL lookup |
Definition at line 1101 of file plugin_manager.hpp.
void CPluginManager< TClass >::AddResolver | ( | CPluginManager_DllResolver * | resolver | ) |
Attach DLL resolver to plugin manager.
Plugin manager uses all attached resolvers to search for DLLs exporting drivers of this interface.
resolver | DLL resolver. Plugin manager takes ownership of the resolver. |
Definition at line 1079 of file plugin_manager.hpp.
References _ASSERT.
Referenced by CPluginManager< TClass >::CPluginManager().
|
inline |
Definition at line 1007 of file plugin_manager.hpp.
CPluginManager< TClass >::CPluginManager | ( | void | ) |
Definition at line 1215 of file plugin_manager.hpp.
References CPluginManager< TClass >::AddResolver(), entries, IRegistry::EnumerateEntries(), CNcbiApplicationAPI::GetConfig(), IRegistry::GetString(), CNcbiApplicationAPI::InstanceGuard(), ITERATE, CPluginManager< TClass >::m_SubstituteMap, NULL, and registry.
CPluginManager_DllResolver::CPluginManager_DllResolver | ( | const string & | interface_name, |
const string & | driver_name = kEmptyStr , |
||
const CVersionInfo & | version = CVersionInfo::kAny , |
||
CDll::EAutoUnload | unload_dll = CDll::eNoAutoUnload |
||
) |
Construction.
interface_name | Target interface name |
plugin_name | Plugin family name (dbapi, xloader, etc) |
driver_name | Name of the driver (dblib, id1, etc) |
version | Interface version |
unload_dll | Whether to unload drivers DLL in the destructor |
Definition at line 52 of file plugin_manager.cpp.
CPluginManager_DllResolver::CPluginManager_DllResolver | ( | void | ) |
Definition at line 44 of file plugin_manager.cpp.
|
protected |
Definition at line 252 of file plugin_manager.cpp.
References CPluginManager_DllResolver::GetEntryPointName(), CPluginManager_DllResolver::GetEntryPointPrefix(), kEmptyStr, CPluginManager_DllResolver::m_AutoUnloadDll, CPluginManager_DllResolver::m_DriverName, CPluginManager_DllResolver::m_InterfaceName, and prefix.
Referenced by CPluginManager_DllResolver::GetCreateDllResolver().
|
inline |
Create class instance.
Definition at line 314 of file plugin_manager.hpp.
Referenced by CNetScheduleClientFactory::CreateInstance(), and CObjectManager::RegisterDataLoader().
|
pure virtual |
Create driver's instance.
Function creates driver by its name and version. The requirements is the drivers version should match the interface up to the patch level.
driver | Requested driver's name (not the name of the supported interface) |
version | Requested interface version (as understood by the caller). By default it will be passed the version which is current from the calling code's point of view. |
Implemented in CICacheCF< TDriver >, CICacheCF< CBDB_Cache >, CICacheCF< CNetICacheClient >, CSimpleClassFactoryImpl< IFace, TDriver >, CSimpleClassFactoryImpl< IBlobStorage, CBlobStorage_NetCache >, CSimpleClassFactoryImpl< I_DriverContext, CMySQLContext >, CSimpleClassFactoryImpl< objects::CReader, objects::CId2Reader >, CSimpleClassFactoryImpl< objects::CReader, objects::CId1Reader >, CSimpleClassFactoryImpl< ICache, CSQLITE3_Cache >, CSimpleClassFactoryImpl< ICache, CBDB_Cache >, CSimpleClassFactoryImpl< ICache, CNetICacheClient >, CSimpleClassFactoryImpl< ICache, TDriver >, CSimpleClassFactoryImpl< objects::CReader, objects::CPubseqReader >, CSimpleClassFactoryImpl< objects::CReader, objects::CGICacheReader >, CSimpleClassFactoryImpl< I_DriverContext, CODBCContext >, CSimpleClassFactoryImpl< I_DriverContext, CTLibContext >, CSimpleClassFactoryImpl< CWriter, CCacheWriter >, CSimpleClassFactoryImpl< objects::CReader, objects::CPubseq2Reader >, CSimpleClassFactoryImpl< objects::CID2Processor, objects::CID2SNPProcessor >, CSimpleClassFactoryImpl< CReader, CCacheReader >, CPubseq2ReaderCF, CPubseqReaderCF, CId2ReaderCF, CId1ReaderCF, CGICacheReaderCF, CID2SNPProcessorCF, CNetScheduleAPICF, CNetCacheAPICF, CSQLITE3_BlobCacheCF, CBlobStorageNetCacheCF, CDbapiOdbcCFBase, CDbapiCtlibCFBase, CCacheWriterCF, CCacheReaderCF, and CDataLoaderFactory.
Referenced by CPluginManager< SNetScheduleAPIImpl >::CreateInstance().
|
inlinevirtual |
Create instance of TDriver.
Implements IClassFactory< IFace >.
Reimplemented in CICacheCF< TDriver >, CICacheCF< CBDB_Cache >, CICacheCF< CNetICacheClient >, CPubseq2ReaderCF, CPubseqReaderCF, CId2ReaderCF, CId1ReaderCF, CGICacheReaderCF, CID2SNPProcessorCF, CSQLITE3_BlobCacheCF, CBlobStorageNetCacheCF, CDbapiOdbcCFBase, CDbapiCtlibCFBase, CCacheWriterCF, and CCacheReaderCF.
Definition at line 90 of file plugin_manager_impl.hpp.
TClass * CPluginManager< TClass >::CreateInstanceFromKey | ( | const TPluginManagerParamTree * | params, |
const string & | driver_key, | ||
const CVersionInfo & | version = GetDefaultDrvVers() |
||
) |
Detect driver from the parameters using the key to get list of drivers.
Definition at line 760 of file plugin_manager.hpp.
References _TRACE, CTreeNode< TValue, TKeyGetterP >::FindNode(), CTreeNode< TValue, TKeyGetterP >::GetValue(), and version.
TClass * CPluginManager< TClass >::CreateInstanceFromList | ( | const TPluginManagerParamTree * | params, |
const string & | driver_list, | ||
const CVersionInfo & | version = GetDefaultDrvVers() |
||
) |
Create first available driver from the list of drivers.
Several driver names may be separated with ":".
Definition at line 728 of file plugin_manager.hpp.
References _TRACE, ERR_POST_XX, CTreeNode< TValue, TKeyGetterP >::FindNode(), NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, ITERATE, NStr::Split(), and version.
|
inline |
Construction.
driver_name | Driver name string |
patch_level | Patch level implemented by the driver. By default corresponds to interface patch level. |
Definition at line 77 of file plugin_manager_impl.hpp.
CPluginManager_DllResolver * CPluginManager< TClass >::DetachResolver | ( | CPluginManager_DllResolver * | resolver | ) |
Remove resolver from the list of active resolvers.
Method is used when we need to freeze some of the resolution variants Resolver is not deleted, and can be reattached again by AddResolver
resolver | DLL resolver. Ownership is returned to the caller and resolver should be deleted by the caller |
Definition at line 1088 of file plugin_manager.hpp.
References NON_CONST_ITERATE.
|
inlinestatic |
Disable loading plugins from DLLs in general.
Definition at line 691 of file plugin_manager.hpp.
References CPluginManager_DllResolver::EnableGlobally().
Enable (or disable, if called with enable = false) loading plugins from DLLs in general.
Definition at line 338 of file plugin_manager.cpp.
Referenced by CDbapiSampleApp::CDbapiSampleApp(), CPluginManager_DllResolver::DisableGlobally(), CXcompareAnnotsApplication::Init(), main(), and NCBITEST_AUTO_INIT().
|
protected |
Definition at line 835 of file plugin_manager.hpp.
References IClassFactory< TClass >::GetDriverVersions(), IsBetterVersion(), ITERATE, and version.
|
inline |
Disable/enable DLL resolution (search for class factories in DLLs)
Definition at line 511 of file plugin_manager.hpp.
void CPluginManager< TClass >::FreezeResolution | ( | const string & | driver, |
bool | value = true |
||
) |
Disable/enable DLL resolution (search for class factories in DLLs) for the specified driver.
Definition at line 1139 of file plugin_manager.hpp.
References value.
|
protected |
Definition at line 307 of file plugin_manager.cpp.
References CPluginManager_DllResolver::CreateDllResolver(), and CPluginManager_DllResolver::m_DllResolver.
Referenced by CPluginManager_DllResolver::ResolveFile().
|
inlinestatic |
Definition at line 200 of file plugin_manager.hpp.
|
inlinestatic |
Definition at line 302 of file plugin_manager.hpp.
|
virtual |
Return dll file name.
Name does not include path.
Example: "ncbi_plugin_dbapi_ftds_3_1_7". "ncbi_pulgin_dbapi_ftds.so.3.1.7" In this case, the DLL will be searched for in the standard DLL search paths, with automatic addition of any platform-specific prefixes and suffixes.
driver_name | Driver name ("id1", "lds", etc) |
version | Requested version of the driver |
Reimplemented in CGB_Writer_PluginManager_DllResolver.
Definition at line 113 of file plugin_manager.cpp.
References delimiter, CPluginManager_DllResolver::GetDllNamePrefix(), NStr::IntToString(), NCBI_PLUGIN_SUFFIX, and version.
Referenced by CGB_Writer_PluginManager_DllResolver::GetDllName().
|
virtual |
Return DLL name mask.
DLL name mask is used for DLL file search.
Example: "ncbi_plugin_objmgr_*.dll" "ncbi_plugin_dbapi_ftds.so.*"
Reimplemented in CGB_Writer_PluginManager_DllResolver.
Definition at line 149 of file plugin_manager.cpp.
References delimiter, CPluginManager_DllResolver::eAfterSuffix, CPluginManager_DllResolver::GetDllNamePrefix(), NStr::IntToString(), NCBI_PLUGIN_SUFFIX, and version.
Referenced by CGB_Writer_PluginManager_DllResolver::GetDllNameMask(), and CPluginManager_DllResolver::ResolveFile().
|
virtual |
Return DLL file name prefix ("ncbi_plugin")
Definition at line 240 of file plugin_manager.cpp.
References CPluginManager_DllResolver::m_DllNamePrefix, and NCBI_PLUGIN_PREFIX.
Referenced by CPluginManager_DllResolver::GetDllName(), and CPluginManager_DllResolver::GetDllNameMask().
CDllResolver::TExtraDllPath CPluginManager< TClass >::GetDllStdSearchPath | ( | void | ) | const |
Get standard locations which should be used for the DLL lookup.
Definition at line 1132 of file plugin_manager.hpp.
Return name of the driver.
Definition at line 678 of file plugin_manager.hpp.
References CPluginManager_DllResolver::m_DriverName.
|
pure virtual |
Versions of the interface exported by the factory.
Implemented in CNetScheduleAPICF, CNetCacheAPICF, CSimpleClassFactoryImpl< IFace, TDriver >, CSimpleClassFactoryImpl< IBlobStorage, CBlobStorage_NetCache >, CSimpleClassFactoryImpl< I_DriverContext, CMySQLContext >, CSimpleClassFactoryImpl< objects::CReader, objects::CId2Reader >, CSimpleClassFactoryImpl< objects::CReader, objects::CId1Reader >, CSimpleClassFactoryImpl< ICache, CSQLITE3_Cache >, CSimpleClassFactoryImpl< ICache, CBDB_Cache >, CSimpleClassFactoryImpl< ICache, CNetICacheClient >, CSimpleClassFactoryImpl< ICache, TDriver >, CSimpleClassFactoryImpl< objects::CReader, objects::CPubseqReader >, CSimpleClassFactoryImpl< objects::CReader, objects::CGICacheReader >, CSimpleClassFactoryImpl< I_DriverContext, CODBCContext >, CSimpleClassFactoryImpl< I_DriverContext, CTLibContext >, CSimpleClassFactoryImpl< CWriter, CCacheWriter >, CSimpleClassFactoryImpl< objects::CReader, objects::CPubseq2Reader >, CSimpleClassFactoryImpl< objects::CID2Processor, objects::CID2SNPProcessor >, and CSimpleClassFactoryImpl< CReader, CCacheReader >.
Referenced by CPluginManager< TClass >::FindClassFactory(), and CPluginManager< TClass >::WillExtendCapabilities().
|
inlinevirtual |
Versions of the interface exported by the factory.
Implements IClassFactory< IFace >.
Definition at line 104 of file plugin_manager_impl.hpp.
|
virtual |
Return DLL entry point name:
Default name pattern is:
Definition at line 216 of file plugin_manager.cpp.
References CPluginManager_DllResolver::GetEntryPointPrefix().
Referenced by CPluginManager_DllResolver::CreateDllResolver().
|
virtual |
Return DLL entry point prefix ("NCBI_EntryPoint")
Definition at line 234 of file plugin_manager.cpp.
References CPluginManager_DllResolver::m_EntryPointPrefix.
Referenced by CPluginManager_DllResolver::CreateDllResolver(), and CPluginManager_DllResolver::GetEntryPointName().
|
overridevirtual |
Translate from the error code value to its string representation.
Reimplemented from CCoreException.
Definition at line 343 of file plugin_manager.cpp.
References CPluginManagerException::eParameterMissing, CPluginManagerException::eResolveFailure, CCoreException::GetErrCode(), and CException::GetErrCodeString().
CPluginManager< TClass >::TClassFactory * CPluginManager< TClass >::GetFactory | ( | const string & | driver = kEmptyStr , |
const CVersionInfo & | version = GetDefaultDrvVers() |
||
) |
Get class factory.
If more than one (of registered) class factory contain eligible driver candidates, then pick the class factory containing driver of the latest version.
driver | Name of the driver. If passed empty, then – any. |
version | Requested version. The returned driver can have a different (newer) version (provided that the new implementation is backward-compatible with the requested version. |
Definition at line 784 of file plugin_manager.hpp.
References _TRACE, NCBI_THROW, and version.
Referenced by CPluginManager< SNetScheduleAPIImpl >::CreateInstance().
|
protected |
This version always defaults to the empty string so that it can safely return a reference.
(default_value may be temporary in some cases.)
Definition at line 1279 of file plugin_manager.hpp.
References CConfig::eErr_NoThrow, CConfig::eErr_Throw, and CConfig::GetString().
|
protected |
Utility function to get an element of parameter tree Throws an exception when mandatory parameter is missing (or returns the default value)
Definition at line 1261 of file plugin_manager.hpp.
References CConfig::eErr_NoThrow, CConfig::eErr_Throw, and CConfig::GetString().
|
inlineprotected |
This version always defaults to the empty string so that it can safely return a reference.
(default_value may be temporary in some cases.)
Definition at line 126 of file plugin_manager_impl.hpp.
|
inlineprotected |
Utility function to get an element of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value)
Definition at line 113 of file plugin_manager_impl.hpp.
|
inlineprotected |
Utility function to get an bool of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value)
Definition at line 169 of file plugin_manager_impl.hpp.
|
inlineprotected |
Utility function to get an integer of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value)
Definition at line 153 of file plugin_manager_impl.hpp.
|
inlineprotected |
Utility function to get a double of parameter tree Throws an exception when mandatory parameter is missing (or returns the default value)
Definition at line 186 of file plugin_manager_impl.hpp.
|
inlineprotected |
Utility function to get an integer of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value)
Definition at line 137 of file plugin_manager_impl.hpp.
|
static |
Return whether to allow loading plugins from DLLs in general.
Definition at line 328 of file plugin_manager.cpp.
|
static |
Return whether to allow loading plugins from DLLs in general by default.
Definition at line 333 of file plugin_manager.cpp.
References LOAD_PLUGINS_FROM_DLLS_BY_DEFAULT.
|
inlinestatic |
Entry point implementation.
Definition at line 229 of file plugin_manager_impl.hpp.
References _ASSERT, CVersionInfo::eFullyCompatible, CPluginManager< TClass >::eGetFactoryInfo, CPluginManager< TClass >::eInstantiateFactory, and NULL.
Referenced by NCBI_BDB_ICacheEntryPoint(), NCBI_EntryPoint_CacheReader(), NCBI_EntryPoint_CacheWriter(), NCBI_EntryPoint_DataLoader_AsnCache(), NCBI_EntryPoint_DataLoader_Bam(), NCBI_EntryPoint_DataLoader_BlastDb(), NCBI_EntryPoint_DataLoader_Cdd(), NCBI_EntryPoint_DataLoader_CSRA(), NCBI_EntryPoint_DataLoader_GB(), NCBI_EntryPoint_DataLoader_LDS2(), NCBI_EntryPoint_DataLoader_Patcher(), NCBI_EntryPoint_DataLoader_RmtBlastDb(), NCBI_EntryPoint_DataLoader_Sra(), NCBI_EntryPoint_DataLoader_WGS(), NCBI_EntryPoint_GICacheReader(), NCBI_EntryPoint_Id1Reader(), NCBI_EntryPoint_id2proc_snp(), NCBI_EntryPoint_Id2Reader(), NCBI_EntryPoint_ReaderPubseqos(), NCBI_EntryPoint_ReaderPubseqos2(), NCBI_EntryPoint_SQLITE3_BlobCache(), NCBI_EntryPoint_xblobstorage_netcache(), NCBI_EntryPoint_xcache_netcache(), NCBI_EntryPoint_xdbapi_ctlib(), NCBI_EntryPoint_xdbapi_mysql(), NCBI_EntryPoint_xdbapi_odbc(), NCBI_EntryPoint_xloader_snp(), NCBI_EntryPoint_xloader_vdbgraph(), NCBI_EntryPoint_xnetcacheapi(), and NCBI_EntryPoint_xnetscheduleapi().
CPluginManagerException::NCBI_EXCEPTION_DEFAULT | ( | CPluginManagerException | , |
CCoreException | |||
) |
|
inline |
Definition at line 1011 of file plugin_manager.hpp.
References CVersionInfo::eNonCompatible, CInvalidDrvVer< TClass >::m_DriverName, CInvalidDrvVer< TClass >::m_VersionInfo, and val.
|
inline |
Definition at line 271 of file plugin_manager.hpp.
|
inline |
Definition at line 721 of file plugin_manager.hpp.
References SDriverInfo::name, and SDriverInfo::version.
|
inline |
Definition at line 715 of file plugin_manager.hpp.
References SDriverInfo::name, and SDriverInfo::version.
bool CPluginManager< TClass >::RegisterFactory | ( | TClassFactory & | factory | ) |
Try to register factory in the manager.
The registered factory will be owned by the manager.
Definition at line 874 of file plugin_manager.hpp.
bool CPluginManager< TClass >::RegisterWithEntryPoint | ( | TEntryPoint | plugin_entry_point | ) |
Register all factories exported by the plugin entry point.
Definition at line 969 of file plugin_manager.hpp.
References _TRACE, and ITERATE.
Referenced by CNetScheduleClientFactory::CNetScheduleClientFactory().
bool CPluginManager< TClass >::RegisterWithEntryPoint | ( | TEntryPoint | plugin_entry_point, |
const string & | driver_name, | ||
const CVersionInfo & | driver_version = CVersionInfo::kLatest |
||
) |
Register all compatible factories for the driver with the particular version exported by the plugin entry point.
Definition at line 1025 of file plugin_manager.hpp.
void CPluginManager< TClass >::ResetDllSearchPath | ( | TSearchPaths * | previous_paths = NULL | ) |
Delete all user-installed paths for the DLL lookup (for all resolvers)
previous_paths | If non-NULL, store the previously set search paths in this container |
Definition at line 1108 of file plugin_manager.hpp.
CDllResolver & CPluginManager_DllResolver::Resolve | ( | const string & | path | ) |
Search for plugin DLLs, resolve entry points.
paths | Path to scan for DLLs |
Definition at line 103 of file plugin_manager.cpp.
References _ASSERT, and CPluginManager_DllResolver::ResolveFile().
void CPluginManager< TClass >::ResolveFile | ( | const string & | driver = kEmptyStr , |
const CVersionInfo & | version = GetDefaultDrvVers() |
||
) |
Scan DLLs for specified driver using attached resolvers.
Definition at line 1150 of file plugin_manager.hpp.
References CDllResolver::SResolvedEntry::dll, CDllResolver::SNamedEntryPoint::entry_point, CDllResolver::SResolvedEntry::entry_points, ERR_POST_XX, CDll::TEntryPoint::func, CDll::GetName(), CDllResolver::GetResolvedEntries(), Info(), ITERATE, CVersionInfo::kAny, NON_CONST_ITERATE, and version.
CDllResolver & CPluginManager_DllResolver::ResolveFile | ( | const TSearchPaths & | paths, |
const string & | driver_name = kEmptyStr , |
||
const CVersionInfo & | version = CVersionInfo::kAny , |
||
CDllResolver::TExtraDllPath | std_path = CDllResolver::fDefaultDllPath |
||
) |
Search for plugin DLLs, resolve entry points.
paths | List of directories to scan for DLLs |
driver_name | Name of the driver (dblib, id1, etc) |
version | Interface version |
Definition at line 73 of file plugin_manager.cpp.
References _ASSERT, CPluginManager_DllResolver::eAfterSuffix, CDllResolver::FindCandidates(), CPluginManager_DllResolver::GetCreateDllResolver(), CPluginManager_DllResolver::GetDllNameMask(), CVersionInfo::kAny, CVersionInfo::kLatest, CPluginManager_DllResolver::m_DriverName, CPluginManager_DllResolver::m_InterfaceName, CPluginManager_DllResolver::m_Version, mask, and version.
Referenced by CPluginManager_DllResolver::Resolve().
|
inline |
Definition at line 175 of file plugin_manager.hpp.
|
inline |
Definition at line 374 of file plugin_manager.hpp.
Set DLL file name prefix.
Definition at line 246 of file plugin_manager.cpp.
References CPluginManager_DllResolver::m_DllNamePrefix, and prefix.
Referenced by CDllResolver_Getter< IBlobStorage >::operator()(), CDllResolver_Getter< I_DriverContext >::operator()(), CDllResolver_Getter< objects::CID2Processor >::operator()(), CDllResolver_Getter< objects::CDataLoader >::operator()(), CDllResolver_Getter< objects::IEditSaver >::operator()(), CDllResolver_Getter< objects::IEditsDBEngine >::operator()(), CDllResolver_Getter< objects::CReader >::operator()(), CDllResolver_Getter< objects::CWriter >::operator()(), and CDllResolver_Getter< ICache >::operator()().
CDllResolver::TExtraDllPath CPluginManager< TClass >::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 explicitly using this method CDllResolver::fDefaultDllPath will be used by default.
Definition at line 1121 of file plugin_manager.hpp.
bool CPluginManager< TClass >::UnregisterFactory | ( | TClassFactory & | factory | ) |
Unregister and release (un-own)
Definition at line 953 of file plugin_manager.hpp.
References _TRACE.
bool CPluginManager< TClass >::WillExtendCapabilities | ( | TClassFactory & | factory | ) | const |
Check if a given factory will extend capabilities of the Plugin Manager (add either new drivers or new driver versions to already available).
Definition at line 889 of file plugin_manager.hpp.
References _TRACE, CVersionInfo::eFullyCompatible, ERR_POST_XX, IClassFactory< TClass >::GetDriverVersions(), ITERATE, and Warning().
|
virtual |
Definition at line 1248 of file plugin_manager.hpp.
References ITERATE.
|
virtual |
Definition at line 67 of file plugin_manager.cpp.
References CPluginManager_DllResolver::m_DllResolver.
|
inlinevirtual |
Definition at line 231 of file plugin_manager.hpp.
TClassFactory* CPluginManager< TClass >::SDriverInfo::factory |
Class factory (can be NULL)
Definition at line 372 of file plugin_manager.hpp.
|
protected |
Definition at line 704 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::CreateDllResolver().
|
private |
Flag, prohibits DLL resolution.
Definition at line 550 of file plugin_manager.hpp.
Referenced by CPluginManager< SNetScheduleAPIImpl >::FreezeResolution().
|
protected |
Definition at line 698 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::GetDllNamePrefix(), and CPluginManager_DllResolver::SetDllNamePrefix().
|
protected |
Definition at line 703 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::GetCreateDllResolver(), and CPluginManager_DllResolver::~CPluginManager_DllResolver().
|
private |
Paths used for DLL search.
Definition at line 546 of file plugin_manager.hpp.
|
protected |
Definition at line 701 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::CreateDllResolver(), CPluginManager_DllResolver::GetDriverName(), and CPluginManager_DllResolver::ResolveFile().
|
private |
Definition at line 1018 of file plugin_manager.hpp.
Referenced by CInvalidDrvVer< TClass >::operator()().
|
protected |
Definition at line 202 of file plugin_manager_impl.hpp.
Referenced by CSimpleClassFactoryImpl< CReader, CCacheReader >::CreateInstance(), CSimpleClassFactoryImpl< CReader, CCacheReader >::CSimpleClassFactoryImpl(), CSimpleClassFactoryImpl< CReader, CCacheReader >::GetDriverVersions(), CSimpleClassFactoryImpl< CReader, CCacheReader >::GetParam(), CSimpleClassFactoryImpl< CReader, CCacheReader >::GetParamBool(), CSimpleClassFactoryImpl< CReader, CCacheReader >::GetParamDataSize(), CSimpleClassFactoryImpl< CReader, CCacheReader >::GetParamDouble(), and CSimpleClassFactoryImpl< CReader, CCacheReader >::GetParamInt().
|
protected |
Definition at line 201 of file plugin_manager_impl.hpp.
Referenced by CSimpleClassFactoryImpl< CReader, CCacheReader >::GetDriverVersions().
|
protected |
Definition at line 699 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::GetEntryPointPrefix().
|
private |
List of entry points registered in this plugin manager.
Definition at line 542 of file plugin_manager.hpp.
|
private |
List of factories presently registered with (and owned by) the plugin manager.
Definition at line 540 of file plugin_manager.hpp.
|
private |
Set of drivers prohibited from DLL resolution.
Definition at line 552 of file plugin_manager.hpp.
|
protected |
Definition at line 700 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::CreateDllResolver(), and CPluginManager_DllResolver::ResolveFile().
|
protected |
Protective mutex to synchronize the access to the plugin manager from different threads.
Definition at line 528 of file plugin_manager.hpp.
|
private |
DLL entries resolved and registered with dll resolver(s)
Definition at line 548 of file plugin_manager.hpp.
|
private |
DLL resolvers.
Definition at line 544 of file plugin_manager.hpp.
|
private |
Standard locations that should be used for the DLL lookup.
Definition at line 554 of file plugin_manager.hpp.
|
private |
Driver name substitution map.
Definition at line 556 of file plugin_manager.hpp.
Referenced by CPluginManager< TClass >::CPluginManager(), and CPluginManager< SNetScheduleAPIImpl >::CreateInstance().
|
protected |
Definition at line 702 of file plugin_manager.hpp.
Referenced by CPluginManager_DllResolver::ResolveFile().
|
private |
Definition at line 1019 of file plugin_manager.hpp.
Referenced by CInvalidDrvVer< TClass >::operator()().
string SDriverInfo::name |
Driver name.
Definition at line 172 of file plugin_manager.hpp.
Referenced by operator<(), and operator==().
CVersionInfo SDriverInfo::version |
Driver version.
Definition at line 173 of file plugin_manager.hpp.
Referenced by operator<(), and operator==().