Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | List of all members
Pothos::BlockRegistry Class Reference

#include <BlockRegistry.hpp>

Public Member Functions

 BlockRegistry (const std::string &path, const Callable &factory)
 

Detailed Description

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);

Constructor & Destructor Documentation

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
paththe factory path begining with a slash ("/")
factorythe Callable factory function

The documentation for this class was generated from the following file: