CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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 BasicMultiTrajectoryState BasicSingleTrajectoryState reco::TrackGhostTrackState reco::VertexGhostTrackState reco::GsfTransientTrack reco::TrackTransientTrack reco::TransientTrackFromFTS BeamSpotTransientTrackingRecHit GenericProjectedRecHit2D GenericTransientTrackingRecHit TransientTrackingRecHitByValue< RecHit > TransientTrackingRecHitByValue< InvalidTrackingRecHit > TRecHit1DMomConstraint TRecHit2DPosConstraint TSiPixelRecHit TSiStripRecHit1D TSiStripRecHit2DLocalPos TSiTrackerMultiRecHit

Public Member Functions

void addReference () const
 
const
ReferenceCountedPoolAllocated
operator= (const ReferenceCountedPoolAllocated &)
 
 ReferenceCountedPoolAllocated ()
 
 ReferenceCountedPoolAllocated (const ReferenceCountedPoolAllocated &iRHS)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~ReferenceCountedPoolAllocated ()
 
- Public Member Functions inherited from BlockWipedPoolAllocated
virtual ~BlockWipedPoolAllocated ()
 

Static Public Attributes

static int s_alive =0
 
static int s_referenced =0
 
- Static Public Attributes inherited from BlockWipedPoolAllocated
static int s_alive =0
 

Private Attributes

unsigned int referenceCount_
 

Additional Inherited Members

- Static Public Member Functions inherited from BlockWipedPoolAllocated
static BlockWipedAllocatorallocator (size_t s)
 
static void operator delete (void *p, size_t s)
 
static void * operator new (size_t s, void *p)
 
static void * operator new (size_t s)
 
static BlockWipedAllocator::Stat stat (size_t s)
 
static void usePool ()
 

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.

110  : referenceCount_(0) {
111  s_alive++;
112  }
ReferenceCountedPoolAllocated::ReferenceCountedPoolAllocated ( const ReferenceCountedPoolAllocated iRHS)
inline

Definition at line 114 of file ReferenceCounted.h.

References s_alive.

114  : referenceCount_(0) {
115  s_alive++;
116  }
virtual ReferenceCountedPoolAllocated::~ReferenceCountedPoolAllocated ( )
inlinevirtual

Definition at line 122 of file ReferenceCounted.h.

References s_alive.

122  {
123  s_alive--;
124  }

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.

118  {
119  return *this;
120  }
unsigned int ReferenceCountedPoolAllocated::references ( ) const
inline

Definition at line 136 of file ReferenceCounted.h.

References referenceCount_.

136 {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().

129  {
130  s_referenced--;
131  if( 0 == --referenceCount_ ) {
132  delete const_cast<ReferenceCountedPoolAllocated*>(this);
133  }
134  }

Member Data Documentation

unsigned int ReferenceCountedPoolAllocated::referenceCount_
mutableprivate

Definition at line 145 of file ReferenceCounted.h.

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

int ReferenceCountedPoolAllocated::s_alive =0
static
int ReferenceCountedPoolAllocated::s_referenced =0
static