OpenFOAM logo
Open Source CFD Toolkit

autoPtr Class Template Reference

Inheritance diagram for autoPtr:

Inheritance graph
[legend]
Collaboration diagram for autoPtr:

Collaboration graph
[legend]
List of all members.

template<class T>
class Foam::autoPtr< T >


Public Member Functions

 autoPtr (T *=NULL)
 Store object pointer.
 autoPtr (const autoPtr< T > &)
 Construct as copy by transfering pointer to this autoPtr and.
 ~autoPtr ()
 Delete object if pointer is not NULL.
bool valid () const
 Is the autoPtr valid, i.e. is the pointer set.
T * ptr ()
 Return object pointer for reuse.
void reset (T *p=NULL)
 If object pointer points to valid object:.
void clear ()
 If object pointer points to valid object:.
T & operator() ()
const T & operator() () const
 operator const T & () const
T * operator-> ()
 Return object pointer.
const T * operator-> () const
 Return const object pointer.
void operator= (const autoPtr< T > &)

Constructor & Destructor Documentation

autoPtr T *  = NULL  )  [inline, explicit]
 

Store object pointer.

Definition at line 48 of file autoPtrI.H.

References autoPtr::ptr_.

autoPtr const autoPtr< T > &   )  [inline]
 

Construct as copy by transfering pointer to this autoPtr and.

setting the arguments pointer to NULL

Definition at line 56 of file autoPtrI.H.

References autoPtr::clear().

Here is the call graph for this function:

~autoPtr  )  [inline]
 

Delete object if pointer is not NULL.

Definition at line 66 of file autoPtrI.H.


Member Function Documentation

void clear  )  [inline]
 

If object pointer points to valid object:.

delete object and set pointer to NULL

Definition at line 108 of file autoPtrI.H.

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

Referenced by autoPtr::autoPtr().

Here is the call graph for this function:

operator const T &  )  const [inline]
 

Definition at line 145 of file autoPtrI.H.

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

Here is the call graph for this function:

const T & operator()  )  const [inline]
 

Definition at line 131 of file autoPtrI.H.

T & operator()  )  [inline]
 

Definition at line 117 of file autoPtrI.H.

const T * operator->  )  const [inline]
 

Return const object pointer.

Definition at line 184 of file autoPtrI.H.

References autoPtr::reset().

Here is the call graph for this function:

T * operator->  )  [inline]
 

Return object pointer.

Definition at line 169 of file autoPtrI.H.

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

Definition at line 191 of file autoPtrI.H.

T * ptr  )  [inline]
 

Return object pointer for reuse.

Definition at line 83 of file autoPtrI.H.

Referenced by autoPtr::valid().

void reset T *  p = NULL  )  [inline]
 

If object pointer points to valid object:.

delete object and set pointer to that given

Definition at line 94 of file autoPtrI.H.

Referenced by autoPtr::operator->().

bool valid  )  const [inline]
 

Is the autoPtr valid, i.e. is the pointer set.

Definition at line 76 of file autoPtrI.H.

References autoPtr::ptr(), and 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