SigSlot::Connection Class Reference

#include <Connection.hxx>

List of all members.


Detailed Description

Class that model connections between signals and slots.

This class model the concept of signal and slot connection i.e. the knowledge a signal has about who it has to notify whenever the client invoke the Emit( ) method on a Signal object. Also it becomes the passage through the Slot::Unbind method can access the bound signals to disconnect them. Each time a Signal and a Slot are bound together a Connection object is created, being tagged by a Global Unique IDenfier ( GUID ). These GUID's are reused whenever the Connection object holding it is destroyed.

See also:
Signal, Signalv0, Signalv1, Signalv2, Signalv3, Signalv4

Slot, Slotv0, Slotv1, Slotv2, Slotv3, Slotv4

Definition at line 46 of file Connection.hxx.


Public Types

typedef unsigned tConnectionId
 Type declaration for the ConnectionId.

Public Member Functions

 Connection ()
 Default constructor.
 Connection (tConnectionId id, Signal *connectedSignal)
 Explicit constructor.
Connectionoperator= (Connection &s)
 Assignment operator.
 Connection (const Connection &s)
 Copy constructor.
tConnectionId GetID () const
 Accessor to the GUID.
 ~Connection ()
 Destructor.

Member Typedef Documentation

Type declaration for the ConnectionId.

Definition at line 49 of file Connection.hxx.


Constructor & Destructor Documentation

SigSlot::Connection::Connection (  ) 

Default constructor.

Initializes the Connection so to be nil. This constructor should not be used from the client: its existence is justified for allowing to have Connection objects inside STL containers

Definition at line 28 of file Connection.cxx.

SigSlot::Connection::Connection ( tConnectionId  id,
Signal connectedSignal 
)

Explicit constructor.

Initializes the object with a GUID and a reference to the Signal the Slot is being connected to.

Definition at line 39 of file Connection.cxx.

SigSlot::Connection::Connection ( const Connection s  ) 

Copy constructor.

See also:
operator=

Definition at line 44 of file Connection.cxx.

References mConnectedSignal, mID, and mMustFreeSignal.

SigSlot::Connection::~Connection (  ) 

Destructor.

When connections are destroyed it is checked that the connection is active, if that is the case then the Signal is notified about not calling anymore the involved slot object.

Definition at line 33 of file Connection.cxx.

References SigSlot::Signal::FreeConnection().


Member Function Documentation

Connection & SigSlot::Connection::operator= ( Connection s  ) 

Assignment operator.

Copies the Connection object provided, keeping the GUID and the reference to the signal. To avoid owning problems, the source Connection object is marked as 'disabled'.

Definition at line 52 of file Connection.cxx.

References mConnectedSignal, mID, and mMustFreeSignal.

tConnectionId SigSlot::Connection::GetID (  )  const [inline]


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

Generated on Tue Aug 12 22:33:51 2008 for CLAM by  doxygen 1.5.5