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

Default concrete implementation of slot interface. More...

#include "default_slot.h"

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

Public Member Functions

 DefaultSlot ()
 Default constructor.
 
 ~DefaultSlot () override=default
 Default destructor.
 
std::set< abstraction::NotifierAbstraction * > const & connectedNotifiers () const override
 Accessor to the connected notifiers.
 
bool hasNotifierConnected () const override
 Test if there is any notifiers connected.
 
void addNotifier (abstraction::NotifierAbstraction *const notifier) override
 Add a notifier to the list of connected notifiers.
 
void removeNotifier (abstraction::NotifierAbstraction *const notifier) override
 Remove a notifier to the list of connected notifiers.
 
- Public Member Functions inherited from hh::core::implementor::ImplementorSlot
 ImplementorSlot ()
 Default constructor.
 
virtual ~ImplementorSlot ()=default
 Default destructor.
 
std::set< abstraction::SlotAbstraction * > & slots ()
 Accessor to the linked SlotAbstraction.
 
virtual void initialize (abstraction::SlotAbstraction *slotAbstraction)
 Initialize the implementor Slot by setting the corresponding abstraction.
 
virtual std::set< abstraction::NotifierAbstraction * > const & connectedNotifiers () const =0
 Accessor to the connected notifiers.
 
virtual bool hasNotifierConnected () const =0
 Test if there is any notifiers connected.
 
virtual void addNotifier (abstraction::NotifierAbstraction *notifier)=0
 Add a notifier to the set of NotifierAbstraction.
 
virtual void removeNotifier (abstraction::NotifierAbstraction *notifier)=0
 Remove notifier to the set of NotifierAbstraction.
 

Private Attributes

std::unique_ptr< std::set< abstraction::NotifierAbstraction * > > const notifiers_ = nullptr
 List of notifiers linked to this slot.
 

Additional Inherited Members

- Protected Attributes inherited from hh::core::implementor::ImplementorSlot
std::unique_ptr< std::set< abstraction::SlotAbstraction * > > abstractSlots_ = nullptr
 Set of linked SlotAbstraction.
 

Detailed Description

Default concrete implementation of slot interface.

Definition at line 37 of file default_slot.h.

Constructor & Destructor Documentation

◆ DefaultSlot()

hh::core::implementor::DefaultSlot::DefaultSlot ( )
inlineexplicit

Default constructor.

Definition at line 44 of file default_slot.h.

◆ ~DefaultSlot()

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

Default destructor.

Member Function Documentation

◆ addNotifier()

void hh::core::implementor::DefaultSlot::addNotifier ( abstraction::NotifierAbstraction *const  notifier)
inlineoverridevirtual

Add a notifier to the list of connected notifiers.

Parameters
notifierNotifier to add to the list of connected notifiers

Implements hh::core::implementor::ImplementorSlot.

Definition at line 60 of file default_slot.h.

◆ connectedNotifiers()

std::set< abstraction::NotifierAbstraction * > const & hh::core::implementor::DefaultSlot::connectedNotifiers ( ) const
inlineoverridevirtual

Accessor to the connected notifiers.

Returns
A set of connected notifiers

Implements hh::core::implementor::ImplementorSlot.

Definition at line 52 of file default_slot.h.

◆ hasNotifierConnected()

bool hh::core::implementor::DefaultSlot::hasNotifierConnected ( ) const
inlineoverridevirtual

Test if there is any notifiers connected.

Returns
True if there is any, else false

Implements hh::core::implementor::ImplementorSlot.

Definition at line 56 of file default_slot.h.

◆ removeNotifier()

void hh::core::implementor::DefaultSlot::removeNotifier ( abstraction::NotifierAbstraction *const  notifier)
inlineoverridevirtual

Remove a notifier to the list of connected notifiers.

Parameters
notifierNotifier to remove from the list of connected notifiers

Implements hh::core::implementor::ImplementorSlot.

Definition at line 64 of file default_slot.h.

Member Data Documentation

◆ notifiers_

std::unique_ptr<std::set<abstraction::NotifierAbstraction *> > const hh::core::implementor::DefaultSlot::notifiers_ = nullptr
private

List of notifiers linked to this slot.

Definition at line 40 of file default_slot.h.