Loading [MathJax]/jax/input/TeX/config.js
Radium Engine  1.5.29
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Ra::Dataflow::Core::NodeFactoriesManager Namespace Reference

Functions

auto factory_manager () -> NodeFactorySet &
 Allow static initialization without init order problems.
 
auto register_factory (NodeFactorySet::mapped_type factory) -> bool
 Register a factory into the manager. The key will be fetched from the factory (its name)
 
auto create_factory (const NodeFactorySet::key_type &name) -> NodeFactorySet::mapped_type
 Create and register a factory to the manager.
 
auto factory (const NodeFactorySet::key_type &name) -> NodeFactorySet::mapped_type
 Gets the given factory from the manager.
 
auto unregister_factory (const NodeFactorySet::key_type &name) -> bool
 Unregister the factory from the manager.
 
auto default_factory () -> NodeFactorySet::mapped_type
 Gets the "default" factory for nodes exported by the Core dataflow library.
 

Detailed Description

Implement a NodeFactoryManager that stores a set of factories available to the system. Such a manager will be populated with Core::Dataflow node factories (Specialized sources, specialized sink, ...) and will allow users to register its own factories.

When creating or loading a graph, the set of needed factories should be added beforehand.

Note
: the factory name "DataFlowBuiltIns" is reserved and correspond to the base nodes available for each dataflow graph (Specialized sources, specialized sink, ...). This factory will be automatically added to all created factory set.

Function Documentation

◆ create_factory()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::create_factory ( const NodeFactorySet::key_type & name) -> NodeFactorySet::mapped_type

Create and register a factory to the manager.

Parameters
nameThe name of the factory to create
Returns
a configurable factory.

Definition at line 76 of file NodeFactory.cpp.

+ Here is the call graph for this function:

◆ default_factory()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::default_factory ( ) -> NodeFactorySet::mapped_type

Gets the "default" factory for nodes exported by the Core dataflow library.

Definition at line 97 of file NodeFactory.cpp.

+ Here is the call graph for this function:

◆ factory()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::factory ( const NodeFactorySet::key_type & name) -> NodeFactorySet::mapped_type

Gets the given factory from the manager.

Parameters
nameThe name of the factory to get
Returns
a shared_ptr to the requested factory, nullptr if the factory does not exist.

Definition at line 85 of file NodeFactory.cpp.

+ Here is the call graph for this function:

◆ factory_manager()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::factory_manager ( ) -> NodeFactorySet &

Allow static initialization without init order problems.

Returns
The manager singleton

Definition at line 67 of file NodeFactory.cpp.

◆ register_factory()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::register_factory ( NodeFactorySet::mapped_type factory) -> bool

Register a factory into the manager. The key will be fetched from the factory (its name)

Register a factory into the manager. The key will be fetched from the factory (its name)

Parameters
factory
Returns
true if the factory was registered, false if not (e.g. due to name collision).

Definition at line 72 of file NodeFactory.cpp.

+ Here is the call graph for this function:

◆ unregister_factory()

RA_DATAFLOW_CORE_API auto Ra::Dataflow::Core::NodeFactoriesManager::unregister_factory ( const NodeFactorySet::key_type & name) -> bool

Unregister the factory from the manager.

Parameters
nameThe name of the factory to unregister
Returns
true if the factory was unregistered, false if not (e.g. for names not being managed).

Definition at line 93 of file NodeFactory.cpp.

+ Here is the call graph for this function: