Public Member Functions | Private Member Functions | Private Attributes | List of all members
art::detail::ServiceWrapper< T, SCOPE > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Services/Registry/detail/ServiceWrapper.h"

Inheritance diagram for art::detail::ServiceWrapper< T, SCOPE >:
art::detail::ServiceWrapperBase

Public Member Functions

 ServiceWrapper (ServiceWrapper const &)=delete
 
ServiceWrapperoperator= (ServiceWrapper const &)=delete
 
 ServiceWrapper (fhicl::ParameterSet const &ps, ActivityRegistry &areg)
 
 ServiceWrapper (std::shared_ptr< T > &&p)
 
Tget ()
 
template<typename U , typename = std::enable_if_t<std::is_base_of<U, T>::value>>
ServiceWrapper< U, SCOPE > * getAs () const
 

Private Member Functions

template<typename U = T>
std::enable_if_t< std::is_base_of< ProducingService, U >::valuedoRegisterProducts (MasterProductRegistry &mpr, ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md)
 
template<typename U = T>
std::enable_if_t<!std::is_base_of< ProducingService, U >::valuedoRegisterProducts (MasterProductRegistry &, ProductDescriptions &, ProducingServiceSignals &, ModuleDescription const &)
 
void registerProducts (MasterProductRegistry &mpr, ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md) override
 

Private Attributes

std::shared_ptr< Tservice_ptr_
 

Detailed Description

template<typename T, art::ServiceScope SCOPE>
class art::detail::ServiceWrapper< T, SCOPE >

Definition at line 32 of file ServiceWrapper.h.

Constructor & Destructor Documentation

template<typename T , art::ServiceScope SCOPE>
art::detail::ServiceWrapper< T, SCOPE >::ServiceWrapper ( ServiceWrapper< T, SCOPE > const &  )
delete
template<typename T , art::ServiceScope SCOPE>
art::detail::ServiceWrapper< T, SCOPE >::ServiceWrapper ( fhicl::ParameterSet const &  ps,
ActivityRegistry areg 
)
inline

Definition at line 80 of file ServiceWrapper.h.

References nd_projection_maker::ps.

81  : service_ptr_{makeServiceFrom<T>(ps, areg)}
82  {}
std::shared_ptr< T > service_ptr_
template<typename T , art::ServiceScope SCOPE>
art::detail::ServiceWrapper< T, SCOPE >::ServiceWrapper ( std::shared_ptr< T > &&  p)
inlineexplicit

Definition at line 85 of file ServiceWrapper.h.

References T.

85  : service_ptr_{std::move(p)}
86  {}
const char * p
Definition: xmltok.h:285
std::shared_ptr< T > service_ptr_

Member Function Documentation

template<typename T , art::ServiceScope SCOPE>
template<typename U = T>
std::enable_if_t<std::is_base_of<ProducingService, U>::value> art::detail::ServiceWrapper< T, SCOPE >::doRegisterProducts ( MasterProductRegistry mpr,
ProductDescriptions productsToProduce,
ProducingServiceSignals signals,
ModuleDescription const &  md 
)
inlineprivate

Definition at line 106 of file ServiceWrapper.h.

References art::detail::ServiceWrapper< T, SCOPE >::service_ptr_.

Referenced by art::detail::ServiceWrapper< T, SCOPE >::registerProducts().

110  {
111  service_ptr_->registerCallbacks(signals);
112  service_ptr_->setModuleDescription(md);
113  service_ptr_->registerProducts(mpr, productsToProduce, md);
114  }
std::shared_ptr< T > service_ptr_
template<typename T , art::ServiceScope SCOPE>
template<typename U = T>
std::enable_if_t<!std::is_base_of<ProducingService, U>::value> art::detail::ServiceWrapper< T, SCOPE >::doRegisterProducts ( MasterProductRegistry ,
ProductDescriptions ,
ProducingServiceSignals ,
ModuleDescription const &   
)
inlineprivate

Definition at line 118 of file ServiceWrapper.h.

122  {}
template<typename T , art::ServiceScope SCOPE>
T& art::detail::ServiceWrapper< T, SCOPE >::get ( )
inline

Definition at line 89 of file ServiceWrapper.h.

References art::detail::ServiceWrapper< T, SCOPE >::service_ptr_.

90  {
91  return *service_ptr_;
92  }
std::shared_ptr< T > service_ptr_
template<typename T , art::ServiceScope SCOPE>
template<typename U , typename = std::enable_if_t<std::is_base_of<U, T>::value>>
ServiceWrapper<U, SCOPE>* art::detail::ServiceWrapper< T, SCOPE >::getAs ( ) const
inline

Definition at line 97 of file ServiceWrapper.h.

References art::detail::ServiceWrapper< T, SCOPE >::service_ptr_.

98  {
99  return new ServiceWrapper<U, SCOPE>{
100  std::static_pointer_cast<U>(service_ptr_)};
101  }
std::shared_ptr< T > service_ptr_
template<typename T , art::ServiceScope SCOPE>
ServiceWrapper& art::detail::ServiceWrapper< T, SCOPE >::operator= ( ServiceWrapper< T, SCOPE > const &  )
delete
template<typename T , art::ServiceScope SCOPE>
void art::detail::ServiceWrapper< T, SCOPE >::registerProducts ( MasterProductRegistry mpr,
ProductDescriptions productsToProduce,
ProducingServiceSignals signals,
ModuleDescription const &  md 
)
inlineoverrideprivatevirtual

Implements art::detail::ServiceWrapperBase.

Definition at line 125 of file ServiceWrapper.h.

References art::detail::ServiceWrapper< T, SCOPE >::doRegisterProducts().

129  {
130  doRegisterProducts(mpr, productsToProduce, signals, md);
131  }
std::enable_if_t< std::is_base_of< ProducingService, U >::value > doRegisterProducts(MasterProductRegistry &mpr, ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md)

Member Data Documentation

template<typename T , art::ServiceScope SCOPE>
std::shared_ptr<T> art::detail::ServiceWrapper< T, SCOPE >::service_ptr_
private

The documentation for this class was generated from the following file: