NLMISC::CRefCount Class Reference

To use CSmartPtr or CRefPtr, derive from this class. More...

#include <smart_ptr.h>

Inherited by NL3D::CAnimationPlaylist, NL3D::CAnimationSet, NL3D::CBoneBase, NL3D::CChannelMixer, NL3D::CIndexBuffer, NL3D::CInstanceGroup, NL3D::CLandscape, NL3D::CMaterial, NL3D::CMaterialBase, NL3D::CMorphBase, NL3D::COrderingTable< T >::CAllocator, NL3D::CPackedZoneBase, NL3D::CParticleSystem, NL3D::CParticleSystem::CSpawnVect, NL3D::CPatchRdrPass, NL3D::CTextureDrvShare, NL3D::CVertexBuffer, NL3D::CVertexProgram, NL3D::CVisualCollisionMesh, NL3D::CZone::CTessBaseVertex, NL3D::IAnimatable, NL3D::IDriver, NL3D::IIBDrvInfos, NL3D::IMaterialDrvInfos, NL3D::IMeshVertexProgram, NL3D::IShaderDrvInfos, NL3D::IShape, NL3D::ITexture, NL3D::ITexture::CTextureCategory, NL3D::ITextureDrvInfos, NL3D::IVBDrvInfos, NL3D::IVertexProgramDrvInfos, NLGEORGES::UForm, NLGEORGES::UFormDfn, NLGEORGES::UType, NLMISC::CMemStreamBuffer::TMemStreamBuffer, NLMISC::CVirtualRefCount, NLMISC::IEventEmitter, NLNET::CModuleManager::TModuleLibraryInfo, NLNET::IModule, NLNET::IModuleFactory, NLNET::IModuleGateway, NLNET::IModuleManager, and NLNET::IModuleProxy.

List of all members.

Classes

struct  CPtrInfo
struct  CPtrInfoBase

Public Member Functions

 ~CRefCount ()
 Destructor which release pinfo if necessary.
 CRefCount ()
 Default constructor init crefs to 0.
const sintgetRefCount () const
CRefCountoperator= (const CRefCount &)
 operator= must NOT copy crefs/pinfo!!
 CRefCount (const CRefCount &)
 copy cons must NOT copy crefs/pinfo!!

Public Attributes

sint crefs
CPtrInfopinfo

Static Public Attributes

static CPtrInfoBase NullPtrInfo = {NULL, 0x7FFFFFFF, true}

Friends

struct CPtrInfo

Detailed Description

To use CSmartPtr or CRefPtr, derive from this class.

Your class doens't have to be virtual, or doesn't have to provide a virtual dtor.

Author:
Lionel Berenguier
Nevrax France
Date:
2000

Definition at line 47 of file smart_ptr.h.


Constructor & Destructor Documentation

NLMISC::CRefCount::~CRefCount (  )  [inline]

Destructor which release pinfo if necessary.

Definition at line 42 of file smart_ptr_inline.h.

References crefs, NLMISC::CRefCount::CPtrInfoBase::IsNullPtrInfo, nlassert, pinfo, and NLMISC::CRefCount::CPtrInfoBase::Ptr.

NLMISC::CRefCount::CRefCount (  )  [inline]

Default constructor init crefs to 0.

Definition at line 53 of file smart_ptr.h.

References crefs, NullPtrInfo, and pinfo.

NLMISC::CRefCount::CRefCount ( const CRefCount  )  [inline]

copy cons must NOT copy crefs/pinfo!!

Definition at line 91 of file smart_ptr.h.

References crefs, NullPtrInfo, and pinfo.


Member Function Documentation

const sint& NLMISC::CRefCount::getRefCount (  )  const [inline]

Definition at line 76 of file smart_ptr.h.

References crefs.

CRefCount& NLMISC::CRefCount::operator= ( const CRefCount  )  [inline]

operator= must NOT copy crefs/pinfo!!

Reimplemented in NL3D::CIndexBuffer, NL3D::CMaterial, NL3D::CMesh, NL3D::CSegRemanenceShape, NL3D::ITexture, NL3D::CTextureFile, NL3D::CTextureGrouped, and NL3D::CVertexBuffer.

Definition at line 89 of file smart_ptr.h.


Friends And Related Function Documentation

friend struct CPtrInfo [friend]

Definition at line 73 of file smart_ptr.h.


Member Data Documentation

Definition at line 85 of file smart_ptr.h.

Referenced by CRefCount(), getRefCount(), and ~CRefCount().

CRefCount::CPtrInfoBase NLMISC::CRefCount::NullPtrInfo = {NULL, 0x7FFFFFFF, true} [static]

The documentation for this class was generated from the following files:

Generated on Thu Jan 7 08:30:19 2010 for NeL by  doxygen 1.6.1