Specialization of FunctionalNode in which _function is a python callable object.
More...
#include <functional_node.h>
|
void | createEdge (const std::string &port_id, Port *out_port) override |
| Create an edge in the graph between this node 'port_id' input port and o_port. More...
|
|
void | configure () override |
| Configure this node. More...
|
|
Specialization of FunctionalNode in which _function is a python callable object.
_function can have a variable number of inputs and outputs between 0 and input_s/output_s
◆ PythonFunctionalNode()
PythonFunctionalNode::PythonFunctionalNode |
( |
const std::string & |
id, |
|
|
const boost::python::list & |
o_ports, |
|
|
FunctionalNodePolicies::ExecutionPolicy |
policy = FunctionalNodePolicies::ExecutionPolicy::ON_NEW_INPUT |
|
) |
| |
|
inline |
◆ configure()
void PythonFunctionalNode::configure |
( |
| ) |
|
|
inlineoverrideprotected |
◆ createEdge()
void PythonFunctionalNode::createEdge |
( |
const std::string & |
port_id, |
|
|
Port * |
out_port |
|
) |
| |
|
inlineoverrideprotected |
Create an edge in the graph between this node 'port_id' input port and o_port.
◆ getOrRegisterInput()
template<typename T_IN , size_t N = 0>
InputPort<T_IN, bpy::object>* PythonFunctionalNode::getOrRegisterInput |
( |
const std::string & |
id | ) |
|
|
inline |
Safely get or register an input port.
◆ getOutput()
template<size_t N = 0>
OutputPort<bpy::object>* PythonFunctionalNode::getOutput |
( |
const std::string & |
id | ) |
|
|
inline |
Safely get an output port.
◆ pySetup()
boost::python::object PythonFunctionalNode::pySetup |
( |
boost::python::object |
obj | ) |
|
|
inline |
Setup this node with a python callable object and registers it to ComputationalGraphManager.
After calling this function the object is moved into a shared pointer which is returned by the function. Afterwards this object shouldn't be used. Use the returned shared pointer.
It is meant to be used as call function in a Python decorator which creates a PythonFunctionalNode from a given Python function
◆ registerOutput()
template<size_t N = 0>
OutputPort<bpy::object>* PythonFunctionalNode::registerOutput |
( |
const std::string & |
id | ) |
|
|
inline |
Safely registers an output port.
◆ ComputationalGraphPythonNodes_PYTHON_FUNCTIONAL_NODE_Test
friend class ComputationalGraphPythonNodes_PYTHON_FUNCTIONAL_NODE_Test |
|
friend |
The documentation for this class was generated from the following file: