Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::implementor::GraphNotifier Class Reference

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

#include "graph_notifier.h"

Inheritance diagram for hh::core::implementor::GraphNotifier:
Inheritance graph
Collaboration diagram for hh::core::implementor::GraphNotifier:
Collaboration graph

Public Member Functions

 GraphNotifier ()=default
 Default constructor.
 
 ~GraphNotifier () override=default
 Default destructor.
 
void initialize (abstraction::NotifierAbstraction *notifierAbstraction) override
 Redefine the implementor to do nothing, the graph do nothing by itself.
 
void addSlot (abstraction::SlotAbstraction *slot) override
 Add slot to the graph, add slot to all output nodes recursively.
 
void removeSlot (abstraction::SlotAbstraction *slot) override
 Remove slot to the graph, add slot to all output nodes recursively.
 
std::set< abstraction::SlotAbstraction * > const & connectedSlots () const override
 Do not use, a graph does not have slots by itself.
 
void notify () override
 Do not use, a graph does not notify.
 
void notifyAllTerminated () override
 Do not use, a graph does not notify.
 
- Public Member Functions inherited from hh::core::implementor::ImplementorNotifier
 ImplementorNotifier ()
 Default constructor.
 
virtual ~ImplementorNotifier ()=default
 Default destructor.
 
std::set< abstraction::NotifierAbstraction * > & notifiers ()
 Accessor to the linked NotifierAbstraction.
 
virtual void initialize (abstraction::NotifierAbstraction *notifierAbstraction)
 Initialize the implementor Notifier by setting the corresponding abstraction.
 
virtual std::set< abstraction::SlotAbstraction * > const & connectedSlots () const =0
 Accessor to the connected slots.
 
virtual void addSlot (abstraction::SlotAbstraction *slot)=0
 Add a slot to the connected slots.
 
virtual void removeSlot (abstraction::SlotAbstraction *slot)=0
 Remove a slot to the connected slots.
 
virtual void notify ()=0
 Notify the connected slots to wake up.
 
virtual void notifyAllTerminated ()=0
 Notify the connected slots that this notifier is terminated.
 

Additional Inherited Members

- Protected Attributes inherited from hh::core::implementor::ImplementorNotifier
std::unique_ptr< std::set< abstraction::NotifierAbstraction * > > abstractNotifiers_ = nullptr
 Set of linked NotifierAbstraction.
 

Detailed Description

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

Definition at line 31 of file graph_notifier.h.

Constructor & Destructor Documentation

◆ GraphNotifier()

hh::core::implementor::GraphNotifier::GraphNotifier ( )
explicitdefault

Default constructor.

◆ ~GraphNotifier()

hh::core::implementor::GraphNotifier::~GraphNotifier ( )
overridedefault

Default destructor.

Member Function Documentation

◆ addSlot()

void hh::core::implementor::GraphNotifier::addSlot ( abstraction::SlotAbstraction slot)
inlineoverridevirtual

Add slot to the graph, add slot to all output nodes recursively.

Parameters
slotSlot to add

Implements hh::core::implementor::ImplementorNotifier.

Definition at line 46 of file graph_notifier.h.

◆ connectedSlots()

std::set< abstraction::SlotAbstraction * > const & hh::core::implementor::GraphNotifier::connectedSlots ( ) const
inlineoverridevirtual

Do not use, a graph does not have slots by itself.

Returns
nothing throw a std::runtime_error
Exceptions
std::runtime_errorA graph has no connected connectedSlots by itself

Implements hh::core::implementor::ImplementorNotifier.

Definition at line 61 of file graph_notifier.h.

◆ initialize()

void hh::core::implementor::GraphNotifier::initialize ( abstraction::NotifierAbstraction notifierAbstraction)
inlineoverridevirtual

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

Parameters
notifierAbstractionAbstraction not used

Reimplemented from hh::core::implementor::ImplementorNotifier.

Definition at line 42 of file graph_notifier.h.

◆ notify()

void hh::core::implementor::GraphNotifier::notify ( )
inlineoverridevirtual

Do not use, a graph does not notify.

Exceptions
std::runtime_errorA graph has no slot to notify

Implements hh::core::implementor::ImplementorNotifier.

Definition at line 67 of file graph_notifier.h.

◆ notifyAllTerminated()

void hh::core::implementor::GraphNotifier::notifyAllTerminated ( )
inlineoverridevirtual

Do not use, a graph does not notify.

Exceptions
std::runtime_errorA graph has no slot to notify

Implements hh::core::implementor::ImplementorNotifier.

Definition at line 71 of file graph_notifier.h.

◆ removeSlot()

void hh::core::implementor::GraphNotifier::removeSlot ( abstraction::SlotAbstraction slot)
inlineoverridevirtual

Remove slot to the graph, add slot to all output nodes recursively.

Parameters
slotSlot to remove

Implements hh::core::implementor::ImplementorNotifier.

Definition at line 54 of file graph_notifier.h.