Public Member Functions | Private Member Functions | Private Attributes
refCount Class Reference

Reference counter for various OpenFOAM components. More...

Inheritance diagram for refCount:
Inheritance graph
[legend]

Public Member Functions

 refCount ()
 Construct null with zero count. More...
 
int count () const
 Return the reference count. More...
 
bool okToDelete () const
 Return true if the reference count is zero. More...
 
void resetRefCount ()
 Reset the reference count to zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 

Private Member Functions

 refCount (const refCount &)
 Dissallow copy. More...
 
void operator= (const refCount &)
 Dissallow bitwise assignment. More...
 

Private Attributes

int count_
 

Detailed Description

Reference counter for various OpenFOAM components.

Definition at line 45 of file refCount.H.

Constructor & Destructor Documentation

◆ refCount() [1/2]

refCount ( const refCount )
private

Dissallow copy.

◆ refCount() [2/2]

refCount ( )
inline

Construct null with zero count.

Definition at line 65 of file refCount.H.

Member Function Documentation

◆ operator=()

void operator= ( const refCount )
private

Dissallow bitwise assignment.

◆ count()

int count ( ) const
inline

Return the reference count.

Definition at line 74 of file refCount.H.

References refCount::count_.

◆ okToDelete()

bool okToDelete ( ) const
inline

Return true if the reference count is zero.

Definition at line 81 of file refCount.H.

References refCount::count_.

Referenced by token::clear().

Here is the caller graph for this function:

◆ resetRefCount()

void resetRefCount ( )
inline

Reset the reference count to zero.

Definition at line 88 of file refCount.H.

References refCount::count_.

◆ operator++() [1/2]

void operator++ ( )
inline

Increment the reference count.

Definition at line 97 of file refCount.H.

References refCount::count_.

◆ operator++() [2/2]

void operator++ ( int  )
inline

Increment the reference count.

Definition at line 103 of file refCount.H.

References refCount::count_.

◆ operator--() [1/2]

void operator-- ( )
inline

Decrement the reference count.

Definition at line 109 of file refCount.H.

References refCount::count_.

◆ operator--() [2/2]

void operator-- ( int  )
inline

Decrement the reference count.

Definition at line 115 of file refCount.H.

References refCount::count_.

Field Documentation

◆ count_

int count_
private

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