#include <xrb_signalhandler.hpp>
Public Member Functions | |
virtual | ~SignalSenderBase () |
Boring destructor. | |
bool | IsBlocking () const |
Signal/callback blocking state accessor. | |
SignalHandler * | Owner () const |
Accessor of the SignalHandler object which owns this SignalSender*. This object should be a member variable of its owner. | |
void | SetIsBlocking (bool is_blocking) |
Signal blocking state modifier. | |
virtual void | DetachAll () const =0 |
Detaches all attached SignalReceiver*s. | |
Protected Member Functions | |
SignalSenderBase (SignalHandler *owner) | |
Constructs a SignalSenderBase object. |
Contains an interface method to detach all attachments, for use by SignalHandler.
Also provides the means to refer to differently template-typed subclasses via a common parent class (SignalHandler keeps a list of all of its added SignalSender*s).
A SignalSender subclass should be used as a member variable of the SignalHandler-derived class it is being used in. This is done to ensure that the life of the SignalSender coincides with the life of the SignalHandler (so that it is available to attach to during the entire life of the owning SignalHandler, and that it detaches all of its attachments precisely upon the destruction of its SignalHandler owner.
Definition at line 59 of file xrb_signalhandler.hpp.
Xrb::SignalSenderBase::SignalSenderBase | ( | SignalHandler * | owner | ) | [protected] |
Constructs a SignalSenderBase object.
Adds this SignalSender* object to the SignalHandler owner
.
This constructor is protected so that SignalSenderBase can only be used by subclassing it.
owner | The SignalHandler that this SignalSenderBase belongs to. |
Definition at line 20 of file xrb_signalhandler.cpp.
References Xrb::SignalHandler::AddSender().
bool Xrb::SignalSenderBase::IsBlocking | ( | ) | const [inline] |
Signal/callback blocking state accessor.
Definition at line 70 of file xrb_signalhandler.hpp.
SignalHandler* Xrb::SignalSenderBase::Owner | ( | ) | const [inline] |
Accessor of the SignalHandler object which owns this SignalSender*. This object should be a member variable of its owner.
Definition at line 79 of file xrb_signalhandler.hpp.
void Xrb::SignalSenderBase::SetIsBlocking | ( | bool | is_blocking | ) | [inline] |
Signal blocking state modifier.
A SignalSender* can block signals on a per-SignalSender* basis. A SignalSender* that is blocked will not call its attached SignalReceiver*s' callbacks.
is_blocking | The signal blocking state to assign. |
Definition at line 90 of file xrb_signalhandler.hpp.
virtual void Xrb::SignalSenderBase::DetachAll | ( | ) | const [pure virtual] |
Detaches all attached SignalReceiver*s.
Causes the attached SignalReceiver*s to detach from this SignalSender.
Referenced by Xrb::SignalHandler::DetachAll().