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

◆ self

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

Definition at line 10 of file OwnIt.h.

Constructor & Destructor Documentation

◆ OwnIt()

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

Definition at line 11 of file OwnIt.h.

11 : it(p){}

◆ ~OwnIt()

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

Definition at line 13 of file OwnIt.h.

13 { reset();}

References OwnIt< T >::reset().

Member Function Documentation

◆ get()

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

◆ operator=()

template<class T >
self& OwnIt< T >::operator= ( T p)
inline

Definition at line 14 of file OwnIt.h.

14 { if (it) delete it; it=p; return * this;}

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

◆ reset()

template<class T >
void OwnIt< T >::reset ( void  )
inline

Definition at line 16 of file OwnIt.h.

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

References OwnIt< T >::it.

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

Member Data Documentation

◆ it

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

OwnIt::reset
void reset()
Definition: OwnIt.h:16
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
OwnIt::it
T * it
Definition: OwnIt.h:19