![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/AlgorithmFactory.h>
Struct describing an algorithm registered with a factory. More...
Struct describing an algorithm registered with a factory.
along with functions to create it and check compatibility. A default constructed descriptor has create and isCompatible functions that always return nullptr and false respectively. An empty descriptor implicitly casts to false, i.e. can check if a descriptor is valid with if (descriptor).
Public Types | |
| enum | AlgorithmAttributes { Internal = 1 << 0 , Experimental = 1 << 1 , Priority = 1 << 2 } |
| Bitflag enumeration of factory attributes for a registered Algorithm. More... | |
Public Attributes | |
| std::string | id |
| Unique ID including module name. | |
| std::string | name |
| GUI name including groups. | |
| Flags< AlgorithmAttributes > | flags |
| List of factory attributes for the underlying algorithm. | |
| bool | isIoAlgorithm = false |
| Flag whether the algorithm is an I/O algorithm. | |
| std::function< std::unique_ptr< Algorithm >(const DataList &)> | create = [](const DataList&) { return nullptr; } |
| Function for instantiating the algorithm. | |
| std::function< bool(const DataList &)> | isCompatible = [](const DataList&) { return false; } |
| Function for checking compatibility with the given data. | |
| enum AlgorithmAttributes |
Bitflag enumeration of factory attributes for a registered Algorithm.
| Enumerator | |
|---|---|
| Internal | Whether the algorithm is internal. |
| Experimental | Whether the algorithm is experimental. |
| Priority | Whether the algorithm should be shown at the top of the list. |