Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXAutoPtr< TYPE > Class Template Reference

Automatic pointer. More...

#include <FXAutoPtr.h>

List of all members.

Public Member Functions

 FXAutoPtr (TYPE *p=NULL)
template<class T>
 FXAutoPtr (FXAutoPtr< T > &orig)
FXAutoPtroperator= (TYPE *p)
template<class T>
FXAutoPtroperator= (FXAutoPtr< T > &orig)
 operator TYPE * () const
TYPE & operator* () const
TYPE * operator-> () const
TYPE * release ()
void reset (TYPE *p=NULL)
 ~FXAutoPtr ()


Detailed Description

template<class TYPE>
class FX::FXAutoPtr< TYPE >

Automatic pointer.

Constructor & Destructor Documentation

template<class TYPE>
FX::FXAutoPtr< TYPE >::FXAutoPtr ( TYPE *  p = NULL  )  [inline]

Construct with optional pointer.

template<class TYPE>
template<class T>
FX::FXAutoPtr< TYPE >::FXAutoPtr ( FXAutoPtr< T > &  orig  )  [inline]

Copy constructor from an automatic pointer with compatible type.

template<class TYPE>
FX::FXAutoPtr< TYPE >::~FXAutoPtr (  )  [inline]

Destruction deletes pointer.


Member Function Documentation

template<class TYPE>
FXAutoPtr& FX::FXAutoPtr< TYPE >::operator= ( TYPE *  p  )  [inline]

Assign from pointer.

template<class TYPE>
template<class T>
FXAutoPtr& FX::FXAutoPtr< TYPE >::operator= ( FXAutoPtr< T > &  orig  )  [inline]

Assign from an automatic pointer with compatible type.

References FX::FXAutoPtr< TYPE >::release(), and FX::FXAutoPtr< TYPE >::reset().

template<class TYPE>
FX::FXAutoPtr< TYPE >::operator TYPE * (  )  const [inline]

Conversion operators.

template<class TYPE>
TYPE& FX::FXAutoPtr< TYPE >::operator* (  )  const [inline]

Dereference operator.

template<class TYPE>
TYPE* FX::FXAutoPtr< TYPE >::operator-> (  )  const [inline]

Follow pointer operator.

template<class TYPE>
TYPE* FX::FXAutoPtr< TYPE >::release (  )  [inline]

Release hold on the pointer.

References NULL.

Referenced by FX::FXAutoPtr< TYPE >::operator=().

template<class TYPE>
void FX::FXAutoPtr< TYPE >::reset ( TYPE *  p = NULL  )  [inline]

Delete old object, replace by new, if any.

Referenced by FX::FXAutoPtr< TYPE >::operator=().

Copyright © 1997-2007 Jeroen van der Zijp