Base Framework
Public Member Functions | List of all members
Signal< SENDER, LISTENER > Class Template Reference

Signal dispatcher. More...

#include <base/Listener.h>

Inherits UnaryOperation< LISTENER *, void >.

Public Member Functions

 Signal (const Sender *_sender, Member _member) noexcept
 
 Signal (const Signal &copy) noexcept
 
void operator() (Listener *listener) const
 

Additional Inherited Members

- Public Types inherited from UnaryOperation< LISTENER *, void >
typedef LISTENER * Argument
 
typedef void Result
 

Detailed Description

template<class SENDER, class LISTENER>
class Signal< SENDER, LISTENER >

Signal dispatcher.

Class responsible for dispatching a signal to a listener.

Version
1.0

Constructor & Destructor Documentation

◆ Signal() [1/2]

template<class SENDER , class LISTENER >
Signal< SENDER, LISTENER >::Signal ( const Sender *  _sender,
Member  _member 
)
inlinenoexcept

Initializes the signal.

Parameters
senderThe sender.
memberThe end-point of the signal.

◆ Signal() [2/2]

template<class SENDER , class LISTENER >
Signal< SENDER, LISTENER >::Signal ( const Signal< SENDER, LISTENER > &  copy)
inlinenoexcept

Initialize signal from other signal.

Member Function Documentation

◆ operator()()

template<class SENDER , class LISTENER >
void Signal< SENDER, LISTENER >::operator() ( Listener listener) const
inline

Sends the signal.