NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CSimpleClassFactoryImpl< IFace, TDriver > Class Template Reference

Search Toolkit Book for CSimpleClassFactoryImpl

Template class helps to implement one driver class factory. More...

#include <corelib/plugin_manager_impl.hpp>

+ Inheritance diagram for CSimpleClassFactoryImpl< IFace, TDriver >:
+ Collaboration diagram for CSimpleClassFactoryImpl< IFace, TDriver >:

Public Types

typedef TDriver TImplementation
 
typedef IFace TInterface
 
typedef IClassFactory< IFace > TParent
 
typedef TParent::SDriverInfo TDriverInfo
 
typedef TParent::TDriverList TDriverList
 
- Public Types inherited from IClassFactory< IFace >
typedef IFace TInterface
 
typedef ncbi::SDriverInfo SDriverInfo
 
typedef ncbi::TDriverList TDriverList
 
typedef CDefaultDriverVersion< IFace > TDefaultDriverVersion
 

Public Member Functions

 CSimpleClassFactoryImpl (const string &driver_name, int patch_level=-1)
 Construction. More...
 
virtual TInterfaceCreateInstance (const string &driver=kEmptyStr, CVersionInfo version=TParent::GetDefaultDrvVers(), const TPluginManagerParamTree *=0) const
 Create instance of TDriver. More...
 
void GetDriverVersions (TDriverList &info_list) const
 Versions of the interface exported by the factory. More...
 
- Public Member Functions inherited from IClassFactory< IFace >
virtual ~IClassFactory (void)
 

Protected Member Functions

string GetParam (const TPluginManagerParamTree *params, const string &param_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 deafult value) More...
 
const stringGetParam (const TPluginManagerParamTree *params, const string &param_name, bool mandatory) const
 This version always defaults to the empty string so that it can safely return a reference. More...
 
int GetParamInt (const TPluginManagerParamTree *params, const string &param_name, bool, int default_value) const
 Utility function to get an integer of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value) More...
 
Uint8 GetParamDataSize (const TPluginManagerParamTree *params, const string &param_name, bool, unsigned int default_value) const
 Utility function to get an integer of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value) More...
 
bool GetParamBool (const TPluginManagerParamTree *params, const string &param_name, bool, bool default_value) const
 Utility function to get an bool of parameter tree Throws an exception when mandatory parameter is missing (or returns the deafult value) More...
 
double GetParamDouble (const TPluginManagerParamTree *params, const string &param_name, bool, double default_value) const
 Utility function to get a double of parameter tree Throws an exception when mandatory parameter is missing (or returns the default value) More...
 
- Protected Member Functions inherited from IClassFactory< IFace >
string GetParam (const string &driver_name, const TPluginManagerParamTree *params, const string &param_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 stringGetParam (const string &driver_name, const TPluginManagerParamTree *params, const string &param_name, bool mandatory) const
 This version always defaults to the empty string so that it can safely return a reference. More...
 

Protected Attributes

CVersionInfo m_DriverVersionInfo
 
string m_DriverName
 

Additional Inherited Members

- Static Public Member Functions inherited from IClassFactory< IFace >
static const CVersionInfoGetDefaultDrvVers (void)
 

Detailed Description

template<class IFace, class TDriver>
class CSimpleClassFactoryImpl< IFace, TDriver >

Template class helps to implement one driver class factory.

Class supports one driver, one version class factory (the very basic one) Template parameters are: IFace - interface class TDriver - driver class (implements IFace)

Definition at line 60 of file plugin_manager_impl.hpp.


The documentation for this class was generated from the following file:
Modified on Sun Mar 03 03:16:51 2024 by modify_doxy.py rev. 669887