SigSlot::Connection Class Reference

Class that model connections between signals and slots. More...

#include <Connection.hxx>

List of all members.

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.

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.


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 26 of file Connection.cxx.

References NULL.

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 37 of file Connection.cxx.

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

Copy constructor.

See also:
operator=

Definition at line 42 of file Connection.cxx.

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 31 of file Connection.cxx.


Member Function Documentation

tConnectionId SigSlot::Connection::GetID (  )  const [inline]
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 50 of file Connection.cxx.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3