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 | Static Private Member Functions | Private Attributes
edm::value_ptr< T > Class Template Reference

#include <value_ptr.h>

Public Member Functions

 operator bool_type () const
 
Toperator* () const
 
Toperator-> () 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 ()
 
 value_ptr (T *p)
 
 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

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.

70 : myP(0) { }
template<typename T>
edm::value_ptr< T >::value_ptr ( T p)
inlineexplicit

Definition at line 71 of file value_ptr.h.

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

Definition at line 72 of file value_ptr.h.

72 { 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.

78  :
79  myP(createFrom(orig.myP)) {
80  }
static T * createFrom(U const *p)
Definition: value_ptr.h:170
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.

121  :
122  myP(createFrom(orig.operator->())) {
123  }
static T * createFrom(U const *p)
Definition: value_ptr.h:170
template<typename T>
edm::value_ptr< T >::value_ptr ( std::auto_ptr< T orig)
inline

Definition at line 136 of file value_ptr.h.

136  :
137  myP(orig.release()) {
138  }

Member Function Documentation

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

Definition at line 170 of file value_ptr.h.

170  {
171  return p
173  : 0;
174  }
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 157 of file value_ptr.h.

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

Definition at line 107 of file value_ptr.h.

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

Definition at line 108 of file value_ptr.h.

108 { 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.

82  {
83  value_ptr<T> temp(orig);
84  swap(temp);
85  return *this;
86  }
void swap(value_ptr &orig)
Definition: value_ptr.h:114
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.

126  {
127  value_ptr<T> temp(orig);
128  swap(temp);
129  return *this;
130  }
void swap(value_ptr &orig)
Definition: value_ptr.h:114
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.

140  {
141  value_ptr<T> temp(orig);
142  swap(temp);
143  return *this;
144  }
void swap(value_ptr &orig)
Definition: value_ptr.h:114
template<typename T>
void edm::value_ptr< T >::swap ( value_ptr< T > &  orig)
inline

Definition at line 114 of file value_ptr.h.

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

114 { 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 154 of file value_ptr.h.

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

154 {}

Member Data Documentation

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