GeoModel - GeoModelCore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RCBase Class Reference

This is a base class for objects whose memory is managed through reference counting. Reference-counted objects can only be created using operator new, the cannot be created on the stack. More...

#include <RCBase.h>

Inheritance diagram for RCBase:
GeoElement GeoFacet GeoGraphNode GeoLogVol GeoMaterial GeoShape GeoQuadrangularFacet GeoTriangularFacet GeoIdentifierTag GeoNameTag GeoSerialDenominator GeoSerialIdentifier GeoSerialTransformer GeoTransform GeoVPhysVol GeoBox GeoCons GeoEllipticalTube GeoGenericTrap GeoPara GeoPcon GeoPgon GeoShapeIntersection GeoShapeShift GeoShapeSubtraction GeoShapeUnion GeoSimplePolygonBrep GeoTessellatedSolid GeoTorus GeoTrap GeoTrd GeoTube GeoTubs GeoUnidentifiedShape

Public Member Functions

void ref () const
 
void unref () const
 
unsigned int refCount () const
 

Private Member Functions

 RCBase (const RCBase &right)
 
RCBase & operator= (const RCBase &right)
 

Private Attributes

std::atomic< unsigned > m_count
 

Detailed Description

This is a base class for objects whose memory is managed through reference counting. Reference-counted objects can only be created using operator new, the cannot be created on the stack.

The methods ref() and unref() can be called to increase and decrease the reference count of an object. When the reference count decreases to zero, the object deletes itself

Definition at line 24 of file RCBase.h.


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