CMS 3D CMS Logo

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

#include <ConstRespectingPtr.h>

Public Member Functions

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

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 55 of file ConstRespectingPtr.h.

55 : m_data(nullptr) {}

◆ ConstRespectingPtr() [2/3]

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

Definition at line 58 of file ConstRespectingPtr.h.

58 : m_data(v) {}

◆ ConstRespectingPtr() [3/3]

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

◆ ~ConstRespectingPtr()

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

Definition at line 61 of file ConstRespectingPtr.h.

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

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 66 of file ConstRespectingPtr.h.

66  {
67  return nullptr != m_data;
68  }

◆ operator*() [1/2]

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

Definition at line 40 of file ConstRespectingPtr.h.

40 { return *m_data; }

◆ operator*() [2/2]

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

Definition at line 36 of file ConstRespectingPtr.h.

36 { return *m_data; }

◆ operator->() [1/2]

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

Definition at line 39 of file ConstRespectingPtr.h.

39 { return m_data; }

◆ operator->() [2/2]

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

Definition at line 35 of file ConstRespectingPtr.h.

35 { return m_data; }

◆ operator=()

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

◆ release()

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

Definition at line 77 of file ConstRespectingPtr.h.

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

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

◆ reset()

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

Definition at line 84 of file ConstRespectingPtr.h.

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

◆ set()

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

Definition at line 71 of file ConstRespectingPtr.h.

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

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:51
T
long double T
Definition: Basic3DVectorLD.h:48