CMS 3D CMS Logo

edm::CloningPtr< T, P > Class Template Reference

#include <DataFormats/Common/interface/CloningPtr.h>

List of all members.

Public Member Functions

 CloningPtr (const CloningPtr< T, P > &iPtr)
 CloningPtr (std::auto_ptr< T > iPtr)
 CloningPtr (const T &iPtr)
 CloningPtr ()
T * get () const
T & operator * () const
T * operator-> () const
const CloningPtr< T, P > & operator= (const CloningPtr< T, P > &iRHS)
void swap (CloningPtr< T, P > &iPtr)
 ~CloningPtr ()

Private Attributes

T * ptr_


Detailed Description

template<class T, class P = ClonePolicy<T>>
class edm::CloningPtr< T, P >

Definition at line 31 of file CloningPtr.h.


Constructor & Destructor Documentation

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr (  )  [inline]

Definition at line 33 of file CloningPtr.h.

00033 : ptr_(0) {}

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( const T &  iPtr  )  [inline]

Definition at line 34 of file CloningPtr.h.

00034 : ptr_(P::clone(iPtr)) {}

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( std::auto_ptr< T >  iPtr  )  [inline]

Definition at line 35 of file CloningPtr.h.

00035 : ptr_(iPtr.release()) {}

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( const CloningPtr< T, P > &  iPtr  )  [inline]

Definition at line 36 of file CloningPtr.h.

00036 : ptr_(P::clone(*(iPtr.ptr_))) {}

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::~CloningPtr (  )  [inline]

Definition at line 48 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

00048 { delete ptr_;}


Member Function Documentation

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::get ( void   )  const [inline]

Definition at line 55 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

00055 { return ptr_; }

template<class T, class P = ClonePolicy<T>>
T& edm::CloningPtr< T, P >::operator * (  )  const [inline]

Definition at line 51 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

00051 { return *ptr_; }

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::operator-> (  )  const [inline]

Definition at line 53 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

00053 { return ptr_; }

template<class T, class P = ClonePolicy<T>>
const CloningPtr<T,P>& edm::CloningPtr< T, P >::operator= ( const CloningPtr< T, P > &  iRHS  )  [inline]

Definition at line 38 of file CloningPtr.h.

References edm::CloningPtr< T, P >::swap(), and pyDBSRunClass::temp.

00038                                                                   {
00039       CloningPtr<T,P> temp(iRHS);
00040       swap(temp);
00041       return *this;
00042     }

template<class T, class P = ClonePolicy<T>>
void edm::CloningPtr< T, P >::swap ( CloningPtr< T, P > &  iPtr  )  [inline]

Definition at line 44 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_, and std::swap().

Referenced by edm::CloningPtr< T, P >::operator=(), and edm::swap().

00044                                      {
00045       std::swap(ptr_, iPtr.ptr_);
00046     }


Member Data Documentation

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::ptr_ [private]

Definition at line 58 of file CloningPtr.h.

Referenced by edm::CloningPtr< T, P >::get(), edm::CloningPtr< T, P >::operator *(), edm::CloningPtr< T, P >::operator->(), edm::CloningPtr< T, P >::swap(), and edm::CloningPtr< T, P >::~CloningPtr().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:39:41 2009 for CMSSW by  doxygen 1.5.4