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 CloningPtr< T, P > &iPtr)
 
 CloningPtr (const T &iPtr)
 
 CloningPtr (std::unique_ptr< T > 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

◆ CloningPtr() [1/4]

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

Definition at line 33 of file CloningPtr.h.

33 : ptr_(nullptr) {}

◆ CloningPtr() [2/4]

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)) {}

◆ CloningPtr() [3/4]

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()) {}

◆ CloningPtr() [4/4]

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_))) {}

◆ ~CloningPtr()

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

Definition at line 46 of file CloningPtr.h.

46 { delete ptr_; }

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

Member Function Documentation

◆ get()

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

◆ operator*()

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

Definition at line 49 of file CloningPtr.h.

49 { return *ptr_; }

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

◆ operator->()

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

Definition at line 51 of file CloningPtr.h.

51 { return ptr_; }

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

◆ operator=()

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.

38  {
39  CloningPtr<T, P> temp(iRHS);
40  swap(temp);
41  return *this;
42  }

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

◆ swap()

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.

44 { std::swap(ptr_, iPtr.ptr_); }

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

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

Member Data Documentation

◆ ptr_

template<class T, class P = ClonePolicy<T>>
T* edm::CloningPtr< T, P >::ptr_
private
CloningPtr
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
edm::CloningPtr::ptr_
T * ptr_
Definition: CloningPtr.h:56
edm::CloningPtr::swap
void swap(CloningPtr< T, P > &iPtr)
Definition: CloningPtr.h:44