CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
BasicReferenceCounted Class Reference

#include <ReferenceCounted.h>

Inheritance diagram for BasicReferenceCounted:
NavSurface Surface NavCone NavCylinder NavPlane BoundSurface Cone Cylinder Plane BoundCylinder BoundPlane BoundCylinder BoundaryPlane BoundPlane TangentPlane BoundDisk BoundDiskSector BoundDisk BoundDiskSector

Public Member Functions

void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &iRHS)
 
const BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Private Attributes

unsigned int referenceCount_
 

Detailed Description

Definition at line 29 of file ReferenceCounted.h.

Constructor & Destructor Documentation

BasicReferenceCounted::BasicReferenceCounted ( )
inline

Definition at line 33 of file ReferenceCounted.h.

33 : referenceCount_(0) {}
unsigned int referenceCount_
BasicReferenceCounted::BasicReferenceCounted ( const BasicReferenceCounted iRHS)
inline

Definition at line 34 of file ReferenceCounted.h.

34 : referenceCount_(0) {}
unsigned int referenceCount_
virtual BasicReferenceCounted::~BasicReferenceCounted ( )
inlinevirtual

Definition at line 39 of file ReferenceCounted.h.

39 {}

Member Function Documentation

void BasicReferenceCounted::addReference ( ) const
inline

Definition at line 43 of file ReferenceCounted.h.

References referenceCount_.

Referenced by PixelTrackBuilder::build(), and intrusive_ptr_add_ref().

43 { ++referenceCount_ ; }
unsigned int referenceCount_
const BasicReferenceCounted& BasicReferenceCounted::operator= ( const BasicReferenceCounted )
inline

Definition at line 36 of file ReferenceCounted.h.

Referenced by BoundSurface::operator=().

36  {
37  return *this;
38  }
unsigned int BasicReferenceCounted::references ( ) const
inline

Definition at line 49 of file ReferenceCounted.h.

References referenceCount_.

49 {return referenceCount_;}
unsigned int referenceCount_
void BasicReferenceCounted::removeReference ( ) const
inline

Definition at line 44 of file ReferenceCounted.h.

References referenceCount_.

Referenced by intrusive_ptr_release().

44  { if( 0 == --referenceCount_ ) {
45  delete const_cast<BasicReferenceCounted*>(this);
46  }
47  }
unsigned int referenceCount_

Member Data Documentation

unsigned int BasicReferenceCounted::referenceCount_
mutableprivate

Definition at line 58 of file ReferenceCounted.h.

Referenced by addReference(), references(), and removeReference().