CMS 3D CMS Logo

Public Member Functions | Private Attributes

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

#include <CloningPtr.h>

List of all members.

Public Member Functions

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

Private Attributes

Tptr_

Detailed Description

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

Definition at line 32 of file CloningPtr.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file CloningPtr.h.

: ptr_(0) {}
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( const T iPtr) [inline]

Definition at line 35 of file CloningPtr.h.

: 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 36 of file CloningPtr.h.

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

Definition at line 37 of file CloningPtr.h.

: ptr_(P::clone(*(iPtr.ptr_))) {}
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::~CloningPtr ( ) [inline]

Definition at line 49 of file CloningPtr.h.

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

{ delete ptr_;}

Member Function Documentation

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

Definition at line 56 of file CloningPtr.h.

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

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

Definition at line 52 of file CloningPtr.h.

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

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

Definition at line 54 of file CloningPtr.h.

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

{ 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 39 of file CloningPtr.h.

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

                                                                  {
      CloningPtr<T,P> temp(iRHS);
      swap(temp);
      return *this;
    }
template<class T, class P = ClonePolicy<T>>
void edm::CloningPtr< T, P >::swap ( CloningPtr< T, P > &  iPtr) [inline]

Definition at line 45 of file CloningPtr.h.

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

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

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

Member Data Documentation

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