OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RCObject Class Referenceabstract

Abstract base class for reference counted objects. More...

#include <RCObject.h>

Inheritance diagram for RCObject:
Inheritance graph
[legend]

Public Member Functions

int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Protected Member Functions

 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 

Private Attributes

int refCount
 

Detailed Description

Abstract base class for reference counted objects.

Definition at line 42 of file RCObject.h.

Constructor & Destructor Documentation

RCObject::RCObject ( )
inlineprotected

Default constructor.

Definition at line 100 of file RCObject.h.

RCObject::RCObject ( const RCObject )
inlineprotected

Copy constructor.

Definition at line 105 of file RCObject.h.

RCObject::~RCObject ( )
inlineprotectedpure virtual

Definition at line 110 of file RCObject.h.

Member Function Documentation

int RCObject::addReference ( ) const
inline

Increment reference count.

Definition at line 85 of file RCObject.h.

References refCount.

Referenced by Pointer< Object >::operator=(), and Pointer< Object >::unique().

bool RCObject::isShared ( ) const
inline

Test for sharing.

Definition at line 95 of file RCObject.h.

References refCount.

RCObject & RCObject::operator= ( const RCObject right)
inlineprotected

Definition at line 114 of file RCObject.h.

int RCObject::removeReference ( ) const
inline

Decrement the reference count.

Definition at line 90 of file RCObject.h.

References refCount.

Member Data Documentation

int RCObject::refCount
mutableprivate

Definition at line 78 of file RCObject.h.

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


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