CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | Friends
edm::propagate_const< T > Class Template Reference

#include <propagate_const.h>

Public Types

using element_type = typename std::remove_reference< decltype(*std::declval< T & >())>::type
 

Public Member Functions

constexpr element_type const * get () const
 
constexpr element_typeget ()
 
constexpr operator element_type * ()
 
constexpr operator element_type const * () const
 
constexpr element_type const & operator* () const
 
constexpr element_typeoperator* ()
 
constexpr element_type const * operator-> () const
 
constexpr element_typeoperator-> ()
 
constexpr propagate_const< T > & operator= (propagate_const &&)=default
 
propagate_const< T > & operator= (propagate_const< T > const &)=delete
 
template<typename U >
constexpr propagate_constoperator= (U &&iValue)
 
constexpr propagate_const ()=default
 
constexpr propagate_const (propagate_const< T > &&)=default
 
 propagate_const (propagate_const< T > const &)=delete
 
template<typename U >
constexpr propagate_const (U &&iValue)
 

Static Private Member Functions

template<typename Up >
static constexpr element_typeto_raw_pointer (Up *u)
 
template<typename Up >
static constexpr element_typeto_raw_pointer (Up &u)
 
template<typename Up >
static constexpr const element_typeto_raw_pointer (const Up *u)
 
template<typename Up >
static constexpr const element_typeto_raw_pointer (const Up &u)
 

Private Attributes

T m_value
 

Friends

constexpr Tget_underlying (propagate_const< T > &)
 
constexpr T const & get_underlying (propagate_const< T > const &)
 

Detailed Description

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

Definition at line 32 of file propagate_const.h.

Member Typedef Documentation

◆ element_type

template<typename T>
using edm::propagate_const< T >::element_type = typename std::remove_reference<decltype(*std::declval<T&>())>::type

Definition at line 45 of file propagate_const.h.

Constructor & Destructor Documentation

◆ propagate_const() [1/4]

template<typename T>
constexpr edm::propagate_const< T >::propagate_const ( )
default

◆ propagate_const() [2/4]

template<typename T>
constexpr edm::propagate_const< T >::propagate_const ( propagate_const< T > &&  )
default

◆ propagate_const() [3/4]

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

◆ propagate_const() [4/4]

template<typename T>
template<typename U >
constexpr edm::propagate_const< T >::propagate_const ( U &&  iValue)
inline

Definition at line 52 of file propagate_const.h.

52 : m_value(std::forward<U>(iValue)) {}

Member Function Documentation

◆ get() [1/2]

template<typename T>
constexpr element_type const* edm::propagate_const< T >::get ( ) const
inline

