Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs > Class Template Reference

Output management abstraction for the grpah. More...

#include "graph_outputs_management_abstraction.h"

Inheritance diagram for hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >:
Inheritance graph
Collaboration diagram for hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >:
Collaboration graph

Public Types

using outputs_t = std::tuple< Outputs... >
 Accessor to the output types.
 

Public Member Functions

 GraphOutputsManagementAbstraction ()
 Default constructor.
 
 ~GraphOutputsManagementAbstraction () override=default
 Default destructor.
 
auto getBlockingResult ()
 Get a blocking result for the outer graph from the sink.
 
- Public Member Functions inherited from hh::core::abstraction::NotifierAbstraction
 NotifierAbstraction (std::shared_ptr< implementor::ImplementorNotifier > notifier)
 Constructor utilising a concrete implementation.
 
virtual ~NotifierAbstraction ()=default
 Default destructor.
 
std::set< NotifierAbstraction * > const & notifiers () const
 Const accessor to notifiers.
 
std::set< NotifierAbstraction * > & notifiers ()
 Accessor to notifiers.
 
void addSlot (SlotAbstraction *const slot)
 Add a SlotAbstraction to this notifier.
 
void removeSlot (SlotAbstraction *const slot)
 Remove SlotAbstraction from this notifier.
 
std::set< SlotAbstraction * > const & connectedSlots () const
 Accessor to the slots attached to this notifier.
 
void notify ()
 Notify a slot to wake up.
 
void notifyAllTerminated ()
 Notifier all slots that this node is terminated.
 
- Public Member Functions inherited from hh::core::abstraction::SenderAbstraction< Outputs >
 SenderAbstraction (std::shared_ptr< implementor::ImplementorSender< Outputs > > concreteSender)
 Constructor using the concrete implementation.
 
virtual ~SenderAbstraction ()=default
 Default destructor.
 
std::set< SenderAbstraction< Outputs > * > const & senders () const
 Const accessor to senders.
 
std::set< SenderAbstraction< Outputs > * > & senders ()
 Accessor to senders.
 
std::set< ReceiverAbstraction< Outputs > * > const & connectedReceivers () const
 Accessor to the receivers attached to this SenderAbstraction.
 
void addReceiver (ReceiverAbstraction< Outputs > *const receiver)
 Add a ReceiverAbstraction.
 
void removeReceiver (ReceiverAbstraction< Outputs > *const receiver)
 Remove a ReceiverAbstraction.
 
void send (std::shared_ptr< Outputs > data)
 Send a data as output of the node.
 

Protected Member Functions

std::unique_ptr< GraphSink< Outputs... > > const & sink () const
 Accessor to the graph's sink.
 
template<class OutputDataType >
void addOutputNodeToGraph (NodeAbstraction *const outputNode)
 Add an output node in the graph.
 
void disconnectSink ()
 Disconnect the sink.
 
void printSink (Printer *printer)
 Visit the sink.
 
void duplicateSinkEdges (GraphOutputsManagementAbstraction< Outputs... > const &rhs, std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping)
 Duplicate sink edges.
 
void duplicateOutputEdges (std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping)
 Duplicate output edges.
 
- Protected Member Functions inherited from hh::core::abstraction::NotifierAbstraction
void duplicateEdgeNotifier (std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping)
 Duplicate edges of the current notifier to slots to clone in map.
 
- Protected Member Functions inherited from hh::core::abstraction::SenderAbstraction< Outputs >
void copyInnerStructure (SenderAbstraction< Outputs > *copyableCore)
 Copy inner structure of the sender to this one.
 
void duplicateEdgeSender (std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping)
 Duplicate edges of the current sender to receiver to clone in map.
 

Private Member Functions

template<class Output >
void disconnectSinkFromSender ()
 Disconnect the sink from the graph's output senders.
 
template<class Output >
void duplicateSinkEdge (GraphOutputsManagementAbstraction< Outputs... > const &rhs, std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &correspondenceMap)
 Duplicate sink edge.
 

Private Attributes

std::unique_ptr< GraphSink< Outputs... > > sink_ = nullptr
 Graph's sink.
 

Detailed Description

template<class ... Outputs>
class hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >

