CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
OwnIt< T > Class Template Reference

#include <OwnIt.h>

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.

template<class T >
OwnIt< T >::~OwnIt ( )
inline

Definition at line 13 of file OwnIt.h.

References OwnIt< T >::reset().

13 { reset();}
void reset()
Definition: OwnIt.h:16

Member Function Documentation

template<class T >
T* OwnIt< T >::get ( ) const
inline
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.

14 { if (it) delete it; it=p; return * this;}
T * it
Definition: OwnIt.h:19
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().

16 { if (it) { delete it; it=0; } }
T * it
Definition: OwnIt.h:19

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().