A class for managing temporary objects. More...
#include <OpenFOAM/tmp.H>
A class for managing temporary objects.
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.
|
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().
|
inline |
|
inline |
|
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==().
|
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(), kEpsilon::correct(), RNGkEpsilon::correct(), LaunderSharmaKE::correct(), kOmegaSSTSAS::correct(), kOmegaSST::correct(), Foam::fvc::DDt(), Foam::fvm::div(), Foam::resError::div(), Foam::fvc::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::fvm::SuSp(), lduMatrix::Tmul(), Foam::transform(), and Foam::fvc::volumeIntegrate().
|
inline |
Dereference operator.
Definition at line 152 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::T().
|
inline |
Const dereference operator.
Definition at line 181 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
|
inline |
|
inline |
Return object pointer.
Definition at line 209 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::T().
|
inline |
Assignment operator.
Definition at line 237 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.