Output management abstraction for the grpah.

Template Parameters
OutputsTypes of output data

Definition at line 45 of file graph_outputs_management_abstraction.h.

Member Typedef Documentation

◆ outputs_t

template<class ... Outputs>
using hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::outputs_t = std::tuple<Outputs...>

Accessor to the output types.

Definition at line 52 of file graph_outputs_management_abstraction.h.

Constructor & Destructor Documentation

◆ GraphOutputsManagementAbstraction()

template<class ... Outputs>
hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::GraphOutputsManagementAbstraction ( )
inline

Default constructor.

Definition at line 55 of file graph_outputs_management_abstraction.h.

◆ ~GraphOutputsManagementAbstraction()

template<class ... Outputs>
hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::~GraphOutputsManagementAbstraction ( )
overridedefault

Default destructor.

Member Function Documentation

◆ addOutputNodeToGraph()

template<class ... Outputs>
template<class OutputDataType >
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::addOutputNodeToGraph ( NodeAbstraction *const  outputNode)
inlineprotected

Add an output node in the graph.

Template Parameters
OutputDataTypeType used to connect a node
Parameters
outputNodeNode to connect as output of the graph for the type OutputDataType

Definition at line 77 of file graph_outputs_management_abstraction.h.

Here is the call graph for this function:

◆ disconnectSink()

template<class ... Outputs>
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::disconnectSink ( )
inlineprotected

Disconnect the sink.

Definition at line 103 of file graph_outputs_management_abstraction.h.

Here is the call graph for this function:

◆ disconnectSinkFromSender()

template<class ... Outputs>
template<class Output >
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::disconnectSinkFromSender ( )
inlineprivate

Disconnect the sink from the graph's output senders.

Template Parameters
OutputType to disconnect from

Definition at line 146 of file graph_outputs_management_abstraction.h.

Here is the call graph for this function:

◆ duplicateOutputEdges()

template<class ... Outputs>
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::duplicateOutputEdges ( std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  mapping)
inlineprotected

Duplicate output edges.

Parameters
mappingMap from the nodes and their clones

Definition at line 137 of file graph_outputs_management_abstraction.h.

Here is the call graph for this function:

◆ duplicateSinkEdge()

template<class ... Outputs>
template<class Output >
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::duplicateSinkEdge ( GraphOutputsManagementAbstraction< Outputs... > const &  rhs,
std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  correspondenceMap 
)
inlineprivate

Duplicate sink edge.

Template Parameters
OutputType to duplicate
Parameters
rhsGraph to copy edges from
correspondenceMapMap from the nodes and their clones

Definition at line 164 of file graph_outputs_management_abstraction.h.

Here is the call graph for this function:

◆ duplicateSinkEdges()

template<class ... Outputs>
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::duplicateSinkEdges ( GraphOutputsManagementAbstraction< Outputs... > const &  rhs,
std::map< abstraction::NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  mapping 
)
inlineprotected

Duplicate sink edges.

Parameters
rhsGraph to copy edges from
mappingMap from the nodes and their clones

Definition at line 130 of file graph_outputs_management_abstraction.h.

◆ getBlockingResult()

template<class ... Outputs>
auto hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::getBlockingResult ( )
inline

Get a blocking result for the outer graph from the sink.

Returns
An output data

Definition at line 66 of file graph_outputs_management_abstraction.h.

◆ printSink()

template<class ... Outputs>
void hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::printSink ( Printer printer)
inlineprotected

Visit the sink.

Parameters
printerPrinter visits gathering data from the nodes

Definition at line 121 of file graph_outputs_management_abstraction.h.

◆ sink()

template<class ... Outputs>
std::unique_ptr< GraphSink< Outputs... > > const & hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::sink ( ) const
inlineprotected

Accessor to the graph's sink.

Returns
The sink

Definition at line 71 of file graph_outputs_management_abstraction.h.

Member Data Documentation

◆ sink_

template<class ... Outputs>
std::unique_ptr<GraphSink < Outputs...> > hh::core::abstraction::GraphOutputsManagementAbstraction< Outputs >::sink_ = nullptr
private

Graph's sink.

Definition at line 49 of file graph_outputs_management_abstraction.h.