Gaudi Framework, version v23r9
Home
Generated: Thu Jul 18 2013
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
IToolSvc.h
Go to the documentation of this file.
1
#ifndef GAUDIKERNEL_ITOOLSVC_H
2
#define GAUDIKERNEL_ITOOLSVC_H
3
4
#include "
GaudiKernel/IInterface.h
"
5
#include "
GaudiKernel/System.h
"
6
#include <
string
>
7
8
// Forward declaration
9
class
IAlgTool
;
10
17
class
GAUDI_API
IToolSvc
:
virtual
public
IInterface
{
18
public
:
20
DeclareInterfaceID
(
IToolSvc
,2,0);
21
33
virtual
StatusCode
retrieve (
const
std::string
&
type
,
34
const
InterfaceID
&
iid
,
35
IAlgTool
*& tool ,
36
const
IInterface
* parent = 0 ,
37
bool
createIf =
true
) = 0;
38
51
virtual
StatusCode
retrieve (
const
std::string
& type ,
52
const
std::string
& name ,
53
const
InterfaceID
& iid ,
54
IAlgTool
*& tool ,
55
const
IInterface
* parent = 0 ,
56
bool
createIf =
true
) = 0 ;
57
61
virtual
std::vector<std::string>
getInstances(
const
std::string
& toolType ) = 0;
62
66
virtual
StatusCode
releaseTool(
IAlgTool
* tool ) = 0;
67
68
132
template
<
class
T>
133
StatusCode
retrieveTool (
const
std::string
& type ,
134
T*& tool ,
135
const
IInterface
* parent = 0 ,
136
bool
createIf =
true
)
137
{
138
return
retrieve( type,
139
T::interfaceID(),
140
(
IAlgTool
*&)tool,
141
parent,
142
createIf );
143
}
144
188
template
<
class
T>
189
StatusCode
retrieveTool (
const
std::string
& type ,
190
const
std::string
& name ,
191
T*& tool ,
192
const
IInterface
* parent = 0 ,
193
bool
createIf =
true
)
194
{
195
return
retrieve ( type,
196
name,
197
T::interfaceID(),
198
(
IAlgTool
*&)tool,
199
parent,
200
createIf );
201
}
202
232
class
Observer
{
233
public
:
234
virtual
~Observer
() {}
235
virtual
void
onCreate
(
const
IAlgTool
*) {}
236
virtual
void
onRetrieve
(
const
IAlgTool
*) {}
237
};
238
239
virtual
void
registerObserver(Observer *obs) = 0;
240
virtual
void
unRegisterObserver(Observer *obs) = 0;
241
242
243
};
244
245
246
#endif // GAUDIKERNEL_ITOOLSVC_H
Generated at Thu Jul 18 2013 12:18:03 for Gaudi Framework, version v23r9 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004