![]() |
The Gaudi Framework
v26r3
|
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to locate services in the framework. More...
#include <GaudiKernel/ISvcLocator.h>
Public Member Functions | |
DeclareInterfaceID (ISvcLocator, 3, 0) | |
InterfaceID. More... | |
virtual StatusCode | getService (const Gaudi::Utils::TypeNameString &typeName, IService *&svc, const bool createIf=true) |
Get a reference to the service given a service name. More... | |
virtual StatusCode | getService (const Gaudi::Utils::TypeNameString &typeName, const InterfaceID &iid, IInterface *&pinterface) |
Get a specific interface pointer given a service name and interface id. More... | |
virtual const std::list< IService * > & | getServices () const =0 |
Get a reference to a service and create it if it does not exists. More... | |
virtual bool | existsService (const std::string &name) const =0 |
Check the existence of a service given a service name. More... | |
template<class T > | |
StatusCode | service (const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true) |
Templated method to access a service by name. More... | |
template<class T > | |
StatusCode | service (const std::string &type, const std::string &name, T *&svc, bool createIf=true) |
Templated method to access a service by type and name. More... | |
virtual SmartIF< IService > & | service (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0 |
Returns a smart pointer to a service. More... | |
template<typename T > | |
SmartIF< T > | service (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) |
Returns a smart pointer to the requested interface of a service. More... | |
DeclareInterfaceID (ISvcLocator, 3, 0) | |
InterfaceID. More... | |
virtual StatusCode | getService (const Gaudi::Utils::TypeNameString &typeName, IService *&svc, const bool createIf=true) |
Get a reference to the service given a service name. More... | |
virtual StatusCode | getService (const Gaudi::Utils::TypeNameString &typeName, const InterfaceID &iid, IInterface *&pinterface) |
Get a specific interface pointer given a service name and interface id. More... | |
virtual const std::list< IService * > & | getServices () const =0 |
Get a reference to a service and create it if it does not exists. More... | |
virtual bool | existsService (const std::string &name) const =0 |
Check the existence of a service given a service name. More... | |
template<class T > | |
StatusCode | service (const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true) |
Templated method to access a service by name. More... | |
template<class T > | |
StatusCode | service (const std::string &type, const std::string &name, T *&svc, bool createIf=true) |
Templated method to access a service by type and name. More... | |
virtual SmartIF< IService > & | service (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0 |
Returns a smart pointer to a service. More... | |
template<typename T > | |
SmartIF< T > | service (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) |
Returns a smart pointer to the requested interface of a service. More... | |
![]() | |
virtual void * | i_cast (const InterfaceID &) const =0 |
main cast function More... | |
virtual std::vector< std::string > | getInterfaceNames () const =0 |
Returns a vector of strings containing the names of all the implemented interfaces. More... | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0 |
Set the void** to the pointer to the requested interface of the instance. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
virtual void * | i_cast (const InterfaceID &) const =0 |
main cast function More... | |
virtual std::vector< std::string > | getInterfaceNames () const =0 |
Returns a vector of strings containing the names of all the implemented interfaces. More... | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0 |
Set the void** to the pointer to the requested interface of the instance. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
Additional Inherited Members | |
![]() | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR, SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR, SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
typedef Gaudi::InterfaceId< IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
typedef Gaudi::InterfaceId< IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to locate services in the framework.
Clients use this interface to locate references to interfaces of services existing in the application. This operation needs to be done before the service can be used by the client. Typically "locating the services" is done at the initialization phase of the clients.
Definition at line 26 of file ISvcLocator.h.
ISvcLocator::DeclareInterfaceID | ( | ISvcLocator | , |
3 | , | ||
0 | |||
) |
ISvcLocator::DeclareInterfaceID | ( | ISvcLocator | , |
3 | , | ||
0 | |||
) |
|
pure virtual |
Check the existence of a service given a service name.
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
pure virtual |
Check the existence of a service given a service name.
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
inlinevirtual |
Get a reference to the service given a service name.
name | Service name |
svc | Returned service pointer |
Reimplemented in Gaudi::BootSvcLocator.
Definition at line 36 of file ISvcLocator.h.
|
inlinevirtual |
Get a reference to the service given a service name.
name | Service name |
svc | Returned service pointer |
Reimplemented in Gaudi::BootSvcLocator.
Definition at line 36 of file ISvcLocator.h.
|
inlinevirtual |
Get a specific interface pointer given a service name and interface id.
name | Service name |
iid | Interface ID |
pinterface | Returned pointer to the requested interface |
Reimplemented in Gaudi::BootSvcLocator.
Definition at line 52 of file ISvcLocator.h.
|
inlinevirtual |
Get a specific interface pointer given a service name and interface id.
name | Service name |
iid | Interface ID |
pinterface | Returned pointer to the requested interface |
Reimplemented in Gaudi::BootSvcLocator.
Definition at line 52 of file ISvcLocator.h.
|
pure virtual |
Get a reference to a service and create it if it does not exists.
name | Service name |
svc | Returned service pointer |
createIf | flag to control the creationReturn the list of Services |
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
pure virtual |
Get a reference to a service and create it if it does not exists.
name | Service name |
svc | Returned service pointer |
createIf | flag to control the creationReturn the list of Services |
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
inline |
Templated method to access a service by name.
Definition at line 82 of file ISvcLocator.h.
|
inline |
Templated method to access a service by name.
Definition at line 82 of file ISvcLocator.h.
|
inline |
Templated method to access a service by type and name.
Definition at line 93 of file ISvcLocator.h.
|
inline |
Templated method to access a service by type and name.
Definition at line 93 of file ISvcLocator.h.
|
pure virtual |
Returns a smart pointer to a service.
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
pure virtual |
Returns a smart pointer to a service.
Implemented in ServiceManager, and Gaudi::BootSvcLocator.
|
inline |
Returns a smart pointer to the requested interface of a service.
Definition at line 104 of file ISvcLocator.h.
|
inline |
Returns a smart pointer to the requested interface of a service.
Definition at line 104 of file ISvcLocator.h.