functional-dag
Loading...
Searching...
No Matches
Public Member Functions | List of all members
fn_dag::dag_node< In, Out > Class Template Referenceabstract

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

#include <dag_interface.hpp>

Inherited by fn_dag::__dag_node< In, Out >.

Public Member Functions

virtual ~dag_node ()=default
 Default constructor.
 
virtual Outupdate (const In *_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 Out * fn_dag::dag_node< In, Out >::update ( const In _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.