cxxtools::SignalBase Class Reference

#include <cxxtools/signal.h>

Inheritance diagram for cxxtools::SignalBase:
cxxtools::Connectable

Classes

struct  Sentry

Public Member Functions

 SignalBase ()
 ~SignalBase ()
SignalBaseoperator= (const SignalBase &other)
virtual void onConnectionOpen (const Connection &c)
 Registers a Connection with the Connectable.
virtual void onConnectionClose (const Connection &c)
 Unregisters a Connection from the Connectable.
void disconnectSlot (const Slot &slot)
- Public Member Functions inherited from cxxtools::Connectable
 Connectable ()
 Default constructor.
virtual ~Connectable ()
 Closes all connections.
size_t connectionCount () const

Additional Inherited Members

- Protected Member Functions inherited from cxxtools::Connectable
 Connectable (const Connectable &)
 Copy constructor.
Connectableoperator= (const Connectable &)
 Assignment operator.
const std::list< Connection > & connections () const
 Returns a list of all current connections.
std::list< Connection > & connections ()
 Returns a list of all current connections.
void clear ()
- Protected Attributes inherited from cxxtools::Connectable
std::list< Connection_connections
 A list of all current connections.

Constructor & Destructor Documentation

cxxtools::SignalBase::SignalBase ( )
cxxtools::SignalBase::~SignalBase ( )

Member Function Documentation

void cxxtools::SignalBase::disconnectSlot ( const Slot slot)
virtual void cxxtools::SignalBase::onConnectionClose ( const Connection c)
virtual

Unregisters a Connection from the Connectable.

This function is called when a new Connection involving this object is closed. The default implementation removes the connection from its list of connections.

Parameters
cConnection being opened

Reimplemented from cxxtools::Connectable.

virtual void cxxtools::SignalBase::onConnectionOpen ( const Connection c)
virtual

Registers a Connection with the Connectable.

This function is called when a new Connection involving this object is opened. The default implementation adds the connection to a list, so the destructor can close it.

Parameters
cConnection being opened
Returns
True if the Connection was accepted

Reimplemented from cxxtools::Connectable.

SignalBase& cxxtools::SignalBase::operator= ( const SignalBase other)

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