|
| | dag_fanout_node (const _dag_context &_context) |
| | This node uses data computed from the previous node to fan-out to it's children.
|
| |
|
| ~dag_fanout_node () |
| | Standard deconstructor.
|
| |
| void | fan_out (unique_ptr< Type > _data) |
| | Function to move data through the graph.
|
| |
| void | print (const string &_indent) |
| | Printing function.
|
| |
| template<typename In, typename Out> |
| expected< IDType, error_codes > | add_node_to_subdag (_internal_dag_node< In, Out, IDType > *_node_to_add, const IDType _onto, const IDType _parent_id) |
| | Recursively adds a node to children.
|
| |
template<typename Out, typename IDType>
class fn_dag::dag_fanout_node< Out, IDType >
Internal node to take data from parent and run children.
Every node when generating output will send it's output to the nodes children. All child nodes run with the output data being immutable.
template<typename Out, typename IDType>
template<typename In, typename Out>
| expected< IDType, error_codes > fn_dag::dag_fanout_node< Out, IDType >::add_node_to_subdag |
( |
_internal_dag_node< In, Out, IDType > * | _node_to_add, |
|
|
const IDType | _onto, |
|
|
const IDType | _parent_id ) |
|
inlinenodiscard |
Recursively adds a node to children.
This function will check whether the node attaches to the parent of this fan-out. If so, then it becomes a child of the parent function. If it did not attach to parent node, then it will recursively check its children until it finds it. If the parent isn't found, it will return false.
- Parameters
-
| _node_to_add | The node to add |
| _onto | The ID of the parent the node wants to attach to |
| _parent_id | The current ID of this nodes parent |
- Returns
- The parent ID if successfully added. Otherwise it returns an error code.
template<typename Out, typename IDType>
Function to move data through the graph.
This function will take data from the parent node and execute the subsequent functions with the data. After the subsequent nodes have been run, it deletes the data. The nodes will run on their own threads in the event that run_single_threaded is off. Otherwise, this function will block until the children are finished in a depth-first way.
- Parameters
-
| _data | Data from the parent node |