CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::CloningPtr< T, P > Class Template Reference

#include <CloningPtr.h>

Public Member Functions

 CloningPtr ()
 
 CloningPtr (const T &iPtr)
 
 CloningPtr (std::unique_ptr< T > iPtr)
 
 CloningPtr (const CloningPtr< T, P > &iPtr)
 
Tget ()
 
Toperator* ()
 
Toperator-> ()
 
CloningPtr< T, P > & operator= (const CloningPtr< T, P > &iRHS)
 
void swap (CloningPtr< T, P > &iPtr)
 
 ~CloningPtr ()
 

Private Attributes

Tptr_
 

Detailed Description

template<class T, class P = ClonePolicy<T>>
class edm::CloningPtr< T, P >

Definition at line 31 of file CloningPtr.h.

Constructor & Destructor Documentation

template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( )
inline

Definition at line 33 of file CloningPtr.h.

33 : ptr_(nullptr) {}
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( const T iPtr)
inline

Definition at line 34 of file CloningPtr.h.

34 : ptr_(P::clone(iPtr)) {}
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( std::unique_ptr< T iPtr)
inline

Definition at line 35 of file CloningPtr.h.

35 : ptr_(iPtr.release()) {}
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::CloningPtr ( const CloningPtr< T, P > &  iPtr)
inline

Definition at line 36 of file CloningPtr.h.

36 : ptr_(P::clone(*(iPtr.ptr_))) {}
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
template<class T, class P = ClonePolicy<T>>
edm::CloningPtr< T, P >::~CloningPtr ( )
inline

Definition at line 46 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

46 { delete ptr_; }

Member Function Documentation

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::get ( )
inline
template<class T, class P = ClonePolicy<T>>
T& edm::CloningPtr< T, P >::operator* ( )
inline

Definition at line 49 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

49 { return *ptr_; }
template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::operator-> ( )
inline

Definition at line 51 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_.

51 { return ptr_; }
template<class T, class P = ClonePolicy<T>>
CloningPtr<T, P>& edm::CloningPtr< T, P >::operator= ( const CloningPtr< T, P > &  iRHS)
inline

Definition at line 38 of file CloningPtr.h.

References edm::CloningPtr< T, P >::swap(), and groupFilesInBlocks::temp.

38  {
39  CloningPtr<T, P> temp(iRHS);
40  swap(temp);
41  return *this;
42  }
void swap(CloningPtr< T, P > &iPtr)
Definition: CloningPtr.h:44
template<class T, class P = ClonePolicy<T>>
void edm::CloningPtr< T, P >::swap ( CloningPtr< T, P > &  iPtr)
inline

Definition at line 44 of file CloningPtr.h.

References edm::CloningPtr< T, P >::ptr_, and std::swap().

Referenced by edm::CloningPtr< T, P >::operator=(), and edm::swap().

44 { std::swap(ptr_, iPtr.ptr_); }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)

Member Data Documentation

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::ptr_
private