CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
edm::ConstRespectingPtr< T > Class Template Reference

#include <ConstRespectingPtr.h>

Public Member Functions

 ConstRespectingPtr ()
 
 ConstRespectingPtr (T *)
 
 ConstRespectingPtr (ConstRespectingPtr< T > const &)=delete
 
T const * get () const
 
Tget ()
 
bool isSet () const
 
T const & operator* () const
 
Toperator* ()
 
T const * operator-> () const
 
Toperator-> ()
 
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

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

Definition at line 55 of file ConstRespectingPtr.h.

55 : m_data(nullptr) {}
edm::propagate_const< T * > m_data
template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( T v)
explicit

Definition at line 58 of file ConstRespectingPtr.h.

58 : m_data(v) {}
edm::propagate_const< T * > m_data
template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( ConstRespectingPtr< T > const &  )
delete
template<typename T >
edm::ConstRespectingPtr< T >::~ConstRespectingPtr ( )

Definition at line 61 of file ConstRespectingPtr.h.

61  {
62  delete m_data.get();
63  }
edm::propagate_const< T * > m_data
constexpr element_type const * get() const

Member Function Documentation

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

Definition at line 66 of file ConstRespectingPtr.h.

66  {
67  return nullptr != m_data;
68  }
edm::propagate_const< T * > m_data
template<typename T>
T const& edm::ConstRespectingPtr< T >::operator* ( void  ) const
inline

Definition at line 36 of file ConstRespectingPtr.h.

36 { return *m_data; }
edm::propagate_const< T * > m_data
template<typename T>
T& edm::ConstRespectingPtr< T >::operator* ( void  )
inline

Definition at line 40 of file ConstRespectingPtr.h.

40 { return *m_data; }
edm::propagate_const< T * > m_data
template<typename T>
T const* edm::ConstRespectingPtr< T >::operator-> ( ) const
inline

Definition at line 35 of file ConstRespectingPtr.h.

35 { return m_data; }
edm::propagate_const< T * > m_data
template<typename T>
T* edm::ConstRespectingPtr< T >::operator-> ( )
inline

Definition at line 39 of file ConstRespectingPtr.h.

39 { return m_data; }
edm::propagate_const< T * > m_data
template<typename T>
ConstRespectingPtr& edm::ConstRespectingPtr< T >::operator= ( ConstRespectingPtr< T > const &  )
delete
template<typename T >
T * edm::ConstRespectingPtr< T >::release ( )

Definition at line 77 of file ConstRespectingPtr.h.

References createJobs::tmp.

77  {
78  T* tmp = m_data;
79  m_data = nullptr;
80  return tmp;
81  }
edm::propagate_const< T * > m_data
tmp
align.sh
Definition: createJobs.py:716
long double T
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  }
edm::propagate_const< T * > m_data
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  }
edm::propagate_const< T * > m_data

Member Data Documentation

template<typename T>
edm::propagate_const<T*> edm::ConstRespectingPtr< T >::m_data
private