A class for managing temporary objects. More...
#include <OpenFOAM/tmp.H>
A class for managing temporary objects.
Definition at line 55 of file tmp.H.
Public Member Functions | |
tmp (T *=0) | |
Store object pointer.
| |
tmp (const T &) | |
Store object const reference.
| |
tmp (const tmp< T > &) | |
Construct copy and increment reference count.
| |
~tmp () | |
Delete object when reference count == 0.
| |
bool | isTmp () const |
Return true if this is really a temporary object.
| |
bool | empty () const |
Return true if this temporary object empty,.
| |
bool | valid () const |
Is this temporary object valid,.
| |
T * | ptr () const |
Return tmp pointer for reuse.
| |
void | clear () const |
If object pointer points to valid object:
| |
T & | operator() () |
Dereference operator.
| |
const T & | operator() () const |
Const dereference operator.
| |
operator const T & () const | |
Const cast to the underlying type reference.
| |
T * | operator-> () |
Return object pointer.
| |
const T * | operator-> () const |
Return const object pointer.
| |
void | operator= (const tmp< T > &) |
Assignment operator.
|
Construct copy and increment reference count.
Definition at line 49 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
bool isTmp | ( | ) | const [inline]
|
Return true if this is really a temporary object.
Definition at line 92 of file tmpI.H.
Referenced by DispersionRASModel< CloudType >::cacheFields(), and Foam::xferTmp().
bool empty | ( | ) | const [inline]
|
bool valid | ( | ) | const [inline]
|
T * ptr | ( | ) | const [inline]
|
Return tmp pointer for reuse.
Definition at line 113 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::T().
Referenced by DispersionRASModel< CloudType >::cacheFields(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), Foam::operator*(), Foam::operator+(), Foam::operator-(), Field< Type >::operator=(), and Foam::operator==().
void clear | ( | ) | const [inline]
|
If object pointer points to valid object:
delete object and set pointer to NULL
Definition at line 139 of file tmpI.H.
Referenced by lduMatrix::Amul(), boundBox::boundBox(), kOmegaSSTSAS::correct(), RNGkEpsilon::correct(), LaunderSharmaKE::correct(), kOmegaSST::correct(), kEpsilon::correct(), Foam::fvc::DDt(), Foam::fvm::div(), Foam::fvc::div(), Foam::resError::div(), Foam::fvc::flux(), fft::forwardTransform(), surfaceInterpolationScheme< Type >::interpolate(), Foam::fvc::interpolate(), Foam::resError::laplacian(), Foam::operator&(), anisotropicFilter::operator()(), Foam::operator+(), Foam::operator-(), Foam::operator==(), noiseFFT::Pf(), PatchToPatchInterpolation< FromPatch, ToPatch >::pointInterpolate(), Foam::pow(), fft::reverseTransform(), Foam::fvm::Sp(), Foam::resError::Sp(), Foam::fvm::SuSp(), Foam::resError::SuSp(), lduMatrix::Tmul(), Foam::transform(), and Foam::fvc::volumeIntegrate().
T & operator() | ( | ) | [inline]
|
Dereference operator.
Definition at line 152 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::T().
const T & operator() | ( | ) | const [inline]
|
Const dereference operator.
Definition at line 181 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
operator const T & | ( | ) | const [inline]
|
T * operator-> | ( | ) | [inline]
|
Return object pointer.
Definition at line 209 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::T().
const T * operator-> | ( | ) | const [inline]
|
void operator= | ( | const tmp< T > & | t ) | [inline]
|
Assignment operator.
Definition at line 237 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.