CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes

edm::value_ptr< T > Class Template Reference

#include <value_ptr.h>

List of all members.

Public Member Functions

 operator bool_type () const
Toperator* () const
Toperator-> () const
template<typename U >
value_ptroperator= (value_ptr< U > const &orig)
value_ptroperator= (std::auto_ptr< T > orig)
value_ptroperator= (value_ptr const &orig)
void swap (value_ptr &orig)
 value_ptr (T *p)
 value_ptr (value_ptr const &orig)
 value_ptr (std::auto_ptr< T > orig)
 value_ptr ()
template<typename U >
 value_ptr (value_ptr< U > const &orig)
 ~value_ptr ()

Private Types

typedef void(value_ptr::* bool_type )() const

Private Member Functions

void this_type_does_not_support_comparisons () const

Static Private Member Functions

template<typename U >
static TcreateFrom (U const *p)

Private Attributes

TmyP

Detailed Description

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

Definition at line 62 of file value_ptr.h.


Member Typedef Documentation

template<typename T>
typedef void(value_ptr::* edm::value_ptr< T >::bool_type)() const [private]

Definition at line 153 of file value_ptr.h.


Constructor & Destructor Documentation

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

Definition at line 70 of file value_ptr.h.

: myP(0) { }
template<typename T>
edm::value_ptr< T >::value_ptr ( T p) [inline, explicit]

Definition at line 71 of file value_ptr.h.

: myP(p) { }
template<typename T>
edm::value_ptr< T >::~value_ptr ( ) [inline]

Definition at line 72 of file value_ptr.h.

{ delete myP; }
template<typename T>
edm::value_ptr< T >::value_ptr ( value_ptr< T > const &  orig) [inline]

Definition at line 78 of file value_ptr.h.

                                     :
      myP(createFrom(orig.myP)) {
    }
template<typename T>
template<typename U >
edm::value_ptr< T >::value_ptr ( value_ptr< U > const &  orig) [inline]

Definition at line 121 of file value_ptr.h.

                                        :
      myP(createFrom(orig.operator->())) {
    }
template<typename T>
edm::value_ptr< T >::value_ptr ( std::auto_ptr< T orig) [inline]

Definition at line 136 of file value_ptr.h.

                                   :
      myP(orig.release()) {
    }

Member Function Documentation

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

Definition at line 170 of file value_ptr.h.

                           {
      return p
        ? value_ptr_traits<U>::clone(p)
        : 0;
    }
template<typename T>
edm::value_ptr< T >::operator bool_type ( ) const [inline]

Definition at line 157 of file value_ptr.h.

                               {
      return myP != 0 ?
        &value_ptr<T>::this_type_does_not_support_comparisons : 0;
    }
template<typename T>
T& edm::value_ptr< T >::operator* ( void  ) const [inline]

Definition at line 107 of file value_ptr.h.

{ return *myP; }
template<typename T>
T* edm::value_ptr< T >::operator-> ( ) const [inline]

Definition at line 108 of file value_ptr.h.

{ return myP; }
template<typename T>
value_ptr& edm::value_ptr< T >::operator= ( value_ptr< T > const &  orig) [inline]

Definition at line 82 of file value_ptr.h.

                                                 {
      value_ptr<T> temp(orig);
      swap(temp);
      return *this;
    }
template<typename T>
template<typename U >
value_ptr& edm::value_ptr< T >::operator= ( value_ptr< U > const &  orig) [inline]

Definition at line 126 of file value_ptr.h.

                                                   {
      value_ptr<T> temp(orig);
      swap(temp);
      return *this;
    }
template<typename T>
value_ptr& edm::value_ptr< T >::operator= ( std::auto_ptr< T orig) [inline]

Definition at line 140 of file value_ptr.h.

                                              {
      value_ptr<T> temp(orig);
      swap(temp);
      return *this;
    }
template<typename T>
void edm::value_ptr< T >::swap ( value_ptr< T > &  orig) [inline]
template<typename T>
void edm::value_ptr< T >::this_type_does_not_support_comparisons ( ) const [inline, private]

Definition at line 154 of file value_ptr.h.

Referenced by edm::operator!=(), and edm::operator==().

{}

Member Data Documentation

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