![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Factory singleton allowing dynamic creation of registred objects. More...
#include <DynamicObjectFactory.h>
Public Member Functions | |
| bool | isRegistredClass (const std::string &className) const |
| test if a given class is already registred | |
| void | registerClass (const std::string &className, DynamicNewObjectCreator newObjectCreator, DynamicSharedObjectCreator sharedObjectCreator) |
| register new class into factory More... | |
| void | unRegisterClass (const std::string &className) |
| un register an existing class from factory More... | |
| BaseDynamicObject * | createNewObject (const std::string &className) const |
| create new instance of a registered class More... | |
| DynamicObjectPtr | createSharedObject (const std::string &className) const |
| create shared instance of a registered class More... | |
Static Public Member Functions | |
| static DynamicObjectFactory & | getInstance () |
| retrieve unique instance of factory | |
Protected Types | |
| typedef std::pair< DynamicNewObjectCreator, DynamicSharedObjectCreator > | DynamicObjectCreator |
| pair of function pointers allowing to create new and shared dynamic objects | |
| typedef std::map< std::string, DynamicObjectCreator > | FactoryMap |
| typedef for string associated to dynamic object creation function | |
Protected Member Functions | |
Constructors and destructors | |
| DynamicObjectFactory () | |
| ~DynamicObjectFactory () | |
Protected Attributes | |
| FactoryMap | _factoryMap |
| map storing string to creation function association | |
Factory singleton allowing dynamic creation of registred objects.
| void ipsdk::DynamicObjectFactory::registerClass | ( | const std::string & | className, |
| DynamicNewObjectCreator | newObjectCreator, | ||
| DynamicSharedObjectCreator | sharedObjectCreator | ||
| ) |
register new class into factory
| ipsdk::IPSDKUtilException | if isRegistredClass(className) == true |
| void ipsdk::DynamicObjectFactory::unRegisterClass | ( | const std::string & | className | ) |
un register an existing class from factory
| ipsdk::IPSDKUtilException | if isRegistredClass(className) == false |
| BaseDynamicObject* ipsdk::DynamicObjectFactory::createNewObject | ( | const std::string & | className | ) | const |
create new instance of a registered class
| ipsdk::IPSDKUtilException | if isRegistred(className) == false |
| DynamicObjectPtr ipsdk::DynamicObjectFactory::createSharedObject | ( | const std::string & | className | ) | const |
create shared instance of a registered class
| ipsdk::IPSDKUtilException | if isRegistred(className) == false |
1.8.14