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_typeget ()
 
constexpr element_type const * get () const
 
constexpr operator element_type * ()
 
constexpr operator element_type const * () const
 
constexpr element_typeoperator* ()
 
constexpr element_type const & operator* () const
 
constexpr element_typeoperator-> ()
 
constexpr element_type const * operator-> () const
 
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 const element_typeto_raw_pointer (const Up &u)
 
template<typename Up >
static constexpr const element_typeto_raw_pointer (const Up *u)
 
template<typename Up >
static constexpr element_typeto_raw_pointer (Up &u)
 
template<typename Up >
static constexpr element_typeto_raw_pointer (Up *u)
 

Private Attributes

T m_value
 

Friends

constexpr friend Tget_underlying (propagate_const< T > &)
 
constexpr friend 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 ( )
constexprdefault

◆ propagate_const() [2/4]

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

◆ 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)
inlineconstexpr

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* edm::propagate_const< T >::get ( )
inlineconstexpr

◆ get() [2/2]

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

Definition at line 64 of file propagate_const.h.

64 { return to_raw_pointer(m_value); }

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), dqm::impl::MonitorElement::accessRootObject(), XrdFile::addConnection(), edm::global::OutputModuleBase::branchIDLists(), edm::limited::OutputModuleBase::branchIDLists(), edm::one::OutputModuleBase::branchIDLists(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::clone(), 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(), 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::propagate_const< std::shared_ptr< C > >::operator element_type *(), edm::propagate_const< std::shared_ptr< C > >::operator element_type const *(), edm::propagate_const< std::shared_ptr< C > >::operator->(), edm::value_ptr< edm::service::MessageLoggerDefaults >::operator=(), XrdFile::position(), tfwliteselectortest::ThingsTSelector::preProcessing(), TFWLiteSelectorBasic::Process(), XrdFile::read(), 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::global::impl::RunCacheHolder< T, C >::runCache(), edm::limited::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().

◆ operator element_type *()

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

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
inlineconstexpr

Definition at line 68 of file propagate_const.h.

68 { return this->get(); }

◆ operator*() [1/2]

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

Definition at line 73 of file propagate_const.h.

73 { return *m_value; }

◆ operator*() [2/2]

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

Definition at line 66 of file propagate_const.h.

66 { return *m_value; }

◆ operator->() [1/2]

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

Definition at line 72 of file propagate_const.h.

72 { return this->get(); }

◆ operator->() [2/2]

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

Definition at line 65 of file propagate_const.h.

65 { return this->get(); }

◆ operator=() [1/3]

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

◆ 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)
inlineconstexpr

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 const element_type* edm::propagate_const< T >::to_raw_pointer ( const Up &  u)
inlinestaticconstexprprivate

Definition at line 94 of file propagate_const.h.

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

◆ to_raw_pointer() [2/4]

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

Definition at line 89 of file propagate_const.h.

89  {
90  return u;
91  }

◆ to_raw_pointer() [3/4]

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

Definition at line 84 of file propagate_const.h.

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

◆ to_raw_pointer() [4/4]

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

Definition at line 79 of file propagate_const.h.

79  {
80  return u;
81  }

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

Friends And Related Function Documentation

◆ get_underlying [1/2]

template<typename T>
constexpr friend 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 friend 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
edm::propagate_const::get
constexpr element_type const * get() const
Definition: propagate_const.h:64
edm::propagate_const::m_value
T m_value
Definition: propagate_const.h:99
edm::propagate_const::to_raw_pointer
static constexpr element_type * to_raw_pointer(Up *u)
Definition: propagate_const.h:79