cxxtools::DelegateBase Class Reference

#include <cxxtools/delegate.h>

Inheritance diagram for cxxtools::DelegateBase:
cxxtools::Connectable

Public Member Functions

 DelegateBase ()
 DelegateBase (const DelegateBase &rhs)
DelegateBaseoperator= (const DelegateBase &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.
bool isConnected () const
- Public Member Functions inherited from cxxtools::Connectable
 Connectable ()
 Default constructor.
virtual ~Connectable ()
 Closes all connections.
size_t connectionCount () const

Protected Attributes

Connection _target
- Protected Attributes inherited from cxxtools::Connectable
std::list< Connection_connections
 A list of all current connections.

Additional Inherited Members

- Protected Member Functions inherited from cxxtools::Connectable
 Connectable (const Connectable &c)
 Copy constructor.
Connectableoperator= (const Connectable &rhs)
 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 ()

Constructor & Destructor Documentation

cxxtools::DelegateBase::DelegateBase ( )
inline
cxxtools::DelegateBase::DelegateBase ( const DelegateBase rhs)
inline

Member Function Documentation

bool cxxtools::DelegateBase::isConnected ( ) const
inline
virtual void cxxtools::DelegateBase::onConnectionClose ( const Connection c)
inlinevirtual

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::DelegateBase::onConnectionOpen ( const Connection c)
inlinevirtual

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.

DelegateBase& cxxtools::DelegateBase::operator= ( const DelegateBase other)
inline

Member Data Documentation

Connection cxxtools::DelegateBase::_target
protected

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