#include <BlockRegistry.hpp>
|
template<typename... ArgsType> |
static Proxy | make (const std::string &path, ArgsType &&...args) |
|
The BlockRegistry class registers factories for topological elements. These elements include Blocks and sub-Topologies (hierarchies of elements). A BlockRegistry can be created at static initialization time so that modules providing blocks will automatically register. Usage example (put this at the bottom of your c++ source file) static Pothos::BlockRegistry registerMyBlock("/my/factory/path", &MyBlock::make);
Pothos::BlockRegistry::BlockRegistry |
( |
const std::string & |
path, |
|
|
const Callable & |
factory |
|
) |
| |
Register a factory function into the plugin registry. The resulting factory path will be /blocks/path. Example: a path of /foo/bar will register to /blocks/foo/bar.
Because this call is used at static initialization time, it does not throw. However, registration errors are logged, and the block will not be available at runtime.
The return type of the call must be Block* or Topology*.
- Parameters
-
path | the factory path begining with a slash ("/") |
factory | the Callable factory function |
template<typename... ArgsType>
static Proxy Pothos::BlockRegistry::make |
( |
const std::string & |
path, |
|
|
ArgsType &&... |
args |
|
) |
| |
|
static |
Instantiate a block given the factory path and arguments.
- Parameters
-
path | the factory path begining with a slash ("/") |
args | a variable number of factory arguments |
- Returns
- the newly created block instance as a Proxy
template<typename... ArgsType>
Pothos::Proxy Pothos::BlockRegistry::make |
( |
const std::string & |
path, |
|
|
ArgsType &&... |
args |
|
) |
| |
The documentation for this class was generated from the following file: