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 Attributes
DeepCopyPointerByClone< T > Class Template Reference

#include <DeepCopyPointerByClone.h>

Public Member Functions

 DeepCopyPointerByClone ()
 
 DeepCopyPointerByClone (T *t)
 
 DeepCopyPointerByClone (const DeepCopyPointerByClone &other)
 
 DeepCopyPointerByClone (DeepCopyPointerByClone &&other)
 
 operator bool () const
 to allow test like " if (p) {...}" More...
 
Toperator* ()
 
const Toperator* () const
 
Toperator-> ()
 
const Toperator-> () const
 
DeepCopyPointerByCloneoperator= (const DeepCopyPointerByClone &other)
 
DeepCopyPointerByCloneoperator= (DeepCopyPointerByClone &&other)
 
bool operator== (const T *otherP) const
 to allow test like " if (p == &someT) {...}" More...
 
 ~DeepCopyPointerByClone ()
 

Private Attributes

TtheData
 

Detailed Description

template<class T>
class DeepCopyPointerByClone< T >

Same as DeepCopyPointer, except that it copies the object pointed to wsing the clone() virtual copy constructor.

Definition at line 11 of file DeepCopyPointerByClone.h.

Constructor & Destructor Documentation

template<class T>
DeepCopyPointerByClone< T >::~DeepCopyPointerByClone ( )
inline

Definition at line 14 of file DeepCopyPointerByClone.h.

template<class T>
DeepCopyPointerByClone< T >::DeepCopyPointerByClone ( )
inline

Definition at line 15 of file DeepCopyPointerByClone.h.

template<class T>
DeepCopyPointerByClone< T >::DeepCopyPointerByClone ( T t)
inline

Definition at line 17 of file DeepCopyPointerByClone.h.

template<class T>
DeepCopyPointerByClone< T >::DeepCopyPointerByClone ( const DeepCopyPointerByClone< T > &  other)
inline

Definition at line 19 of file DeepCopyPointerByClone.h.

19  {
20  if (other.theData) theData = other->clone(); else theData = 0;
21  }
template<class T>
DeepCopyPointerByClone< T >::DeepCopyPointerByClone ( DeepCopyPointerByClone< T > &&  other)
inline

Definition at line 33 of file DeepCopyPointerByClone.h.

33  : theData(other.theData) {
34  other.theData=0;
35  }

Member Function Documentation

template<class T>
DeepCopyPointerByClone< T >::operator bool ( ) const
inline

to allow test like " if (p) {...}"

Definition at line 49 of file DeepCopyPointerByClone.h.

49 { return theData != 0;}
template<class T>
T& DeepCopyPointerByClone< T >::operator* ( )
inline

Definition at line 42 of file DeepCopyPointerByClone.h.

template<class T>
const T& DeepCopyPointerByClone< T >::operator* ( ) const
inline

Definition at line 43 of file DeepCopyPointerByClone.h.

template<class T>
T* DeepCopyPointerByClone< T >::operator-> ( )
inline

Definition at line 45 of file DeepCopyPointerByClone.h.

template<class T>
const T* DeepCopyPointerByClone< T >::operator-> ( ) const
inline

Definition at line 46 of file DeepCopyPointerByClone.h.

template<class T>
DeepCopyPointerByClone& DeepCopyPointerByClone< T >::operator= ( const DeepCopyPointerByClone< T > &  other)
inline

Definition at line 24 of file DeepCopyPointerByClone.h.

24  {
25  if ( theData != other.theData) {
26  delete theData;
27  if (other.theData) theData = other->clone(); else theData = 0;
28  }
29  return *this;
30  }
template<class T>
DeepCopyPointerByClone& DeepCopyPointerByClone< T >::operator= ( DeepCopyPointerByClone< T > &&  other)
inline

Definition at line 36 of file DeepCopyPointerByClone.h.

36  {
37  std::swap(theData,other.theData);
38  return *this;
39  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
template<class T>
bool DeepCopyPointerByClone< T >::operator== ( const T otherP) const
inline

to allow test like " if (p == &someT) {...}"

Definition at line 52 of file DeepCopyPointerByClone.h.

52 { return theData == otherP;}

Member Data Documentation

template<class T>
T* DeepCopyPointerByClone< T >::theData
private