NRP Core  1.4.1
FunctionalNodeFactory Class Reference

Creates an instance of FunctionalNode with the right template given a function signature. More...

#include <functional_node_factory.h>

Static Public Member Functions

template<size_t in_n, size_t out_n, typename... args>
static auto create (const std::string &id, std::function< bool(args...)> f, FunctionalNodePolicies::ExecutionPolicy policy=FunctionalNodePolicies::ExecutionPolicy::ON_NEW_INPUT)
 Instantiates a FunctionalNode. More...
 

Detailed Description

Creates an instance of FunctionalNode with the right template given a function signature.

It hides all the complexity related with specifying correctly FunctionalNode template and performs function signature checking ensuring that the instantiated FunctionalNode is correct

Member Function Documentation

◆ create()

template<size_t in_n, size_t out_n, typename... args>
static auto FunctionalNodeFactory::create ( const std::string &  id,
std::function< bool(args...)>  f,
FunctionalNodePolicies::ExecutionPolicy  policy = FunctionalNodePolicies::ExecutionPolicy::ON_NEW_INPUT 
)
inlinestatic

Instantiates a FunctionalNode.

It takes as template parameters the number of inputs 'in_n' and outputs 'out_n' and a parameter pack containing the function arguments


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