CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

OwnIt< T > Class Template Reference

#include <OwnIt.h>

List of all members.

Public Types

typedef OwnIt< Tself

Public Member Functions

Tget () const
selfoperator= (T *p)
 OwnIt (T *p=0)
void reset ()
 ~OwnIt ()

Private Attributes

Tit

Detailed Description

template<class T>
class OwnIt< T >

a very very simple auto_ptr. if static get destrying at the end avoiding fake memory leaks...

Definition at line 8 of file OwnIt.h.


Member Typedef Documentation

template<class T >
typedef OwnIt<T> OwnIt< T >::self

Definition at line 10 of file OwnIt.h.


Constructor & Destructor Documentation

template<class T >
OwnIt< T >::OwnIt ( T p = 0) [inline]

Definition at line 11 of file OwnIt.h.

: it(p){}
template<class T >
OwnIt< T >::~OwnIt ( ) [inline]

Definition at line 13 of file OwnIt.h.

References OwnIt< T >::reset().

{ reset();}

Member Function Documentation

template<class T >
T* OwnIt< T >::get ( void  ) const [inline]

Definition at line 15 of file OwnIt.h.

References OwnIt< T >::it.

{ return it;}
template<class T >
self& OwnIt< T >::operator= ( T p) [inline]

Definition at line 14 of file OwnIt.h.

References OwnIt< T >::it, and AlCaHLTBitMon_ParallelJobs::p.

{ if (it) delete it; it=p; return * this;}
template<class T >
void OwnIt< T >::reset ( void  ) [inline]

Definition at line 16 of file OwnIt.h.

References OwnIt< T >::it.

Referenced by OwnIt< T >::~OwnIt().

{ if (it) { delete it; it=0; } }

Member Data Documentation

template<class T >
T* OwnIt< T >::it [private]

Definition at line 19 of file OwnIt.h.

Referenced by OwnIt< T >::get(), OwnIt< T >::operator=(), and OwnIt< T >::reset().