11 #ifndef GAUDIKERNEL_SERVICELOCATORHELPER_H 12 #define GAUDIKERNEL_SERVICELOCATORHELPER_H 33 m_requesterName( requester.
name() ) {}
38 m_requesterName(
std::move( requesterName ) ) {}
43 m_requesterName(
std::move( requesterName ) ) {}
44 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 48 : m_svcLoc( svcLoc ), m_msgLog(
log ), m_requesterName(
std::move( requesterName ) ) {}
52 return createIf ? createService(
name, iid, ppSvc ) : locateService(
name, iid, ppSvc,
true );
61 SmartIF<IService> service( std::string_view
name,
const bool quiet =
false,
const bool createIf =
true )
const;
65 return service(
name, quiet, createIf ).as<T>();
Definition of the MsgStream class used to transmit messages.
an helper to share the implementation of service() among the various kernel base classes
Small smart pointer class with automatic reference counting for IInterface.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
SmartIF< T > service(std::string_view name, const bool quiet=false, const bool createIf=true) const
const std::string & requesterName() const
ServiceLocatorHelper(ISvcLocator &svcLoc, std::string requesterName)
ServiceLocatorHelper(ISvcLocator &svcLoc, std::string loggedName, std::string requesterName)
ServiceLocatorHelper(ISvcLocator &svcLoc, const INamedInterface &requester)
std::string m_requesterName
StatusCode getService(std::string_view name, bool createIf, const InterfaceID &iid, void **ppSvc) const
ServiceLocatorHelper(ISvcLocator &svcLoc, const MsgStream &log, std::string requesterName)
This class is used for returning status codes from appropriate routines.
The IMessage is the interface implemented by the message service.
IInterface compliant class extending IInterface with the name() method.
ISvcLocator * serviceLocator() const