CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

63 : m_data(nullptr) {}
template<typename T>
edm::ConstRespectingPtr< T >::ConstRespectingPtr ( T v)
explicit
template<typename T >
edm::ConstRespectingPtr< T >::~ConstRespectingPtr ( )

Definition at line 69 of file ConstRespectingPtr.h.

69  {
70  delete m_data;
71  }
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 74 of file ConstRespectingPtr.h.

74 { return nullptr != 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; }
template<typename T>
T& edm::ConstRespectingPtr< T >::operator* ( void  )
inline

Definition at line 40 of file ConstRespectingPtr.h.

40 { return *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; }
template<typename T>
T* edm::ConstRespectingPtr< T >::operator-> ( )
inline

Definition at line 39 of file ConstRespectingPtr.h.

39 { return 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 83 of file ConstRespectingPtr.h.

References tmp.

Referenced by cuy.ValElement::__init__().

83  {
84  T* tmp = m_data;
85  m_data = nullptr;
86  return tmp;
87  }
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 90 of file ConstRespectingPtr.h.

90  {
91  delete m_data;
92  m_data = nullptr;
93  }
template<typename T>
void edm::ConstRespectingPtr< T >::set ( std::unique_ptr< T iNewValue)

Definition at line 77 of file ConstRespectingPtr.h.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

77  {
78  delete m_data;
79  m_data = iNewValue.release();
80  }

Member Data Documentation

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