OpenFOAM logo
Open Source CFD Toolkit

tmp Class Template Reference

Inheritance diagram for tmp:

Inheritance graph
[legend]
Collaboration diagram for tmp:

Collaboration graph
[legend]
List of all members.

template<class T>
class Foam::tmp< T >


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
 Is this really a temporary object.
bool valid () const
 Is this temporary object valid, i.e. is it a reference.
T * ptr () const
 Return tmp pointer for reuse.
void clear ()
 If object pointer points to valid object:.
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.

Constructor & Destructor Documentation

tmp T *  = 0  )  [inline, explicit]
 

Store object pointer.

Definition at line 43 of file tmpI.H.

tmp const T &   )  [inline]
 

Store object const reference.

Definition at line 53 of file tmpI.H.

tmp const tmp< T > &   )  [inline]
 

Construct copy and increment reference count.

Definition at line 63 of file tmpI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

~tmp  )  [inline]
 

Delete object when reference count == 0.

Definition at line 87 of file tmpI.H.


Member Function Documentation

void clear  )  const [inline]
 

If object pointer points to valid object:.

delete object and set pointer to NULL

Definition at line 162 of file tmpI.H.

References Foam::T().

Here is the call graph for this function:

void clear  )  [inline]
 

If object pointer points to valid object:.

delete object and set pointer to NULL

Definition at line 151 of file tmpI.H.

Referenced by tmp::operator->().

bool isTmp  )  const [inline]
 

Is this really a temporary object.

Definition at line 107 of file tmpI.H.

operator const T &  )  const [inline]
 

Const cast to the underlying type reference.

Definition at line 218 of file tmpI.H.

References Foam::T().

Here is the call graph for this function:

const T & operator()  )  const [inline]
 

Const dereference operator.

Definition at line 197 of file tmpI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

T & operator()  )  [inline]
 

Dereference operator.

Definition at line 171 of file tmpI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

const T * operator->  )  const [inline]
 

Return const object pointer.

Definition at line 248 of file tmpI.H.

References tmp::clear(), and tmp::isTmp_.

Here is the call graph for this function:

T * operator->  )  [inline]
 

Return object pointer.

Definition at line 226 of file tmpI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

void operator= const tmp< T > &   )  [inline]
 

Assignment operator.

Definition at line 255 of file tmpI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and tmp::ptr_.

Here is the call graph for this function:

T * ptr  )  const [inline]
 

Return tmp pointer for reuse.

Definition at line 122 of file tmpI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

bool valid  )  const [inline]
 

Is this temporary object valid, i.e. is it a reference.

or a temporary that has been allocated

Definition at line 114 of file tmpI.H.

References Foam::T().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
For further information go to www.openfoam.org