Gaudi Framework, version v23r5
Home
Generated: Wed Nov 28 2012
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiKernel
GaudiKernel
ISvcManager.h
Go to the documentation of this file.
1
// $Id: ISvcManager.h,v 1.7 2008/11/10 15:29:09 marcocle Exp $
2
#ifndef GAUDIKERNEL_ISVCMANAGER_H
3
#define GAUDIKERNEL_ISVCMANAGER_H
4
5
// Include files
6
#include "
GaudiKernel/IComponentManager.h
"
7
#include "
GaudiKernel/SmartIF.h
"
8
#include "
GaudiKernel/TypeNameString.h
"
9
#include <
string
>
10
11
// Forward class declaration
12
#if defined(GAUDI_V20_COMPAT) || (!defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR))
13
class
ISvcFactory;
14
#include "
GaudiKernel/IService.h
"
15
#else
16
class
IService
;
17
#endif
18
class
ISvcLocator
;
19
29
class
GAUDI_API
ISvcManager
:
virtual
public
IComponentManager
{
30
public
:
32
DeclareInterfaceID
(
ISvcManager
,4,0);
33
39
virtual
StatusCode
addService(
IService
* svc,
int
prio = 10) = 0;
40
41
#if !defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR)
42
47
virtual
StatusCode
addService
(
const
std::string
& typ,
const
std::string
& nam,
int
prio ){
48
return
addService(Gaudi::Utils::TypeNameString(nam,typ), prio);
49
}
50
#endif
51
57
virtual
StatusCode
addService(
const
Gaudi::Utils::TypeNameString& nametype,
int
prio = 10) = 0;
58
64
virtual
StatusCode
removeService(
IService
* svc ) = 0;
65
71
virtual
StatusCode
removeService(
const
std::string
& nam ) = 0;
72
73
#if !defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR)
74
80
virtual
StatusCode
declareSvcFactory(
const
ISvcFactory&
/*factory*/
,
81
const
std::string
&
/*svctype*/
) {
82
// This function is never used.
83
return
StatusCode::FAILURE
;
84
}
85
#endif
86
93
virtual
StatusCode
declareSvcType(
const
std::string
& svcname,
94
const
std::string
& svctype ) = 0;
95
102
virtual
SmartIF<IService>
& createService(
const
Gaudi::Utils::TypeNameString& nametype) = 0;
103
104
#if !defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR)
105
113
virtual
StatusCode
createService(
const
std::string
& svctype,
114
const
std::string
& svcname,
115
IService
*& svc ){
116
SmartIF<IService>
s
= createService(svctype +
"/"
+ svcname);
117
svc = s.
get
();
118
if
(svc) {
119
svc->
addRef
();
// Needed to maintain the correct reference counting.
120
return
StatusCode::SUCCESS
;
121
}
122
return
StatusCode::FAILURE
;
123
}
124
131
virtual
StatusCode
getFactory(
const
std::string
&
/*svc_type*/
,
132
const
ISvcFactory*&
/*fac*/
)
const
{
133
// This function is never used.
134
return
StatusCode::FAILURE
;
135
}
136
141
virtual
StatusCode
initializeServices
() {
return
initialize
(); }
142
147
virtual
StatusCode
startServices
() {
return
start
(); }
148
153
virtual
StatusCode
stopServices
() {
return
stop
(); }
154
159
virtual
StatusCode
finalizeServices
() {
return
finalize
(); }
160
165
virtual
StatusCode
reinitializeServices
() {
return
reinitialize
(); }
166
171
virtual
StatusCode
restartServices
() {
return
restart
(); }
172
#endif
173
174
virtual
int
getPriority(
const
std::string
& name)
const
= 0;
175
virtual
StatusCode
setPriority(
const
std::string
& name,
int
pri) = 0;
176
178
virtual
bool
loopCheckEnabled()
const
= 0;
180
virtual
void
setLoopCheckEnabled(
bool
en =
true
) = 0;
181
182
};
183
184
#endif // GAUDIKERNEL_ISVCMANAGER_H
185
Generated at Wed Nov 28 2012 12:17:13 for Gaudi Framework, version v23r5 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004