#include <ModuleRegistry.h>
Detailed Description
A registry containing a list of all available modules, along with registration data detailing modules' inputs, outputs and attributes.
Thread-safe.
Definition at line 43 of file ModuleRegistry.h.
Public Types | |
typedef std::function< ModuleRegistrationData()> | RegisterOp |
Public Member Functions | |
void | registerModule (RegisterOp registration_op) |
void | deregisterModule (const std::string &module_name) |
const ModuleRegistrationData & | find (const std::string &module_name) const override |
void | exportList (bool ignore_internal, ModuleList &list) const |
void | processRegistrations () |
Static Public Member Functions | |
static ModuleRegistry & | get () |
A singleton available at startup. | |
Member Function Documentation
◆ deregisterModule()
void momemta::ModuleRegistry::deregisterModule | ( | const std::string & | module_name | ) |
Deregister a module from the registry. If no such module is registered, nothing happens
- Parameters
-
module_name The name of the module to deregister
Definition at line 42 of file ModuleRegistry.cc.
Referenced by processRegistrations().
◆ exportList()
void momemta::ModuleRegistry::exportList | ( | bool | ignore_internal, |
ModuleList & | list | ||
) | const |
Fill list
with the list of all registered modules. Internal modules are ignored if ignore_internal
is true
- Parameters
-
ignore_internal If set to true, internal modules are ignored when filling the list list List of all registered modules. The list is cleared first.
Definition at line 69 of file ModuleRegistry.cc.
Referenced by MoMEMta::MoMEMta(), and lua::register_modules().
◆ find()
|
overridevirtual |
Find registration data of the module module_name
. If no such module exists, an exception is thrown
- Parameters
-
module_name The name of the module
- Returns
- Registration data associated to the module
Implements momemta::ModuleRegistryInterface.
Definition at line 49 of file ModuleRegistry.cc.
◆ processRegistrations()
void momemta::ModuleRegistry::processRegistrations | ( | ) |
Process the current list of deferred registration
Definition at line 83 of file ModuleRegistry.cc.
The documentation for this class was generated from the following files:
- include/momemta/ModuleRegistry.h
- core/src/registry/ModuleRegistry.cc