The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ISvcManager.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
15#include <GaudiKernel/SmartIF.h>
17#include <string>
18
19class ISvcLocator;
20
30class GAUDI_API ISvcManager : virtual public IComponentManager {
31public:
34
35 static const int DEFAULT_SVC_PRIORITY = 100;
36
42 virtual StatusCode addService( IService* svc, int prio = DEFAULT_SVC_PRIORITY ) = 0;
43
49 virtual StatusCode addService( const Gaudi::Utils::TypeNameString& nametype, int prio = DEFAULT_SVC_PRIORITY ) = 0;
50
56 virtual StatusCode removeService( IService* svc ) = 0;
57
63 virtual StatusCode removeService( std::string_view nam ) = 0;
64
71 virtual StatusCode declareSvcType( std::string svcname, std::string svctype ) = 0;
72
89
90 virtual int getPriority( std::string_view name ) const = 0;
91 virtual StatusCode setPriority( std::string_view name, int pri ) = 0;
92
94 virtual bool loopCheckEnabled() const = 0;
96 virtual void setLoopCheckEnabled( bool en = true ) = 0;
97};
#define GAUDI_API
Definition Kernel.h:49
Helper class to parse a string of format "type/name".
General service interface definition.
Definition IService.h:26
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
Definition ISvcManager.h:30
virtual StatusCode removeService(IService *svc)=0
Remove a service from the "active" list of services of the factory.
virtual StatusCode addService(const Gaudi::Utils::TypeNameString &nametype, int prio=DEFAULT_SVC_PRIORITY)=0
Add a service to the "active" list of services of the factory.
virtual StatusCode setPriority(std::string_view name, int pri)=0
virtual int getPriority(std::string_view name) const =0
virtual bool loopCheckEnabled() const =0
Get the value of the initialization loop check flag.
virtual void setLoopCheckEnabled(bool en=true)=0
Set the value of the initialization loop check flag.
virtual StatusCode declareSvcType(std::string svcname, std::string svctype)=0
Declare the type of the service to be used when crating a given service name.
static const int DEFAULT_SVC_PRIORITY
Definition ISvcManager.h:35
virtual StatusCode removeService(std::string_view nam)=0
Remove a service from the "active" list of services of the factory.
virtual SmartIF< IService > & createService(const Gaudi::Utils::TypeNameString &nametype)=0
Creates and instance of a service type that has been declared beforehand and assigns it a name.
DeclareInterfaceID(ISvcManager, 4, 0)
InterfaceID.
virtual StatusCode addService(IService *svc, int prio=DEFAULT_SVC_PRIORITY)=0
Add a service to the "active" list of services of the factory.
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64