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

Private Member Functions

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

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

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

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

Definition at line 62 of file ConstRespectingPtr.h.

62 : m_data(v) {}
edm::propagate_const< T * > m_data
template<typename T >
edm::ConstRespectingPtr< T >::~ConstRespectingPtr ( )

Definition at line 65 of file ConstRespectingPtr.h.

References edm::propagate_const< T >::get(), and edm::ConstRespectingPtr< T >::m_data.

65  {
66  delete m_data.get();
67  }
edm::propagate_const< T * > m_data
element_type const * get() const
template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( ConstRespectingPtr< T > const &  )
private

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

References edm::ConstRespectingPtr< T >::m_data.

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

70 { return nullptr != m_data; }
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 &  )
private
template<typename T >
T * edm::ConstRespectingPtr< T >::release ( )

Definition at line 79 of file ConstRespectingPtr.h.

References edm::ConstRespectingPtr< T >::m_data, and tmp.

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

79  {
80  T* tmp = m_data;
81  m_data = nullptr;
82  return tmp;
83  }
edm::propagate_const< T * > m_data
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
long double T
template<typename T >
void edm::ConstRespectingPtr< T >::reset ( void  )

Definition at line 86 of file ConstRespectingPtr.h.

References edm::ConstRespectingPtr< T >::m_data.

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

86  {
87  delete m_data;
88  m_data = nullptr;
89  }
edm::propagate_const< T * > m_data
template<typename T>
void edm::ConstRespectingPtr< T >::set ( std::unique_ptr< T iNewValue)

Definition at line 73 of file ConstRespectingPtr.h.

References edm::ConstRespectingPtr< T >::m_data.

73  {
74  delete m_data;
75  m_data = iNewValue.release();
76  }
edm::propagate_const< T * > m_data

Member Data Documentation

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