NewNet::Event< T >::Callback Class Reference

Abstract callback type for Event. More...

#include <nnevent.h>

Inheritance diagram for NewNet::Event< T >::Callback:

NewNet::Object List of all members.

Public Member Functions

 Callback ()
 Constructor.
virtual ~Callback ()
 Destructor.
virtual void operator() (T t)=0
 Slot method.
void disconnect ()
 Disconnect this callback from all events.

Detailed Description

template<typename T>
class NewNet::Event< T >::Callback

A callback can be added to an event so that operator()(T t) will be called when the event is emitted.

Definition at line 41 of file nnevent.h.


Member Function Documentation

template<typename T>
virtual void NewNet::Event< T >::Callback::operator() ( t  )  [pure virtual]

Override this and implement your callback function.

template<typename T>
void NewNet::Event< T >::Callback::disconnect (  )  [inline]

Calling this will result in the disconnection of the callback from all the events it is registered to. Note: Events store a RefPtr to the callbacks. The callback class might be deleted when disconnecting from all registered events.

Definition at line 73 of file nnevent.h.

References NewNet::Object::refCounter().


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 14:00:01 2007 for NewNet by  doxygen 1.5.1