DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::EventListenersBase Class Referenceabstract

Common base class for all managers of event listeners of type TypedEventListeners. ModuleBase instances are considered event listeners. More...

+ Inheritance diagram for DynExp::EventListenersBase:

Public Member Functions

virtual void Deregister (const ModuleBase &Listener, const std::chrono::milliseconds Timeout=std::chrono::milliseconds(0))=0
 Deregisters/unsubscribes module Listener from the event. Indirectly calls ModuleBase::RemoveRegisteredEvent(). More...
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Protected Member Functions

 EventListenersBase ()=default
 
virtual ~EventListenersBase ()
 
- Protected Member Functions inherited from Util::ILockable
 ILockable ()=default
 
 ~ILockable ()=default
 
LockType AcquireLock (const std::chrono::milliseconds Timeout=DefaultTimeout) const
 Locks the internal mutex. Blocks until the mutex is locked or until the timeout duration is exceeded. More...
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from Util::ILockable
static constexpr std::chrono::milliseconds DefaultTimeout = std::chrono::milliseconds(10)
 Duration which is used as a default timeout within all methods of this class if no different duration is passed to them. More...
 
- Protected Types inherited from Util::ILockable
using MutexType = std::timed_mutex
 
using LockType = std::unique_lock< MutexType >
 

Detailed Description

Common base class for all managers of event listeners of type TypedEventListeners. ModuleBase instances are considered event listeners.

Definition at line 865 of file Module.h.

Constructor & Destructor Documentation

◆ EventListenersBase()

DynExp::EventListenersBase::EventListenersBase ( )
protecteddefault

◆ ~EventListenersBase()

virtual DynExp::EventListenersBase::~EventListenersBase ( )
inlineprotectedvirtual

Definition at line 869 of file Module.h.

Member Function Documentation

◆ Deregister()

virtual void DynExp::EventListenersBase::Deregister ( const ModuleBase Listener,
const std::chrono::milliseconds  Timeout = std::chrono::milliseconds(0) 
)
pure virtual

Deregisters/unsubscribes module Listener from the event. Indirectly calls ModuleBase::RemoveRegisteredEvent().

Parameters
ListenerModule to deregister/unsubscribe.
TimeoutTime to wait for locking the mutex of this EventListenersBase instance.

Implemented in DynExp::TypedEventListeners< EventFuncArgs >.


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