Factory for creation of exported algorithms. More...
#include <export_algorithm_factory.hpp>
Public Types | |
typedef AlgorithmBase *(* | exportAlgorithmCreator )(UserInteraction *_userInteraction, const std::string &_commonHeaderName) |
Public Member Functions | |
AlgorithmBase * | createAlgorithm (UserInteraction *_userInteraction, const std::string &_commonHeaderName, const AlgorithmType &id) |
bool | registerAlgorithm (const AlgorithmType &id, exportAlgorithmCreator creator) |
bool | unregisterAlgorithm (const AlgorithmType &id) |
Static Public Member Functions | |
static ExportAlgorithmFactory & | instance () |
Private Types | |
typedef std::map < AlgorithmType, exportAlgorithmCreator > | idToProductMap |
Private Member Functions | |
ExportAlgorithmFactory () | |
ExportAlgorithmFactory (const ExportAlgorithmFactory &) | |
ExportAlgorithmFactory & | operator= (const ExportAlgorithmFactory &) |
~ExportAlgorithmFactory () | |
Private Attributes | |
idToProductMap | associations_ |
Factory for creation of exported algorithms.
Note that the class is implemented as a singleton
Definition at line 56 of file export_algorithm_factory.hpp.
typedef AlgorithmBase*(* ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::exportAlgorithmCreator)(UserInteraction *_userInteraction, const std::string &_commonHeaderName) |
Helper type.
Definition at line 60 of file export_algorithm_factory.hpp.
typedef std::map<AlgorithmType, exportAlgorithmCreator> ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::idToProductMap [private] |
Definition at line 110 of file export_algorithm_factory.hpp.
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::ExportAlgorithmFactory | ( | ) | [inline, private] |
Definition at line 114 of file export_algorithm_factory.hpp.
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::ExportAlgorithmFactory | ( | const ExportAlgorithmFactory< AlgorithmBase, AlgorithmType > & | ) | [private] |
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::~ExportAlgorithmFactory | ( | ) | [inline, private] |
Definition at line 121 of file export_algorithm_factory.hpp.
AlgorithmBase* ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::createAlgorithm | ( | UserInteraction * | _userInteraction, |
const std::string & | _commonHeaderName, | ||
const AlgorithmType & | id | ||
) | [inline] |
Function to create an instance of an algorithm.
Definition at line 94 of file export_algorithm_factory.hpp.
static ExportAlgorithmFactory& ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::instance | ( | ) | [inline, static] |
Static creator function.
Definition at line 63 of file export_algorithm_factory.hpp.
ExportAlgorithmFactory& ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::operator= | ( | const ExportAlgorithmFactory< AlgorithmBase, AlgorithmType > & | ) | [private] |
bool ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::registerAlgorithm | ( | const AlgorithmType & | id, |
exportAlgorithmCreator | creator | ||
) | [inline] |
Function for algorithm registration.
Definition at line 70 of file export_algorithm_factory.hpp.
bool ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::unregisterAlgorithm | ( | const AlgorithmType & | id | ) | [inline] |
Function to unregister an algorithm.
Definition at line 83 of file export_algorithm_factory.hpp.
idToProductMap ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::associations_ [private] |
Definition at line 112 of file export_algorithm_factory.hpp.