ImFusion SDK 4.3
AlgorithmFactory::Descriptor Struct Reference

#include <ImFusion/Base/AlgorithmFactory.h>

Struct describing an algorithm registered with a factory. More...

Detailed Description

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 Member Functions

bool isEmpty () const
 Returns whether the descriptor has an empty id or represents a known entry in the underlying factory.
 
 operator bool () const
 Returns whether the descriptor represents a known entry in the underlying factory.
 

Public Attributes

std::string id
 Unique ID including module name.
 
std::string name
 GUI name including groups.
 
Flags< AlgorithmAttributesflags
 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.
 

Member Enumeration Documentation

◆ 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.


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