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

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

Inheritance diagram for art::detail::ServiceWrapper< T >:
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_v<U, T>>>
std::unique_ptr< ServiceWrapper< U > > getAs () const
 

Private Member Functions

void registerProducts (ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md) override
 

Private Attributes

std::shared_ptr< Tservice_ptr_
 

Detailed Description

template<typename T>
class art::detail::ServiceWrapper< T >

Definition at line 19 of file ServiceWrapper.h.

Constructor & Destructor Documentation

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

Definition at line 54 of file ServiceWrapper.h.

References nd_projection_maker::ps.

55  : service_ptr_{makeServiceFrom<T>(ps, areg)}
56  {}
std::shared_ptr< T > service_ptr_
template<typename T >
art::detail::ServiceWrapper< T >::ServiceWrapper ( std::shared_ptr< T > &&  p)
inlineexplicit

Definition at line 58 of file ServiceWrapper.h.

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

Member Function Documentation

template<typename T >
T& art::detail::ServiceWrapper< T >::get ( )
inline

Definition at line 61 of file ServiceWrapper.h.

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

62  {
63  return *service_ptr_;
64  }
std::shared_ptr< T > service_ptr_
template<typename T >
template<typename U , typename = std::enable_if_t<std::is_base_of_v<U, T>>>
std::unique_ptr<ServiceWrapper<U> > art::detail::ServiceWrapper< T >::getAs ( ) const
inline

Definition at line 69 of file ServiceWrapper.h.

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

70  {
71  return std::make_unique<ServiceWrapper<U>>(
72  std::static_pointer_cast<U>(service_ptr_));
73  }
std::shared_ptr< T > service_ptr_
template<typename T >
ServiceWrapper& art::detail::ServiceWrapper< T >::operator= ( ServiceWrapper< T > const &  )
delete
template<typename T >
void art::detail::ServiceWrapper< T >::registerProducts ( ProductDescriptions productsToProduce,
ProducingServiceSignals signals,
ModuleDescription const &  md 
)
inlineoverrideprivatevirtual

Implements art::detail::ServiceWrapperBase.

Definition at line 77 of file ServiceWrapper.h.

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

80  {
81  if constexpr (std::is_base_of_v<ProducingService, T>) {
82  service_ptr_->registerCallbacks(signals);
83  service_ptr_->setModuleDescription(md);
84  service_ptr_->registerProducts(productsToProduce, md);
85  }
86  }
std::shared_ptr< T > service_ptr_

Member Data Documentation

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

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