NCBI C++ ToolKit
|
Search Toolkit Book for CDataLoaderFactory
#include <objmgr/data_loader_factory.hpp>
Public Types | |
typedef IClassFactory< CDataLoader > | TParent |
typedef TParent::SDriverInfo | TDriverInfo |
typedef TParent::TDriverList | TDriverList |
Public Types inherited from IClassFactory< CDataLoader > | |
typedef CDataLoader | TInterface |
typedef ncbi::SDriverInfo | SDriverInfo |
typedef ncbi::TDriverList | TDriverList |
typedef CDefaultDriverVersion< CDataLoader > | TDefaultDriverVersion |
Public Member Functions | |
CDataLoaderFactory (const string &driver_name, int patch_level=-1) | |
virtual | ~CDataLoaderFactory () |
const string & | GetDriverName (void) const |
void | GetDriverVersions (TDriverList &info_list) const |
CDataLoader * | CreateInstance (const string &driver=kEmptyStr, CVersionInfo version=NCBI_INTERFACE_VERSION(CDataLoader), const TPluginManagerParamTree *params=0) const |
Create driver's instance. More... | |
Public Member Functions inherited from IClassFactory< CDataLoader > | |
virtual void | GetDriverVersions (TDriverList &driver_list) const=0 |
Versions of the interface exported by the factory. More... | |
virtual | ~IClassFactory (void) |
Protected Member Functions | |
bool | ValidParams (const TPluginManagerParamTree *params) const |
virtual CDataLoader * | CreateAndRegister (CObjectManager &om, const TPluginManagerParamTree *params) const =0 |
CObjectManager::EIsDefault | GetIsDefault (const TPluginManagerParamTree *params) const |
CObjectManager::TPriority | GetPriority (const TPluginManagerParamTree *params) const |
Protected Member Functions inherited from IClassFactory< CDataLoader > | |
string | GetParam (const string &driver_name, const TPluginManagerParamTree *params, const string ¶m_name, bool mandatory, const string &default_value) const |
Utility function to get an element of parameter tree Throws an exception when mandatory parameter is missing (or returns the default value) More... | |
const string & | GetParam (const string &driver_name, const TPluginManagerParamTree *params, const string ¶m_name, bool mandatory) const |
This version always defaults to the empty string so that it can safely return a reference. More... | |
Private Member Functions | |
CObjectManager * | x_GetObjectManager (const TPluginManagerParamTree *params) const |
Private Attributes | |
CVersionInfo | m_DriverVersionInfo |
string | m_DriverName |
Additional Inherited Members | |
Static Public Member Functions inherited from IClassFactory< CDataLoader > | |
static const CVersionInfo & | GetDefaultDrvVers (void) |
Definition at line 61 of file data_loader_factory.hpp.
Definition at line 66 of file data_loader_factory.hpp.
Definition at line 67 of file data_loader_factory.hpp.
Definition at line 65 of file data_loader_factory.hpp.
Definition at line 41 of file data_loader_factory.cpp.
References _ASSERT.
|
inlinevirtual |
Definition at line 70 of file data_loader_factory.hpp.
|
protectedpure virtual |
Implemented in CWGS_DataLoaderCF, CVDBGraph_DataLoaderCF, CSRA_DataLoaderCF, CSNP_DataLoaderCF, CCSRA_DataLoaderCF, CBAM_DataLoaderCF, CDLPatcher_DataLoaderCF, CLDS2_DataLoaderCF, CPSG_DataLoaderCF, CGB_DataLoaderCF, CCDD_DataLoaderCF, CRmtBlastDb_DataLoaderCF, CBlastDb_DataLoaderCF, CAsnCache_DataLoaderCF, CSimpleDataLoaderFactory< TDataLoader >, and CFakeDataLoaderFactory.
Referenced by CreateInstance().
|
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. |
Implements IClassFactory< CDataLoader >.
Definition at line 60 of file data_loader_factory.cpp.
References _ASSERT, CreateAndRegister(), CVersionInfo::eNonCompatible, m_DriverName, NCBI_INTERFACE_VERSION, om, dtl::version, and x_GetObjectManager().
Definition at line 72 of file data_loader_factory.hpp.
References m_DriverName.
Referenced by CAsnCache_DataLoaderCF::CreateAndRegister(), CBlastDb_DataLoaderCF::CreateAndRegister(), CRmtBlastDb_DataLoaderCF::CreateAndRegister(), CLDS2_DataLoaderCF::CreateAndRegister(), and CDLPatcher_DataLoaderCF::CreateAndRegister().
void CDataLoaderFactory::GetDriverVersions | ( | TDriverList & | info_list | ) | const |
Definition at line 54 of file data_loader_factory.cpp.
References m_DriverName, and m_DriverVersionInfo.
|
protected |
Definition at line 90 of file data_loader_factory.cpp.
References NStr::CompareNocase(), CObjectManager::eDefault, CObjectManager::eNonDefault, IClassFactory< CDataLoader >::GetParam(), kCFParam_DataLoader_IsDefault, and m_DriverName.
Referenced by CSimpleDataLoaderFactory< TDataLoader >::CreateAndRegister(), CBlastDb_DataLoaderCF::CreateAndRegister(), CRmtBlastDb_DataLoaderCF::CreateAndRegister(), CCDD_DataLoaderCF::CreateAndRegister(), CGB_DataLoaderCF::CreateAndRegister(), CPSG_DataLoaderCF::CreateAndRegister(), CLDS2_DataLoaderCF::CreateAndRegister(), CDLPatcher_DataLoaderCF::CreateAndRegister(), CBAM_DataLoaderCF::CreateAndRegister(), CCSRA_DataLoaderCF::CreateAndRegister(), CSNP_DataLoaderCF::CreateAndRegister(), CSRA_DataLoaderCF::CreateAndRegister(), CVDBGraph_DataLoaderCF::CreateAndRegister(), and CWGS_DataLoaderCF::CreateAndRegister().
|
protected |
Definition at line 101 of file data_loader_factory.cpp.
References IClassFactory< CDataLoader >::GetParam(), NStr::IntToString(), kCFParam_DataLoader_Priority, CObjectManager::kPriority_Default, m_DriverName, and NStr::StringToInt().
Referenced by CSimpleDataLoaderFactory< TDataLoader >::CreateAndRegister(), CBlastDb_DataLoaderCF::CreateAndRegister(), CRmtBlastDb_DataLoaderCF::CreateAndRegister(), CCDD_DataLoaderCF::CreateAndRegister(), CGB_DataLoaderCF::CreateAndRegister(), CPSG_DataLoaderCF::CreateAndRegister(), CLDS2_DataLoaderCF::CreateAndRegister(), CDLPatcher_DataLoaderCF::CreateAndRegister(), CBAM_DataLoaderCF::CreateAndRegister(), CCSRA_DataLoaderCF::CreateAndRegister(), CSNP_DataLoaderCF::CreateAndRegister(), CSRA_DataLoaderCF::CreateAndRegister(), CVDBGraph_DataLoaderCF::CreateAndRegister(), and CWGS_DataLoaderCF::CreateAndRegister().
|
protected |
Definition at line 111 of file data_loader_factory.cpp.
Referenced by CBlastDb_DataLoaderCF::CreateAndRegister(), CRmtBlastDb_DataLoaderCF::CreateAndRegister(), CCDD_DataLoaderCF::CreateAndRegister(), CGB_DataLoaderCF::CreateAndRegister(), CPSG_DataLoaderCF::CreateAndRegister(), CLDS2_DataLoaderCF::CreateAndRegister(), CDLPatcher_DataLoaderCF::CreateAndRegister(), CBAM_DataLoaderCF::CreateAndRegister(), CCSRA_DataLoaderCF::CreateAndRegister(), CSNP_DataLoaderCF::CreateAndRegister(), CSRA_DataLoaderCF::CreateAndRegister(), CVDBGraph_DataLoaderCF::CreateAndRegister(), and CWGS_DataLoaderCF::CreateAndRegister().
|
private |
Definition at line 78 of file data_loader_factory.cpp.
References CObjectManager::GetInstance(), IClassFactory< CDataLoader >::GetParam(), kCFParam_ObjectManagerPtr, kEmptyStr, m_DriverName, om, and NStr::StringToPtr().
Referenced by CreateInstance().
|
private |
Definition at line 98 of file data_loader_factory.hpp.
Referenced by CreateInstance(), GetDriverName(), GetDriverVersions(), GetIsDefault(), GetPriority(), and x_GetObjectManager().
|
private |
Definition at line 97 of file data_loader_factory.hpp.
Referenced by GetDriverVersions().