Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::implementor::GraphSender< Output > Class Template Reference

Default concrete implementation of the sender abstraction for the graph core. More...

#include "graph_sender.h"

Inheritance diagram for hh::core::implementor::GraphSender< Output >:
Inheritance graph
Collaboration diagram for hh::core::implementor::GraphSender< Output >:
Collaboration graph

Public Member Functions

 GraphSender ()=default
 Default constructor.
 
virtual ~GraphSender ()=default
 Default destructor.
 
void initialize (abstraction::SenderAbstraction< Output > *senderAbstraction) override
 Redefine the implementor to do nothing, the graph do nothing by itself.
 
std::set< abstraction::ReceiverAbstraction< Output > * > const & connectedReceivers () const override
 Do nothing, throw an error, a graph is not really connected to other nodes.
 
void addReceiver (abstraction::ReceiverAbstraction< Output > *receiver) override
 Add receiver node to graph's output node.
 
void removeReceiver (abstraction::ReceiverAbstraction< Output > *receiver) override
 Remove receiver node to graph's output node.
 
void send (std::shared_ptr< Output > data) override
 Do nothing, throw an error, a graph is not really connected to other nodes.
 
- Public Member Functions inherited from hh::core::implementor::ImplementorSender< Output >
 ImplementorSender ()
 Default constructor.
 
virtual ~ImplementorSender ()=default
 Default destructor.
 
std::set< abstraction::SenderAbstraction< Output > * > & senders ()
 Accessor to the SenderAbstraction.
 
virtual void initialize (abstraction::SenderAbstraction< Output > *senderAbstraction)
 Initialize the implementor Sender by setting the corresponding abstraction.
 
virtual std::set< abstraction::ReceiverAbstraction< Output > * > const & connectedReceivers () const =0
 Accessor to the connected receivers.
 
virtual void addReceiver (abstraction::ReceiverAbstraction< Output > *receiver)=0
 Add a receiver to the set of connected receivers.
 
virtual void removeReceiver (abstraction::ReceiverAbstraction< Output > *receiver)=0
 Remove a receiver to the set of connected receivers.
 
virtual void send (std::shared_ptr< Output > data)=0
 Send a data to successor node.
 

Additional Inherited Members

- Protected Attributes inherited from hh::core::implementor::ImplementorSender< Output >
std::unique_ptr< std::set< abstraction::SenderAbstraction< Output > * > > abstractSenders_ = nullptr
 Linked SenderAbstraction.
 

Detailed Description

template<class Output>
class hh::core::implementor::GraphSender< Output >

Default concrete implementation of the sender abstraction for the graph core.

Template Parameters
OutputOutput type

Definition at line 32 of file graph_sender.h.

Constructor & Destructor Documentation

◆ GraphSender()

template<class Output >
hh::core::implementor::GraphSender< Output >::GraphSender ( )
explicitdefault

Default constructor.

◆ ~GraphSender()

template<class Output >
virtual hh::core::implementor::GraphSender< Output >::~GraphSender ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ addReceiver()

template<class Output >
void hh::core::implementor::GraphSender< Output >::addReceiver ( abstraction::ReceiverAbstraction< Output > *  receiver)
inlineoverridevirtual

Add receiver node to graph's output node.

Parameters
receiverReceiver node to add to graph's output node

Implements hh::core::implementor::ImplementorSender< Output >.

Definition at line 54 of file graph_sender.h.

◆ connectedReceivers()

template<class Output >
std::set< abstraction::ReceiverAbstraction< Output > * > const & hh::core::implementor::GraphSender< Output >::connectedReceivers ( ) const
inlineoverridevirtual

Do nothing, throw an error, a graph is not really connected to other nodes.

Exceptions
std::runtime_errorA graph has no connected ReceiverAbstraction by itself.
Returns
Nothing, throw an error

Implements hh::core::implementor::ImplementorSender< Output >.

Definition at line 48 of file graph_sender.h.

◆ initialize()

template<class Output >
void hh::core::implementor::GraphSender< Output >::initialize ( abstraction::SenderAbstraction< Output > *  senderAbstraction)
inlineoverridevirtual

Redefine the implementor to do nothing, the graph do nothing by itself.

Parameters
senderAbstractionAbstraction not used

Reimplemented from hh::core::implementor::ImplementorSender< Output >.

Definition at line 43 of file graph_sender.h.

◆ removeReceiver()

template<class Output >
void hh::core::implementor::GraphSender< Output >::removeReceiver ( abstraction::ReceiverAbstraction< Output > *  receiver)
inlineoverridevirtual

Remove receiver node to graph's output node.

Parameters
receiverReceiver node to remove to graph's output node

Implements hh::core::implementor::ImplementorSender< Output >.

Definition at line 60 of file graph_sender.h.

◆ send()

template<class Output >
void hh::core::implementor::GraphSender< Output >::send ( std::shared_ptr< Output >  data)
inlineoverridevirtual

Do nothing, throw an error, a graph is not really connected to other nodes.

Parameters
datanot used data
Exceptions
std::runtime_errorA graph has no connected ReceiverAbstraction by itself.

Implements hh::core::implementor::ImplementorSender< Output >.

Definition at line 67 of file graph_sender.h.