CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
edm::value_ptr< T > Class Template Reference

#include <value_ptr.h>

Public Member Functions

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

Private Types

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

Private Member Functions

template<typename U >
T * createFrom (U const *p) const
 
void this_type_does_not_support_comparisons () const
 

Private Attributes

T * myP
 

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 137 of file value_ptr.h.

Constructor & Destructor Documentation

template<typename T>
edm::value_ptr< T >::value_ptr ( T *  p = 0)
inlineexplicit

Definition at line 70 of file value_ptr.h.

template<typename T>
edm::value_ptr< T >::~value_ptr ( )
inline

Definition at line 71 of file value_ptr.h.

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

Definition at line 77 of file value_ptr.h.

77  :
78  myP(createFrom(orig.myP)) {
79  }
T * createFrom(U const *p) const
Definition: value_ptr.h:154
template<typename T>
template<typename U >
edm::value_ptr< T >::value_ptr ( value_ptr< U > const &  orig)
inline

Definition at line 105 of file value_ptr.h.

105  :
106  myP(createFrom(orig.operator->())) {
107  }
T * createFrom(U const *p) const
Definition: value_ptr.h:154
template<typename T>
edm::value_ptr< T >::value_ptr ( std::auto_ptr< T >  orig)
inline

Definition at line 120 of file value_ptr.h.

120  :
121  myP(orig.release()) {
122  }

Member Function Documentation

template<typename T>
template<typename U >
T* edm::value_ptr< T >::createFrom ( U const *  p) const
inlineprivate

Definition at line 154 of file value_ptr.h.

154  {
155  return p
157  : 0;
158  }
static T * clone(T const *p)
Definition: value_ptr.h:51
template<typename T>
edm::value_ptr< T >::operator bool_type ( ) const
inline

Definition at line 141 of file value_ptr.h.

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

Definition at line 91 of file value_ptr.h.

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

Definition at line 92 of file value_ptr.h.

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

Definition at line 81 of file value_ptr.h.

81  {
82  value_ptr<T> temp(orig);
83  swap(temp);
84  return *this;
85  }
void swap(value_ptr &orig)
Definition: value_ptr.h:98
template<typename T>
template<typename U >
value_ptr& edm::value_ptr< T >::operator= ( value_ptr< U > const &  orig)
inline

Definition at line 110 of file value_ptr.h.

110  {
111  value_ptr<T> temp(orig);
112  swap(temp);
113  return *this;
114  }
void swap(value_ptr &orig)
Definition: value_ptr.h:98
template<typename T>
value_ptr& edm::value_ptr< T >::operator= ( std::auto_ptr< T >  orig)
inline

Definition at line 124 of file value_ptr.h.

124  {
125  value_ptr<T> temp(orig);
126  swap(temp);
127  return *this;
128  }
void swap(value_ptr &orig)
Definition: value_ptr.h:98
template<typename T>
void edm::value_ptr< T >::swap ( value_ptr< T > &  orig)
inline

Definition at line 98 of file value_ptr.h.

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

98 { std::swap(myP, orig.myP); }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
template<typename T>
void edm::value_ptr< T >::this_type_does_not_support_comparisons ( ) const
inlineprivate

Definition at line 138 of file value_ptr.h.

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

138 {}

Member Data Documentation

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