Public Member Functions | List of all members
tmp< T > Class Template Reference

A class for managing temporary objects. More...

Inheritance diagram for tmp< T >:
Inheritance graph
[legend]

Public Member Functions

 tmp (T *=0)
 Store object pointer. More...
 
 tmp (const T &)
 Store object const reference. More...
 
 tmp (const tmp< T > &)
 Construct copy and increment reference count. More...
 
 tmp (const tmp< T > &, bool allowTransfer)
 Construct copy transferring content of temporary if required. More...
 
 ~tmp ()
 Destructor, delete object when reference count == 0. More...
 
bool isTmp () const
 Return true if this is really a temporary object. More...
 
bool empty () const
 Return true if this temporary object empty,. More...
 
bool valid () const
 Is this temporary object valid,. More...
 
Tptr () const
 Return tmp pointer for reuse. More...
 
void clear () const
 If object pointer points to valid object: More...
 
Toperator() ()
 Dereference operator. More...
 
const Toperator() () const
 Const dereference operator. More...
 
 operator const T & () const
 Const cast to the underlying type reference. More...
 
Toperator-> ()
 Return object pointer. More...
 
const Toperator-> () const
 Return const object pointer. More...
 
void operator= (const tmp< T > &)
 Assignment operator. More...
 

Detailed Description

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

A class for managing temporary objects.

Source files

Definition at line 118 of file PtrList.H.

Constructor & Destructor Documentation

tmp ( T tPtr = 0)
inlineexplicit

Store object pointer.

Definition at line 32 of file tmpI.H.

tmp ( const T tRef)
inline

Store object const reference.

Definition at line 41 of file tmpI.H.

tmp ( const tmp< T > &  t)
inline

Construct copy and increment reference count.

Definition at line 50 of file tmpI.H.

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

Here is the call graph for this function:

tmp ( const tmp< T > &  t,
bool  allowTransfer 
)
inline

Construct copy transferring content of temporary if required.

Definition at line 74 of file tmpI.H.

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

Here is the call graph for this function:

~tmp ( )
inline

Destructor, delete object when reference count == 0.

Definition at line 107 of file tmpI.H.

Member Function Documentation

bool isTmp ( ) const
inline

Return true if this is really a temporary object.

Definition at line 127 of file tmpI.H.

Referenced by DispersionRASModel< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::cacheFields(), and Xfer< T >::operator->().

Here is the caller graph for this function:

bool empty ( ) const
inline

Return true if this temporary object empty,.

ie, a temporary without allocation

Definition at line 134 of file tmpI.H.

bool valid ( ) const
inline

Is this temporary object valid,.

ie, it is a reference or a temporary that has been allocated

Definition at line 141 of file tmpI.H.

T * ptr ( ) const
inline
void clear ( ) const
inline
T & operator() ( )
inline

Dereference operator.

Definition at line 187 of file tmpI.H.

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

Referenced by tmp< T >::operator const T &().

Here is the call graph for this function:

Here is the caller graph for this function:

const T & operator() ( ) const
inline

Const dereference operator.

Definition at line 216 of file tmpI.H.

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

Here is the call graph for this function:

operator const T & ( ) const
inline

Const cast to the underlying type reference.

Definition at line 237 of file tmpI.H.

References tmp< T >::operator()().

Here is the call graph for this function:

T * operator-> ( )
inline

Return object pointer.

Definition at line 244 of file tmpI.H.

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

Here is the call graph for this function:

const T * operator-> ( ) const
inline

Return const object pointer.

Definition at line 265 of file tmpI.H.

void operator= ( const tmp< T > &  t)
inline

Assignment operator.

Definition at line 272 of file tmpI.H.

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

Here is the call graph for this function:


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