#include <smart_ptr.h>
Inheritance diagram for NLMISC::CRefCount:

Nevrax France
Definition at line 48 of file smart_ptr.h.
Public Member Functions | |
| CRefCount (const CRefCount &) | |
| copy cons must NOT copy crefs/pinfo!! | |
| CRefCount () | |
| Default constructor init crefs to 0. | |
| const sint & | getRefCount () const |
| CRefCount & | operator= (const CRefCount &) |
| operator= must NOT copy crefs/pinfo!! | |
| ~CRefCount () | |
| Destructor which release pinfo if necessary. | |
Data Fields | |
| sint | crefs |
| CPtrInfo * | pinfo |
Static Public Attributes | |
| CPtrInfo | NullPtrInfo |
Friends | |
| struct | CPtrInfo |
|
|
Destructor which release pinfo if necessary.
Definition at line 44 of file smart_ptr_inline.h. References crefs, NLMISC::CRefCount::CPtrInfo::IsNullPtrInfo, nlassert, pinfo, and NLMISC::CRefCount::CPtrInfo::Ptr.
00045 {
00046 // This is the destruction of the objet.
00047 #ifdef NL_DEBUG
00048 nlassert(crefs==0);
00049 #endif
00050
00051 // If a CRefPtr still points on me...
00052 if(!pinfo->IsNullPtrInfo)
00053 {
00054 // inform them of my destruction.
00055 pinfo->Ptr= NULL;
00056 }
00057 }
|
|
|
Default constructor init crefs to 0.
Definition at line 85 of file smart_ptr.h. References crefs, NullPtrInfo, and pinfo.
00085 { crefs = 0; pinfo=&NullPtrInfo; }
|
|
|
copy cons must NOT copy crefs/pinfo!!
Definition at line 89 of file smart_ptr.h. References crefs, NullPtrInfo, and pinfo.
00089 {crefs = 0; pinfo=&NullPtrInfo;}
|
|
|
Definition at line 70 of file smart_ptr.h.
00071 {
00072 return crefs;
00073 }
|
|
|
operator= must NOT copy crefs/pinfo!!
Definition at line 87 of file smart_ptr.h.
00087 {return *this;}
|
|
|
Definition at line 67 of file smart_ptr.h. |
|
|
Definition at line 79 of file smart_ptr.h. Referenced by CRefCount(), getRefCount(), and ~CRefCount(). |
|
|
Referenced by CRefCount(). |
|
|
Definition at line 80 of file smart_ptr.h. Referenced by CRefCount(), and ~CRefCount(). |
1.3.6