#include <Dataflow/Core/NodeFactory.hpp>
|
auto | add_factory (mapped_type factory) -> bool |
|
auto | has_factory (const key_type &name) -> Ra::Core::Utils::optional< mapped_type > |
| Test if a factory exists in the set with the given name.
|
|
auto | remove_factory (const key_type &name) -> bool |
| Remove the identified factory from the set.
|
|
auto | create_node (const std::string &nodeType, const nlohmann::json &data, DataflowGraph *owningGraph=nullptr) -> std::shared_ptr< Node > |
| Create a node using one of the functor (if it exists) registered in one factory for the given type name.
|
|
auto | begin () const -> const_iterator |
|
auto | end () const -> const_iterator |
|
auto | cbegin () const -> const_iterator |
|
auto | cend () const -> const_iterator |
|
auto | find (const key_type &key) const -> const_iterator |
|
auto | insert (value_type value) -> std::pair< iterator, bool > |
|
auto | erase (const key_type &key) -> size_t |
|
const std::string & | default_factory_name () |
|
NodeFactorySet store a set of NodeFactory, singleton managed with NodeFactoriesManager.
Definition at line 122 of file NodeFactory.hpp.
◆ const_iterator
using Ra::Dataflow::Core::NodeFactorySet::const_iterator = container_type::const_iterator |
◆ container_type
◆ iterator
using Ra::Dataflow::Core::NodeFactorySet::iterator = container_type::iterator |
◆ key_type
using Ra::Dataflow::Core::NodeFactorySet::key_type = container_type::key_type |
◆ mapped_type
using Ra::Dataflow::Core::NodeFactorySet::mapped_type = container_type::mapped_type |
◆ value_type
using Ra::Dataflow::Core::NodeFactorySet::value_type = container_type::value_type |
◆ add_factory()
auto Ra::Dataflow::Core::NodeFactorySet::add_factory |
( |
NodeFactorySet::mapped_type | factory | ) |
-> bool |
|
inline |
Add a factory to the set of factories available
- Parameters
-
- Returns
- true if the factory was inserted, false if the insertion was prevented by an already existing factory with the same name.
Definition at line 282 of file NodeFactory.hpp.
◆ begin()
auto Ra::Dataflow::Core::NodeFactorySet::begin |
( |
| ) |
const -> const_iterator |
|
inline |
◆ cbegin()
auto Ra::Dataflow::Core::NodeFactorySet::cbegin |
( |
| ) |
const -> const_iterator |
|
inline |
◆ cend()
auto Ra::Dataflow::Core::NodeFactorySet::cend |
( |
| ) |
const -> const_iterator |
|
inline |
◆ create_node()
Create a node using one of the functor (if it exists) registered in one factory for the given type name.
- Returns
- the created node, nullptr if there is no construction functor registered for the type.
- Parameters
-
nodeType | name of the node type (as simplified by Radium demangler) to create |
data | json data to fill the created node |
owningGraph | Graph in which the node should be added, if not nullptr. |
- Returns
- The created node, nullptr in case of failure
Definition at line 48 of file NodeFactory.cpp.
◆ default_factory_name()
const std::string & Ra::Dataflow::Core::NodeFactorySet::default_factory_name |
( |
| ) |
|
|
inline |
◆ end()
auto Ra::Dataflow::Core::NodeFactorySet::end |
( |
| ) |
const -> const_iterator |
|
inline |
◆ erase()
auto Ra::Dataflow::Core::NodeFactorySet::erase |
( |
const key_type & | key | ) |
-> size_t |
|
inline |
◆ find()
auto Ra::Dataflow::Core::NodeFactorySet::find |
( |
const key_type & | key | ) |
const -> const_iterator |
|
inline |
◆ has_factory()
auto Ra::Dataflow::Core::NodeFactorySet::has_factory |
( |
const key_type & | name | ) |
-> Ra::Core::Utils::optional<mapped_type> |
|
inline |
Test if a factory exists in the set with the given name.
- Parameters
-
name | The name of the factory to search for |
- Returns
- an optional that is empty (evaluates to false) if no factory exists with the given name or that contains the existing factory.
Definition at line 287 of file NodeFactory.hpp.
◆ insert()
auto Ra::Dataflow::Core::NodeFactorySet::insert |
( |
NodeFactorySet::value_type | value | ) |
-> std::pair<iterator, bool> |
|
inline |
◆ remove_factory()
auto Ra::Dataflow::Core::NodeFactorySet::remove_factory |
( |
const key_type & | name | ) |
-> bool |
|
inline |
Remove the identified factory from the set.
- Parameters
-
name | the name of the factory to remove |
- Returns
- true if the factory was removed, false if the factory does not exist in the set.
Definition at line 293 of file NodeFactory.hpp.
The documentation for this class was generated from the following files:
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Dataflow/Core/NodeFactory.hpp
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Dataflow/Core/NodeFactory.cpp