| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ISvcManager Class Reference

`#include <GaudiKernel/ISvcManager.h>`

Inheritance diagram for ISvcManager:

[legend]
Collaboration diagram for ISvcManager:

[legend]
List of all members.

## Detailed Description

The ISvcManager is the interface implemented by the Service Factory in the Application Manager to support management functions.

Clients use this interface to declare abstract service factories, and to create concrete instances of services.

Author:
  Pere Mato

Definition at line 26 of file ISvcManager.h.

## Public Member Functions
virtual StatusCode | addService (IService *svc, int prio)=0
| Add a service to the "active" list of services of the factory.
virtual StatusCode | addService (const std::string &typ, const std::string &nam, int prio)=0
| Add a service to the "active" list of services of the factory.
virtual StatusCode | removeService (IService *svc)=0
| Remove a service from the "active" list of services of the factory.
virtual StatusCode | removeService (const std::string &nam)=0
| Remove a service from the "active" list of services of the factory.
virtual StatusCode | declareSvcFactory (const ISvcFactory &factory, const std::string &svctype)=0
| Declare an abstract factory for a given service type.
virtual StatusCode | declareSvcType (const std::string &svcname, const std::string &svctype)=0
| Declare the type of the service to be used when crating a given service name.
virtual StatusCode | createService (const std::string &svctype, const std::string &svcname, IService *&svc)=0
| Creates and instance of a service type that has been declared beforehand and assigns it a name.
virtual StatusCode | getFactory (const std::string &svc_type, const ISvcFactory *&fac) const=0
| Access to service factory by name to create unmanaged services.
virtual StatusCode | initializeServices ()=0
| Initializes the list of "active" services.
virtual StatusCode | startServices ()=0
| Starts the list of "active" services.
virtual StatusCode | stopServices ()=0
| Stops the list of "active" services.
virtual StatusCode | finalizeServices ()=0
| Finalizes the list of "active" services.
virtual StatusCode | reinitializeServices ()=0
| Reinitializes the list of "active" services.
virtual StatusCode | restartServices ()=0
| Restarts the list of "active" services.
virtual int | getPriority (const std::string &name) const =0
virtual StatusCode | setPriority (const std::string &name, int pri)=0
## Static Public Member Functions
static const InterfaceID & | interfaceID ()
| Retrieve interface ID.

## Member Function Documentation

static const InterfaceID& ISvcManager::interfaceID | ( |  | ) | `[inline, static]`

Retrieve interface ID.

Reimplemented from IInterface.

Definition at line 30 of file ISvcManager.h.

References IID_ISvcManager.

Referenced by ApplicationMgr::queryInterface().

    00030 { return IID_ISvcManager; }

virtual StatusCode ISvcManager::addService | ( | IService * | svc,
|  | int | prio |
| ) |  |  | `[pure virtual]`

Add a service to the "active" list of services of the factory.

Parameters:

  | svc | Pointer to the service

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::addService | ( | const std::string & | typ,
|  | const std::string & | nam,
|  | int | prio |
| ) |  |  | `[pure virtual]`

Add a service to the "active" list of services of the factory.

Parameters:

  | svc | Pointer to the service

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::removeService | ( | IService * | svc | ) | `[pure virtual]`

Remove a service from the "active" list of services of the factory.

Parameters:

  | svc | Pointer to the service

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

Referenced by Service::release().

virtual StatusCode ISvcManager::removeService | ( | const std::string & | nam | ) | `[pure virtual]`

Remove a service from the "active" list of services of the factory.

Parameters:

  | svc | Pointer to the service

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::declareSvcFactory | ( | const ISvcFactory & | factory,
|  | const std::string & | svctype |
| ) |  |  | `[pure virtual]`

Declare an abstract factory for a given service type.

Parameters:

  | factory | Abstract factory reference
  | svctype | Service type name

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::declareSvcType | ( | const std::string & | svcname,
|  | const std::string & | svctype |
| ) |  |  | `[pure virtual]`

Declare the type of the service to be used when crating a given service name.

Parameters:

  | svcname | Service name
  | svctype | Service type name

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

Referenced by ISvcLocator::service().

virtual StatusCode ISvcManager::createService | ( | const std::string & | svctype,
|  | const std::string & | svcname,
|  | IService *& | svc |
| ) |  |  | `[pure virtual]`

Creates and instance of a service type that has been declared beforehand and assigns it a name.

It returns a pointer to an IService.

Parameters:

  | svctype | Service type name
  | svcname | Service name to be set
  | svc | Returned service pointer

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::getFactory | ( | const std::string & | svc_type,
|  | const ISvcFactory *& | fac |
| ) |  |  | const`[pure virtual]`

Access to service factory by name to create unmanaged services.

Parameters:

  | svc_type | [IN] Name of the service type
  | fac | [OUT] Reference to store pointer to service factory

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::initializeServices | ( |  | ) | `[pure virtual]`

Initializes the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::startServices | ( |  | ) | `[pure virtual]`

Starts the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::stopServices | ( |  | ) | `[pure virtual]`

Stops the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::finalizeServices | ( |  | ) | `[pure virtual]`

Finalizes the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::reinitializeServices | ( |  | ) | `[pure virtual]`

Reinitializes the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual StatusCode ISvcManager::restartServices | ( |  | ) | `[pure virtual]`

Restarts the list of "active" services.

Returns:
  StatusCode indicating success or failure.

Implemented in ServiceManager.

virtual int ISvcManager::getPriority | ( | const std::string & | name | ) | const`[pure virtual]`

Implemented in ServiceManager.

virtual StatusCode ISvcManager::setPriority | ( | const std::string & | name,
|  | int | pri |
| ) |  |  | `[pure virtual]`

Implemented in ServiceManager.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/GaudiKernel/ISvcManager.h