OPointer< Type > Class Template Reference

#include <opointer.h>

Inheritance diagram for OPointer< Type >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 OPointer ()
 OPointer (Type *p)
 ~OPointer ()
Type * operator-> ()
Type & operator* () const
void operator= (Type *p)
 operator Type *& ()
 operator Type * () const
Type * ptr ()

Private Attributes

Type * _ptr

Detailed Description

template<class Type>
class OPointer< Type >

OPointer

Definition at line 9 of file opointer.h.


Constructor & Destructor Documentation

template<class Type>
OPointer< Type >::OPointer (  )  [inline]

Definition at line 19 of file opointer.h.

00019 {_ptr=NULL;}

template<class Type>
OPointer< Type >::OPointer ( Type *  p  )  [inline]

Definition at line 20 of file opointer.h.

00020 {_ptr=p;}

template<class Type>
OPointer< Type >::~OPointer (  )  [inline]

Definition at line 21 of file opointer.h.

00022   {
00023     if (_ptr)
00024     {
00025       //printf("Opointer Deleting address %p\n",_ptr);
00026       delete _ptr;
00027     }
00028   }


Member Function Documentation

template<class Type>
OPointer< Type >::operator Type * (  )  const [inline]

Definition at line 39 of file opointer.h.

00039 {return _ptr;}

template<class Type>
OPointer< Type >::operator Type *& (  )  [inline]

Definition at line 38 of file opointer.h.

00038 {return _ptr;}

template<class Type>
Type& OPointer< Type >::operator* (  )  const [inline]

Definition at line 34 of file opointer.h.

00034 {return *_ptr;}

template<class Type>
Type* OPointer< Type >::operator-> (  )  [inline]

Definition at line 29 of file opointer.h.

00030   {
00031     assert(_ptr);
00032     return _ptr;
00033   }

template<class Type>
void OPointer< Type >::operator= ( Type *  p  )  [inline]

Definition at line 35 of file opointer.h.

00035 {_ptr = p;}

template<class Type>
Type* OPointer< Type >::ptr (  )  [inline]

Definition at line 44 of file opointer.h.

00044 {return _ptr;}


Member Data Documentation

template<class Type>
Type* OPointer< Type >::_ptr [private]

Definition at line 12 of file opointer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:24 2012 for CO2INJECTION by  doxygen 1.6.3