Xrb::SignalSenderBase Class Reference

Base class for SignalSender*. More...

#include <xrb_signalhandler.hpp>

Inheritance diagram for Xrb::SignalSenderBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~SignalSenderBase ()
 Boring destructor.
bool IsBlocking () const
 Signal/callback blocking state accessor.
SignalHandlerOwner () 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.


Detailed Description

Base class for SignalSender*.

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.

Note:
This should be used only by SignalHandler and SignalSender*.

Definition at line 59 of file xrb_signalhandler.hpp.


Constructor & Destructor Documentation

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.

Parameters:
owner The SignalHandler that this SignalSenderBase belongs to.

Definition at line 20 of file xrb_signalhandler.cpp.

References Xrb::SignalHandler::AddSender().


Member Function Documentation

bool Xrb::SignalSenderBase::IsBlocking (  )  const [inline]

Signal/callback blocking state accessor.

Returns:
True iff this SignalSender* is disallowing outgoing signals.

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.

Returns:
The owning SignalHandler object.

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.

Parameters:
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().


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8