refCount Class Reference

Reference counter for various OpenFOAM components. More...

Inheritance diagram for refCount:
[legend]

Classes

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

Public Member Functions

constexpr refCount () noexcept
 Default construct, initializing count to 0. More...
 
int 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 50 of file refCount.H.

Constructor & Destructor Documentation

◆ refCount()

constexpr refCount ( )
inlineconstexprnoexcept

Default construct, initializing count to 0.

Definition at line 65 of file refCount.H.

Member Function Documentation

◆ count()

int 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 80 of file refCount.H.

◆ operator++() [1/2]

void operator++ ( )
inlinenoexcept

Increment the reference count.

Definition at line 89 of file refCount.H.

◆ operator++() [2/2]

void operator++ ( int  )
inlinenoexcept

Increment the reference count.

Definition at line 95 of file refCount.H.

◆ operator--() [1/2]

void operator-- ( )
inlinenoexcept

Decrement the reference count.

Definition at line 101 of file refCount.H.

◆ operator--() [2/2]

void operator-- ( int  )
inlinenoexcept

Decrement the reference count.

Definition at line 107 of file refCount.H.


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