Definition at line 64 of file propagate_const.h.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), dqm::impl::MonitorElement::accessRootObject(), edm::storage::XrdFile::addConnection(), edm::core::OutputModuleCore::branchIDLists(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::clone(), edm::storage::XrdFile::close(), rrapi.RRApi::columns(), rrapi.RRApi::count(), edm::StreamerInputFile::currentRecord(), rrapi.RRApi::data(), HepMCEventWriter::endRun(), edm::StreamSchedule::finishedPaths(), edm::StreamerInputModule< Producer >::genuineCloseFile(), edm::serviceregistry::ServicesManager::get(), edm::storage::XrdFile::getActiveFile(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), dqm::impl::MonitorElement::getRootObject(), HepMCFileReader::initialize(), edm::serviceregistry::ServicesManager::isAvailable(), edm::value_ptr< edm::service::MessageLoggerDefaults >::operator=(), edm::storage::XrdFile::position(), tfwliteselectortest::ThingsTSelector::preProcessing(), TFWLiteSelectorBasic::Process(), edm::storage::XrdFile::read(), edm::storage::XrdFile::readv(), rrapi.RRApi::report(), rrapi.RRApi::reports(), edm::RootOutputFile::RootOutputFile(), edm::limited::outputmodule::RunCacheHolder< T, C >::runCache(), edm::global::outputmodule::RunCacheHolder< T, C >::runCache(), edm::one::outputmodule::RunCacheHolder< C >::runCache(), edm::limited::impl::RunCacheHolder< T, C >::runCache(), edm::global::impl::RunCacheHolder< T, C >::runCache(), edm::one::impl::RunCacheHolder< T, C >::runCache(), edm::StreamerInputFile::startMessage(), edm::StreamSchedule::StreamSchedule(), fwlite::ChainEvent::switchToFile(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), edm::RootOutputTree::tree(), fwlite::internal::BranchMapReaderStrategyV11::updateFile(), fwlite::internal::BranchMapReaderStrategyV17::updateFile(), ProvenanceDumper::work_(), rrapi.RRApi::workspaces(), edm::RootOutputFile::writeParameterSetRegistry(), edm::RootOutputFile::writeProcessHistoryRegistry(), HepMCFileReader::~HepMCFileReader(), and edm::value_ptr< edm::service::MessageLoggerDefaults >::~value_ptr().

64 { return to_raw_pointer(m_value); }
static constexpr element_type * to_raw_pointer(Up *u)

◆ get() [2/2]

template<typename T>
constexpr element_type* edm::propagate_const< T >::get ( )
inline

◆ operator element_type *()

template<typename T>
constexpr edm::propagate_const< T >::operator element_type * ( )
inline

Definition at line 75 of file propagate_const.h.

75 { return this->get(); }

◆ operator element_type const *()

template<typename T>
constexpr edm::propagate_const< T >::operator element_type const * ( ) const
inline

Definition at line 68 of file propagate_const.h.

68 { return this->get(); }

◆ operator*() [1/2]

template<typename T>
constexpr element_type const& edm::propagate_const< T >::operator* ( void  ) const
inline

Definition at line 66 of file propagate_const.h.

66 { return *m_value; }

◆ operator*() [2/2]

template<typename T>
constexpr element_type& edm::propagate_const< T >::operator* ( void  )
inline

Definition at line 73 of file propagate_const.h.

73 { return *m_value; }

◆ operator->() [1/2]

template<typename T>
constexpr element_type const* edm::propagate_const< T >::operator-> ( ) const
inline

Definition at line 65 of file propagate_const.h.

65 { return this->get(); }

◆ operator->() [2/2]

template<typename T>
constexpr element_type* edm::propagate_const< T >::operator-> ( )
inline

Definition at line 72 of file propagate_const.h.

72 { return this->get(); }

◆ operator=() [1/3]

template<typename T>
constexpr propagate_const<T>& edm::propagate_const< T >::operator= ( propagate_const< T > &&  )
default

◆ operator=() [2/3]

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

◆ operator=() [3/3]

template<typename T>
template<typename U >
constexpr propagate_const& edm::propagate_const< T >::operator= ( U &&  iValue)
inline

Definition at line 58 of file propagate_const.h.

58  {
59  m_value = std::forward<U>(iValue);
60  return *this;
61  }

◆ to_raw_pointer() [1/4]

template<typename T>
template<typename Up >
static constexpr element_type* edm::propagate_const< T >::to_raw_pointer ( Up *  u)
inlinestaticprivate

Definition at line 79 of file propagate_const.h.

Referenced by edm::propagate_const< std::shared_ptr< C > >::get().

79  {
80  return u;
81  }

◆ to_raw_pointer() [2/4]

template<typename T>
template<typename Up >
static constexpr element_type* edm::propagate_const< T >::to_raw_pointer ( Up &  u)
inlinestaticprivate

Definition at line 84 of file propagate_const.h.

84  {
85  return u.get();
86  }

◆ to_raw_pointer() [3/4]

template<typename T>
template<typename Up >
static constexpr const element_type* edm::propagate_const< T >::to_raw_pointer ( const Up *  u)
inlinestaticprivate

Definition at line 89 of file propagate_const.h.

89  {
90  return u;
91  }

◆ to_raw_pointer() [4/4]

template<typename T>
template<typename Up >
static constexpr const element_type* edm::propagate_const< T >::to_raw_pointer ( const Up &  u)
inlinestaticprivate

Definition at line 94 of file propagate_const.h.

94  {
95  return u.get();
96  }

Friends And Related Function Documentation

◆ get_underlying [1/2]

template<typename T>
constexpr T& get_underlying ( propagate_const< T > &  iP)
friend

Definition at line 103 of file propagate_const.h.

103  {
104  return iP.m_value;
105  }

◆ get_underlying [2/2]

template<typename T>
constexpr T const& get_underlying ( propagate_const< T > const &  iP)
friend

Definition at line 107 of file propagate_const.h.

107  {
108  return iP.m_value;
109  }

Member Data Documentation

◆ m_value

template<typename T>
T edm::propagate_const< T >::m_value
private