CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes

ReferenceCountedPoolAllocated Class Reference

#include <ReferenceCounted.h>

Inheritance diagram for ReferenceCountedPoolAllocated:
BlockWipedPoolAllocated BasicTrajectoryState reco::BasicGhostTrackState reco::BasicTransientTrack TransientTrackingRecHit GCC11_FINAL< T > GCC11_FINAL< T > reco::TrackGhostTrackState reco::VertexGhostTrackState reco::GsfTransientTrack reco::TrackTransientTrack reco::TransientTrackFromFTS BeamSpotTransientTrackingRecHit GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GenericTransientTrackingRecHit KFBasedPixelFitter::MyBeamSpotHit TransientTrackingRecHitByValue< RecHit > TransientTrackingRecHitByValue< InvalidTrackingRecHit >

List of all members.

Public Member Functions

void addReference () const
const
ReferenceCountedPoolAllocated
operator= (const ReferenceCountedPoolAllocated &)
 ReferenceCountedPoolAllocated (const ReferenceCountedPoolAllocated &iRHS)
 ReferenceCountedPoolAllocated ()
unsigned int references () const
void removeReference () const
virtual ~ReferenceCountedPoolAllocated ()

Static Public Attributes

static int s_alive = 0
static int s_referenced = 0

Private Attributes

unsigned int referenceCount_

Detailed Description

Definition at line 100 of file ReferenceCounted.h.


Constructor & Destructor Documentation

ReferenceCountedPoolAllocated::ReferenceCountedPoolAllocated ( ) [inline]

Definition at line 110 of file ReferenceCounted.h.

References s_alive.

                                  : referenceCount_(0) { 
    s_alive++;
  }
ReferenceCountedPoolAllocated::ReferenceCountedPoolAllocated ( const ReferenceCountedPoolAllocated iRHS) [inline]

Definition at line 114 of file ReferenceCounted.h.

References s_alive.

                                                                             : referenceCount_(0) {
    s_alive++;
  }
virtual ReferenceCountedPoolAllocated::~ReferenceCountedPoolAllocated ( ) [inline, virtual]

Definition at line 122 of file ReferenceCounted.h.

References s_alive.

                                           {
    s_alive--;
  }

Member Function Documentation

void ReferenceCountedPoolAllocated::addReference ( ) const [inline]

Definition at line 128 of file ReferenceCounted.h.

References referenceCount_, and s_referenced.

Referenced by intrusive_ptr_add_ref().

const ReferenceCountedPoolAllocated& ReferenceCountedPoolAllocated::operator= ( const ReferenceCountedPoolAllocated ) [inline]

Definition at line 118 of file ReferenceCounted.h.

                                                                                         {
    return *this;
  }
unsigned int ReferenceCountedPoolAllocated::references ( ) const [inline]

Definition at line 136 of file ReferenceCounted.h.

References referenceCount_.

{return referenceCount_;}
void ReferenceCountedPoolAllocated::removeReference ( ) const [inline]

Definition at line 129 of file ReferenceCounted.h.

References referenceCount_, and s_referenced.

Referenced by intrusive_ptr_release().

                               { 
    s_referenced--;
    if( 0 == --referenceCount_ ) {
      delete const_cast<ReferenceCountedPoolAllocated*>(this);
    }
  }

Member Data Documentation

unsigned int ReferenceCountedPoolAllocated::referenceCount_ [mutable, private]

Definition at line 145 of file ReferenceCounted.h.

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