refCount Class Reference

Reference counter for various OpenFOAM components. More...

Inheritance diagram for refCount:

Classes

struct  zero
 A non-counting (dummy) refCount. More...
 

Public Member Functions

constexpr refCount () noexcept
 Default construct, initializing count to 0. More...
 
int use_count () const noexcept
 Return the current reference count. More...
 
bool unique () const noexcept
 Return true if the reference count is zero. More...
 
void operator++ () noexcept
 Increment the reference count. More...
 
void operator++ (int) noexcept
 Increment the reference count. More...
 
void operator-- () noexcept
 Decrement the reference count. More...
 
void operator-- (int) noexcept
 Decrement the reference count. More...
 

Detailed Description

Reference counter for various OpenFOAM components.

See also
Foam::tmp Foam::token::compound

Definition at line 44 of file refCount.H.

Constructor & Destructor Documentation

◆ refCount()

constexpr refCount ( )
inlinenoexcept

Default construct, initializing count to 0.

Definition at line 63 of file refCount.H.

Member Function Documentation

◆ use_count()

int use_count ( ) const
inlinenoexcept

Return the current reference count.

Definition at line 74 of file refCount.H.

◆ unique()

bool unique ( ) const
inlinenoexcept

Return true if the reference count is zero.

Definition at line 82 of file refCount.H.

◆ operator++() [1/2]

void operator++ ( )
inlinenoexcept

Increment the reference count.

Definition at line 93 of file refCount.H.

◆ operator++() [2/2]

void operator++ ( int  )
inlinenoexcept

Increment the reference count.

Definition at line 101 of file refCount.H.

◆ operator--() [1/2]

void operator-- ( )
inlinenoexcept

Decrement the reference count.

Definition at line 109 of file refCount.H.

◆ operator--() [2/2]

void operator-- ( int  )
inlinenoexcept

Decrement the reference count.

Definition at line 117 of file refCount.H.


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