wxArt2D
Public Types | Public Member Functions | Friends | List of all members
a2dAutoZeroPtr< Clss > Class Template Reference

A pointer class, that is automatically set to 0 if the target is deleted. More...

#include <smrtptr.h>

Public Types

typedef Clss TType
 

Public Member Functions

 a2dAutoZeroPtr (Clss *objc)
 
 a2dAutoZeroPtr (const a2dAutoZeroPtr &objc)
 
void TargetDestructing ()
 This is called from the targets destructor. More...
 
void operator= (const a2dAutoZeroPtr &objc)
 
void operator= (Clss *objc)
 
 operator Clss * () const
 
Clss * Get () const
 
Clss * operator-> () const
 
Clss & operator* () const
 

Friends

bool operator== (const a2dAutoZeroPtr &a, const a2dAutoZeroPtr &b)
 
bool operator!= (const a2dAutoZeroPtr &a, const a2dAutoZeroPtr &b)
 
bool operator== (const a2dAutoZeroPtr &a, const Clss *b)
 
bool operator!= (const a2dAutoZeroPtr &a, const Clss *b)
 
bool operator== (const Clss *a, const a2dAutoZeroPtr &b)
 
bool operator!= (const Clss *a, const a2dAutoZeroPtr &b)
 
bool operator== (const a2dAutoZeroPtr &a, Clss *b)
 
bool operator!= (const a2dAutoZeroPtr &a, Clss *b)
 
bool operator== (Clss *a, const a2dAutoZeroPtr &b)
 
bool operator!= (Clss *a, const a2dAutoZeroPtr &b)
 

Detailed Description

template<class Clss>
class a2dAutoZeroPtr< Clss >

A pointer class, that is automatically set to 0 if the target is deleted.

The target keeps a list of all auto zero smart pointers pointing to it.

For e.g. a2dObject, this list is implemented as a property.

Definition at line 347 of file smrtptr.h.

Member Function Documentation

template<class Clss>
void a2dAutoZeroPtr< Clss >::TargetDestructing ( )
inline

This is called from the targets destructor.

It is safe to call this function with a zero this pointer

Definition at line 379 of file smrtptr.h.


The documentation for this class was generated from the following file:
a2dAutoZeroPtr< Clss > Class Template Reference -- Sun Oct 12 2014 17:04:28 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation