functional-dag
Loading...
Searching...
No Matches
fn_dag::dag_node< In, Out > Class Template Referenceabstract

Interface for all external "mapping" lambdas. More...

#include <dag_interface.hpp>

Public Member Functions

virtual ~dag_node ()=default
 Default constructor.
 
virtual unique_ptr< Out > update (const In *const _data)=0
 Translator function.
 

Detailed Description

template<typename In, typename Out>
class fn_dag::dag_node< In, Out >

Interface for all external "mapping" lambdas.

All nodes simply "translate" input data to output data.

Note: Do not try to manage the output data. Since it is a pointer, it is passed between nodes and then deleted by the dag manager.

Member Function Documentation

◆ update()

template<typename In, typename Out>
virtual unique_ptr< Out > fn_dag::dag_node< In, Out >::update ( const In *const _data)
pure virtual

Translator function.

This function translates the input data to the output data. The pointer data should be on the heap and should be allocated with new.

Parameters
_dataThe data to use to generate the output data
Returns
Data out, just allocated on the heap with new.