#include <Algorithm.h>
Factory to create an algorithm.
Definition at line 243 of file Algorithm.h.
|
static bool | Register (std::string const &name, algo_creator_t creator, std::vector< std::string > const new_banks={}) noexcept |
|
static algo_t | Create (std::string const &name) noexcept(false) |
|
static std::optional< std::vector< std::string > > | QueryNewBank (std::string const &bank_name) noexcept |
|
◆ algo_creator_t
◆ Create()
static algo_t iguana::AlgorithmFactory::Create |
( |
std::string const & | name | ) |
|
|
static |
Create an algorithm. Throws an exception if the algorithm cannot be created
- Parameters
-
- Returns
- the algorithm instance
◆ QueryNewBank()
static std::optional< std::vector< std::string > > iguana::AlgorithmFactory::QueryNewBank |
( |
std::string const & | bank_name | ) |
|
|
staticnoexcept |
Check if a bank is created by an algorithm
- Parameters
-
bank_name | the name of the bank |
- Returns
- the list of algorithms which create it, if any
◆ Register()
static bool iguana::AlgorithmFactory::Register |
( |
std::string const & | name, |
|
|
algo_creator_t | creator, |
|
|
std::vector< std::string > const | new_banks = {} ) |
|
staticnoexcept |
Register an algorithm with a unique name. Algorithms register themselves by calling this function.
- Parameters
-
name | the name of the algorithm (not equivalent to Object::m_name ) |
creator | the creator function |
new_banks | if this algorithm creates new banks, list them here |
- Returns
- true if the algorithm has not yet been registered
The documentation for this class was generated from the following file:
- /__w/iguana/iguana/iguana_src/src/iguana/algorithms/Algorithm.h