ImFusion SDK 4.3
AlgorithmControllerFactory Class Referenceabstract

#include <ImFusion/Base/AlgorithmControllerFactory.h>

Interface for algorithm controller factories. More...

+ Inheritance diagram for AlgorithmControllerFactory:

Detailed Description

Interface for algorithm controller factories.

Examples
StreamAlgorithmFactory.cpp.

Public Member Functions

 AlgorithmControllerFactory ()
 
 AlgorithmControllerFactory (std::string module, bool checkLicense=true)
 
virtual AlgorithmControllercreate (Algorithm *a) const =0
 Create controller for a given algorithm instance if possible.
 
DataControllercreateDataController (const std::string &id, const DataList &data) const
 Create data controller.
 
virtual std::vector< std::stringcompatibleDataControllers (const DataList &data) const
 Return list of data controllers compatible with input data. The list contains the data controller id.
 
std::vector< std::stringdataControllerNames () const
 Return all registered algorithm names.
 
template<class T>
void registerDataController (const std::string &name)
 Register data controller. Categories are specified by separating them from the name with ; as separator (e.g. Filters;Gaussian)
 
void unregisterAllDataControllers ()
 Unregister all data controller of this factory.
 
- Public Member Functions inherited from FactoryBase
 FactoryBase ()
 No license check is performed for the module instantiated with this constructor.
 
 FactoryBase (std::string module, bool checkLicense=true)
 
std::string moduleName () const
 Returns the module name of the factory.
 

Protected Types

typedef std::function< std::string(const DataList &data, const std::string &id, DataController **a)> createCompatibleFunc
 

Protected Attributes

std::vector< createCompatibleFuncm_dataControllers
 
std::unordered_map< std::type_index, std::stringm_dataControllerNames
 
- Protected Attributes inherited from FactoryBase
std::string m_factoryModule
 
bool m_checkLicense
 

Additional Inherited Members

- Protected Member Functions inherited from FactoryBase
virtual ~FactoryBase ()
 Virtual destructor.
 
std::string getComponentPath (const std::string &componentName) const
 Returns the path to the component referred to by name.
 
bool isLicensed (const std::string &name)
 Return true if the license allows the use of the component referred to by name.
 
- Static Protected Member Functions inherited from FactoryBase
static std::string getComponentPath (const std::string &moduleName, const std::string &componentName)
 Returns the path to the component referred to by name.
 
static bool isLicensed (const std::string &moduleName, const std::string &name)
 Return true if the license allows the use of the component referred to by name.
 

Constructor & Destructor Documentation

◆ AlgorithmControllerFactory()

Deprecated
"Use controller factory with a module name."

Member Function Documentation

◆ create()

◆ createDataController()

DataController * createDataController ( const std::string & id,
const DataList & data ) const

Create data controller.

Parameters
idalgorithm identifier
datainput data
Returns
pointer to generated algorithm if successful, zero otherwise

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close