OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
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 40 of file RCObject.h.

Constructor & Destructor Documentation

◆ RCObject() [1/2]

RCObject::RCObject ( )
inlineprotected

Default constructor.

Definition at line 98 of file RCObject.h.

◆ RCObject() [2/2]

RCObject::RCObject ( const RCObject )
inlineprotected

Copy constructor.

Definition at line 103 of file RCObject.h.

◆ ~RCObject()

RCObject::~RCObject ( )
inlineprotectedpure virtual

Definition at line 108 of file RCObject.h.

Member Function Documentation

◆ addReference()

int RCObject::addReference ( ) const
inline

Increment reference count.

Definition at line 83 of file RCObject.h.

References refCount.

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

◆ isShared()

bool RCObject::isShared ( ) const
inline

Test for sharing.

Definition at line 93 of file RCObject.h.

References refCount.

◆ operator=()

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

Definition at line 112 of file RCObject.h.

◆ removeReference()

int RCObject::removeReference ( ) const
inline

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References refCount.

Member Data Documentation

◆ refCount

int RCObject::refCount
mutableprivate

Definition at line 76 of file RCObject.h.

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


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