NewNet::GuardObject Class Reference

Helper class for detecting object deletion. More...

#include <nnguardobject.h>

List of all members.

Public Member Functions

 GuardObject ()
 Create a new guard object.
GuardObjectoperator+= (Callback *p)
 Add a callback to the guard object.
GuardObjectoperator-= (Callback *p)
 Remove a callback from the guard object.

Classes

class  Callback
 The callback class for the guard object. More...


Detailed Description

This class is used to detect when objects are deleted. You can add callbacks that will get invoked when the object is deleted. All objects have a guard object embedded. See NewNet::Object.

Definition at line 34 of file nnguardobject.h.


Constructor & Destructor Documentation

NewNet::GuardObject::GuardObject (  )  [inline]

Create a new guard object.

Definition at line 55 of file nnguardobject.h.


Member Function Documentation

GuardObject& NewNet::GuardObject::operator+= ( Callback p  )  [inline]

Add a callback to the guard object so the callback will be invoked when the guard object is deleted. Note: this stores a regular pointer and not a RefPtr.

Definition at line 72 of file nnguardobject.h.

GuardObject& NewNet::GuardObject::operator-= ( Callback p  )  [inline]

Remove a callback from the guard object. It will no longer get invoked when the guard object is deleted. Note that since the guard object stores a regular pointer to the callback, it will not get deleted automatically.

Definition at line 83 of file nnguardobject.h.


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