CMS 3D CMS Logo

edm::value_ptr< T > Class Template Reference

#include <FWCore/Utilities/interface/value_ptr.h>

List of all members.

Public Member Functions

T & operator * () const
T * operator-> () const
template<class U>
value_ptroperator= (value_ptr< U > const &orig)
value_ptroperator= (value_ptr const &orig)
void swap (value_ptr &orig)
template<class U>
 value_ptr (value_ptr< U > const &orig)
 value_ptr (value_ptr const &orig)
 value_ptr (T *p=0)
 ~value_ptr ()

Private Member Functions

template<class U>
T * createFrom (U const *p) const

Private Attributes

T * myP


Detailed Description

template<class T>
class edm::value_ptr< T >

Definition at line 56 of file value_ptr.h.


Constructor & Destructor Documentation

template<class T>
edm::value_ptr< T >::value_ptr ( T *  p = 0  )  [inline, explicit]

Definition at line 65 of file value_ptr.h.

00065 : myP(p)  { }

template<class T>
edm::value_ptr< T >::~value_ptr (  )  [inline]

Definition at line 66 of file value_ptr.h.

00066 { delete myP; }

template<class T>
edm::value_ptr< T >::value_ptr ( value_ptr< T > const &  orig  )  [inline]

Definition at line 72 of file value_ptr.h.

00072                                         :
00073       myP( createFrom(orig.myP))
00074     { }

template<class T>
template<class U>
edm::value_ptr< T >::value_ptr ( value_ptr< U > const &  orig  )  [inline]

Definition at line 101 of file value_ptr.h.

00101                                            :
00102       myP(createFrom(orig.operator->()))
00103     { }


Member Function Documentation

template<class T>
template<class U>
T* edm::value_ptr< T >::createFrom ( U const *  p  )  const [inline, private]

Definition at line 121 of file value_ptr.h.

00122     {
00123       return p
00124         ? value_ptr_traits<U>::clone( p )
00125         : 0;
00126     }

template<class T>
T& edm::value_ptr< T >::operator * ( void   )  const [inline]

Definition at line 87 of file value_ptr.h.

00087 { return *myP; }

template<class T>
T* edm::value_ptr< T >::operator-> (  )  const [inline]

Definition at line 88 of file value_ptr.h.

00088 { return  myP; }

template<class T>
template<class U>
value_ptr& edm::value_ptr< T >::operator= ( value_ptr< U > const &  orig  )  [inline]

Definition at line 106 of file value_ptr.h.

00107     {
00108       value_ptr<T>  temp( orig );
00109       swap(temp);
00110       return *this;
00111     }

template<class T>
value_ptr& edm::value_ptr< T >::operator= ( value_ptr< T > const &  orig  )  [inline]

Definition at line 76 of file value_ptr.h.

00077     {
00078       value_ptr<T>  temp(orig);
00079       swap(temp);
00080       return *this;
00081     }

template<class T>
void edm::value_ptr< T >::swap ( value_ptr< T > &  orig  )  [inline]

Definition at line 94 of file value_ptr.h.

Referenced by edm::value_ptr< edm::service::MessageLoggerDefaults >::operator=(), and edm::swap().

00094 { std::swap( myP, orig.myP ); }


Member Data Documentation

template<class T>
T* edm::value_ptr< T >::myP [private]

Definition at line 132 of file value_ptr.h.

Referenced by edm::value_ptr< edm::service::MessageLoggerDefaults >::operator *(), edm::value_ptr< edm::service::MessageLoggerDefaults >::operator->(), edm::value_ptr< edm::service::MessageLoggerDefaults >::swap(), and edm::value_ptr< edm::service::MessageLoggerDefaults >::~value_ptr().


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