CMS 3D CMS Logo

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

#include <ConstRespectingPtr.h>

Public Member Functions

 ConstRespectingPtr ()
 
 ConstRespectingPtr (T *)
 
Tget ()
 
T const * get () const
 
bool isSet () const
 
Toperator* ()
 
T const & operator* () const
 
Toperator-> ()
 
T const * operator-> () const
 
Trelease ()
 
void reset ()
 
void set (std::unique_ptr< T > iNewValue)
 
 ~ConstRespectingPtr ()
 

Private Member Functions

 ConstRespectingPtr (ConstRespectingPtr< T > const &)=delete
 
ConstRespectingPtroperator= (ConstRespectingPtr< T > const &)=delete
 

Private Attributes

edm::propagate_const< T * > m_data
 

Detailed Description

template<typename T>
class edm::ConstRespectingPtr< T >

Description: When this is a member of a class, const functions of the class can only call const functions of the object it points at. This aids in using the compiler to help maintain thread safety of const functions.

Usage: WARNING: member data which uses this class must be made transient in the classes_def.xml file if it is a member of a persistent class!

Definition at line 27 of file ConstRespectingPtr.h.

Constructor & Destructor Documentation

◆ ConstRespectingPtr() [1/3]

template<typename T >
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( )

Definition at line 56 of file ConstRespectingPtr.h.

56 : m_data(nullptr) {}

◆ ConstRespectingPtr() [2/3]

template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( T v)
explicit

Definition at line 59 of file ConstRespectingPtr.h.

59 : m_data(v) {}

◆ ~ConstRespectingPtr()

template<typename T >
edm::ConstRespectingPtr< T >::~ConstRespectingPtr ( )

Definition at line 62 of file ConstRespectingPtr.h.

62  {
63  delete m_data.get();
64  }

◆ ConstRespectingPtr() [3/3]

template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( ConstRespectingPtr< T > const &  )
privatedelete

Member Function Documentation

◆ get() [1/2]

template<typename T>
T* edm::ConstRespectingPtr< T >::get ( )
inline

◆ get() [2/2]

template<typename T>
T const* edm::ConstRespectingPtr< T >::get ( ) const
inline

◆ isSet()

template<typename T >
bool edm::ConstRespectingPtr< T >::isSet ( ) const

Definition at line 67 of file ConstRespectingPtr.h.

67  {
68  return nullptr != m_data;
69  }

◆ operator*() [1/2]

template<typename T>
T& edm::ConstRespectingPtr< T >::operator* ( void  )
inline

Definition at line 38 of file ConstRespectingPtr.h.

38 { return *m_data; }

◆ operator*() [2/2]

template<typename T>
T const& edm::ConstRespectingPtr< T >::operator* ( void  ) const
inline

Definition at line 34 of file ConstRespectingPtr.h.

34 { return *m_data; }

◆ operator->() [1/2]

template<typename T>
T* edm::ConstRespectingPtr< T >::operator-> ( )
inline

Definition at line 37 of file ConstRespectingPtr.h.

37 { return m_data; }

◆ operator->() [2/2]

template<typename T>
T const* edm::ConstRespectingPtr< T >::operator-> ( ) const
inline

Definition at line 33 of file ConstRespectingPtr.h.

33 { return m_data; }

◆ operator=()

template<typename T>
ConstRespectingPtr& edm::ConstRespectingPtr< T >::operator= ( ConstRespectingPtr< T > const &  )
privatedelete

◆ release()

template<typename T >
T * edm::ConstRespectingPtr< T >::release ( )

Definition at line 78 of file ConstRespectingPtr.h.

78  {
79  T* tmp = m_data;
80  m_data = nullptr;
81  return tmp;
82  }

Referenced by edm::ConstRespectingPtr< DTBufferTreeUniquePtr >::set().

◆ reset()

template<typename T >
void edm::ConstRespectingPtr< T >::reset ( void  )

Definition at line 85 of file ConstRespectingPtr.h.

85  {
86  delete m_data;
87  m_data = nullptr;
88  }

◆ set()

template<typename T>
void edm::ConstRespectingPtr< T >::set ( std::unique_ptr< T iNewValue)

Definition at line 72 of file ConstRespectingPtr.h.

72  {
73  delete m_data;
74  m_data = iNewValue.release();
75  }

Member Data Documentation

◆ m_data

template<typename T>
edm::propagate_const<T*> edm::ConstRespectingPtr< T >::m_data
private
edm::propagate_const::get
constexpr element_type const * get() const
Definition: propagate_const.h:64
findQualityFiles.v
v
Definition: findQualityFiles.py:179
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::ConstRespectingPtr::m_data
edm::propagate_const< T * > m_data
Definition: ConstRespectingPtr.h:52
T
long double T
Definition: Basic3DVectorLD.h:48