Returns FactoryProduct* based on the name of the desired concrete FactoryProduct. More...
#include <OpenMS/CONCEPT/Factory.h>
Static Public Member Functions | |
| static FactoryProduct * | create (const String &name) |
return FactoryProduct according to unique identifier name More... | |
| static void | registerProduct (const String &name, const FunctionType creator) |
| register new concrete FactoryProduct More... | |
| static bool | isRegistered (const String &name) |
| Returns if a factory product is registered. More... | |
| static std::vector< String > | registeredProducts () |
| Returns a list of registered products. More... | |
Private Types | |
| typedef FactoryProduct *(* | FunctionType )() |
| Function signature of creator function. More... | |
| typedef std::map< String, FunctionType > | Map |
| typedef Map::const_iterator | MapIterator |
| typedef Factory< FactoryProduct > | FactoryType |
Private Member Functions | |
| virtual | ~Factory () |
| Destructor. More... | |
| Factory () | |
| Constructor. More... | |
Static Private Member Functions | |
| static Factory * | instance_ () |
| singleton access to Factory More... | |
Private Attributes | |
| Map | inventory_ |
Static Private Attributes | |
| static Factory * | instance_ptr_ = 0 |
Friends | |
| class | singletonsNeedNoFriends |
Additional Inherited Members | |
Public Member Functions inherited from FactoryBase | |
| virtual | ~FactoryBase () |
| destructor More... | |
Returns FactoryProduct* based on the name of the desired concrete FactoryProduct.
Every factory product base class T has to implement the static function registerChildren that registers all classes S derived from T at Factory<T>.
Every class S derived from T has to implement the function "static T* create()" which is going to be registered at Factory<T>. Additionally the function "static String getProductName()" is required, which returns the name the class is registered by.
|
private |
|
private |
Function signature of creator function.
|
private |
|
private |
|
inlineprivatevirtual |
Destructor.
|
inlineprivate |
Constructor.
Referenced by Factory< FactoryProduct >::instance_().
|
inlinestatic |
return FactoryProduct according to unique identifier name
References Factory< FactoryProduct >::instance_(), and Factory< FactoryProduct >::inventory_.
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), and ModelFitter< PeakType, FeatureType >::fitRT_().
|
inlinestaticprivate |
singleton access to Factory
References Factory< FactoryProduct >::Factory(), SingletonRegistry::getFactory(), Factory< FactoryProduct >::instance_ptr_, SingletonRegistry::isRegistered(), and SingletonRegistry::registerFactory().
Referenced by Factory< FactoryProduct >::create(), Factory< FactoryProduct >::isRegistered(), Factory< FactoryProduct >::registeredProducts(), and Factory< FactoryProduct >::registerProduct().
|
inlinestatic |
Returns if a factory product is registered.
References Factory< FactoryProduct >::instance_(), and Factory< FactoryProduct >::inventory_.
|
inlinestatic |
Returns a list of registered products.
References Factory< FactoryProduct >::instance_(), and Factory< FactoryProduct >::inventory_.
|
inlinestatic |
register new concrete FactoryProduct
| name | unique name for concrete FactoryProduct |
| creator | default constructor for concrete FactoryProduct |
References Factory< FactoryProduct >::instance_(), and Factory< FactoryProduct >::inventory_.
Referenced by BaseLabeler::registerChildren().
|
friend |
|
staticprivate |
Referenced by Factory< FactoryProduct >::instance_().
|
private |
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:28 using doxygen 1.8.5 |