Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType > Class Template Reference

Factory for creation of exported algorithms. More...

#include <export_algorithm_factory.hpp>

List of all members.

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 ExportAlgorithmFactoryinstance ()

Private Types

typedef std::map
< AlgorithmType,
exportAlgorithmCreator
idToProductMap

Private Member Functions

 ExportAlgorithmFactory ()
 ExportAlgorithmFactory (const ExportAlgorithmFactory &)
ExportAlgorithmFactoryoperator= (const ExportAlgorithmFactory &)
 ~ExportAlgorithmFactory ()

Private Attributes

idToProductMap associations_

Detailed Description

template<class AlgorithmBase, typename AlgorithmType>
class ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >

Factory for creation of exported algorithms.

Note that the class is implemented as a singleton

Author:
Milan Vukov
Date:
2012 - 2013

Definition at line 56 of file export_algorithm_factory.hpp.


Member Typedef Documentation

template<class AlgorithmBase , typename AlgorithmType >
typedef AlgorithmBase*(* ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::exportAlgorithmCreator)(UserInteraction *_userInteraction, const std::string &_commonHeaderName)

Helper type.

Definition at line 60 of file export_algorithm_factory.hpp.

template<class AlgorithmBase , typename AlgorithmType >
typedef std::map<AlgorithmType, exportAlgorithmCreator> ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::idToProductMap [private]

Definition at line 110 of file export_algorithm_factory.hpp.


Constructor & Destructor Documentation

template<class AlgorithmBase , typename AlgorithmType >
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::ExportAlgorithmFactory ( ) [inline, private]

Definition at line 114 of file export_algorithm_factory.hpp.

template<class AlgorithmBase , typename AlgorithmType >
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::ExportAlgorithmFactory ( const ExportAlgorithmFactory< AlgorithmBase, AlgorithmType > &  ) [private]
template<class AlgorithmBase , typename AlgorithmType >
ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::~ExportAlgorithmFactory ( ) [inline, private]

Definition at line 121 of file export_algorithm_factory.hpp.


Member Function Documentation

template<class AlgorithmBase , typename AlgorithmType >
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.

template<class AlgorithmBase , typename AlgorithmType >
static ExportAlgorithmFactory& ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::instance ( ) [inline, static]

Static creator function.

Definition at line 63 of file export_algorithm_factory.hpp.

template<class AlgorithmBase , typename AlgorithmType >
ExportAlgorithmFactory& ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::operator= ( const ExportAlgorithmFactory< AlgorithmBase, AlgorithmType > &  ) [private]
template<class AlgorithmBase , typename AlgorithmType >
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.

template<class AlgorithmBase , typename AlgorithmType >
bool ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::unregisterAlgorithm ( const AlgorithmType &  id) [inline]

Function to unregister an algorithm.

Definition at line 83 of file export_algorithm_factory.hpp.


Member Data Documentation

template<class AlgorithmBase , typename AlgorithmType >
idToProductMap ExportAlgorithmFactory< AlgorithmBase, AlgorithmType >::associations_ [private]

Definition at line 112 of file export_algorithm_factory.hpp.


The documentation for this class was generated from the following file:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:23