NRP Core  1.4.1
InputPort< T_IN, T_OUT > Class Template Reference

Implementation of an input port in the computation graph. More...

#include <input_port.h>

Inheritance diagram for InputPort< T_IN, T_OUT >:
Port

Public Member Functions

 InputPort (const std::string &id, ComputationalNode *parent, std::function< void(const T_OUT *)> callback, std::size_t maxSubs=0)
 Constructor. More...
 
void subscribeTo (OutputPort< T_IN > *port)
 Subscribes this port to an OutputPort 'port'. More...
 
size_t subscriptionsSize () override
 Return the number ports this port is subscribed to. More...
 
size_t subscriptionsMax ()
 Return the number ports this port is subscribed to. More...
 
- Public Member Functions inherited from Port
 Port ()=delete
 
virtual ~Port ()=default
 
 Port (std::string id, ComputationalNode *parent)
 Constructor. More...
 
const std::string & id ()
 Returns the port 'id'. More...
 
ComputationalNodeparent () const
 Returns the port parent node. More...
 

Detailed Description

template<class T_IN, class T_OUT>
class InputPort< T_IN, T_OUT >

Implementation of an input port in the computation graph.

It converts and passes incoming msgs using a callback function

Constructor & Destructor Documentation

◆ InputPort()

template<class T_IN , class T_OUT >
InputPort< T_IN, T_OUT >::InputPort ( const std::string &  id,
ComputationalNode parent,
std::function< void(const T_OUT *)>  callback,
std::size_t  maxSubs = 0 
)
inline

Constructor.

Member Function Documentation

◆ subscribeTo()

template<class T_IN , class T_OUT >
void InputPort< T_IN, T_OUT >::subscribeTo ( OutputPort< T_IN > *  port)
inline

Subscribes this port to an OutputPort 'port'.

◆ subscriptionsMax()

template<class T_IN , class T_OUT >
size_t InputPort< T_IN, T_OUT >::subscriptionsMax ( )
inline

Return the number ports this port is subscribed to.

◆ subscriptionsSize()

template<class T_IN , class T_OUT >
size_t InputPort< T_IN, T_OUT >::subscriptionsSize ( )
inlineoverridevirtual

Return the number ports this port is subscribed to.

Implements Port.


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