UQTk: Uncertainty Quantification Toolkit 3.1.5
Object Class Reference

#include <Object.h>

Inheritance diagram for Object:
XMLAttributeList XMLElement XMLParser XMLExpatParser

Public Member Functions

 Object ()
 Construct a new reference counted object with a zero reference count.
 
virtual ~Object ()
 Destroy this object.
 
long int reference_count () const
 Returns the number of references that are held to this object.
 

Protected Member Functions

long int reference_grab () const
 
long int reference_release () const
 

Private Attributes

long int refs_
 

Friends

template<class T >
class RefPtr
 
template<class T >
class ConstRefPtr
 

Detailed Description

Base class for reference counted objects.

Part of the Particle Simulation Toolkit (pst)

The "friend" classes "RefPtr" and "ConstRefPtr" take care of the reference counting and garbage collection. This means that it should be safe to create an array of reference counted objects, as long as you do not assign a reference counted pointer to any at the entries in the array at any time.

Constructor & Destructor Documentation

◆ Object()

Object::Object ( )
inline

Construct a new reference counted object with a zero reference count.

◆ ~Object()

virtual Object::~Object ( )
inlinevirtual

Destroy this object.

Member Function Documentation

◆ reference_count()

long int Object::reference_count ( ) const
inline

Returns the number of references that are held to this object.

◆ reference_grab()

long int Object::reference_grab ( ) const
inlineprotected

Enables the friends of the class to increment and decrement the reference count.

◆ reference_release()

long int Object::reference_release ( ) const
inlineprotected

Friends And Related Symbol Documentation

◆ ConstRefPtr

template<class T >
friend class ConstRefPtr
friend

◆ RefPtr

template<class T >
friend class RefPtr
friend

Member Data Documentation

◆ refs_

long int Object::refs_
mutableprivate

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