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, TOPO > GCC11_FINAL< T, TOPO > reco::TrackGhostTrackState reco::VertexGhostTrackState reco::GsfTransientTrack reco::TrackTransientTrack reco::TransientTrackFromFTS GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > TValidTrackingRecHit

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 139 of file ReferenceCounted.h.


Constructor & Destructor Documentation

ReferenceCountedPoolAllocated::ReferenceCountedPoolAllocated ( ) [inline]

Definition at line 149 of file ReferenceCounted.h.

References s_alive.

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

Definition at line 153 of file ReferenceCounted.h.

References s_alive.

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

Definition at line 161 of file ReferenceCounted.h.

References s_alive.

                                           {
    s_alive--;
  }

Member Function Documentation

void ReferenceCountedPoolAllocated::addReference ( ) const [inline]

Definition at line 167 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 157 of file ReferenceCounted.h.

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

Definition at line 175 of file ReferenceCounted.h.

References referenceCount_.

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

Definition at line 168 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 184 of file ReferenceCounted.h.

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