CallbackSafeObject Class Reference

Base class for objects that are callback safe. More...

#include <safe_callback_obj.hh>

Inheritance diagram for CallbackSafeObject:
NONCOPYABLE IfMgrXrlReplicator RedistXrlTask< A > SafeWidget XrlJobBase XrlPort XrlPortIO< A > IfMgrManagedXrlReplicator AbortTransaction< A > AddRoute< A > CommitTransaction< A > DeleteRoute< A > FinishingRouteDump< A > Pause< A > StartingRouteDump< A > StartTransaction< A > GetAllAddressStats< A > GetAllPeerStats4 GetAllPeerStats6 GetPeerStats4 GetPeerStats6 GetPortPeerStats4 GetPortPeerStats6 XrlAddrJobBase< A >

List of all members.

Public Member Functions

void ref_cb (SafeCallbackBase *scb)
void unref_cb (SafeCallbackBase *scb)

Protected Attributes

vector< SafeCallbackBase * > _cbs

Detailed Description

Base class for objects that are callback safe.

Objects that wish to be callback safe should be derived from this class. The class works in conjunction with SafeCallbackBase and between them implement callback and callback-object tracking. When a CallbackSafeObject is destructed it informs all the callbacks that refer to it that this is the case and invalidates (sets to null) the object they point to.

Copy operations are not supported. It's hard to know what the correct thing to do on assignment or copy, so best bet is not to do anything.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations