1 #ifndef GAUDIKERNEL_SERVICE_H
2 #define GAUDIKERNEL_SERVICE_H
35 typedef Gaudi::PluginService::Factory2<
IService*,
42 virtual unsigned long release();
45 virtual const std::string&
name()
const;
79 virtual const std::vector<Property*>& getProperties( )
const;
121 template <
class TYPE>
147 const_cast<T*
>(psvc)->
addRef();
176 return service(svcType +
"/" + svcName, psvc);
209 (
const std::string& name ,
211 const std::string& doc =
"none" )
const
213 return m_propertyMgr -> declareProperty ( name , property , doc ) ;
225 (
const std::string& name ,
227 const std::string& rname =
"" )
const
229 return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname ) ;
272 void initOutputLevel(
Property& prop);
275 #ifndef GAUDI_NEW_PLUGIN_SERVICE
279 template <
typename S>
280 static typename S::ReturnType
create(
typename S::Arg1Type a1,
281 typename S::Arg2Type a2) {
282 return new T(a1, a2);
287 #define DECLARE_SERVICE_FACTORY(x) \
288 DECLARE_FACTORY_WITH_CREATOR(x, SvcFactory< x >, Service::Factory)
289 #define DECLARE_NAMED_SERVICE_FACTORY(x, n) \
290 DECLARE_FACTORY_WITH_CREATOR_AND_ID(x, SvcFactory< x >, #n, Service::Factory)
291 #define DECLARE_NAMESPACE_SERVICE_FACTORY(n, x) \
292 DECLARE_SERVICE_FACTORY(n::x)
297 #define DECLARE_SERVICE_FACTORY(x) DECLARE_COMPONENT(x)
298 #define DECLARE_NAMED_SERVICE_FACTORY(x, n) DECLARE_COMPONENT_WITH_ID(x, #n)
299 #define DECLARE_NAMESPACE_SERVICE_FACTORY(n, x) DECLARE_COMPONENT(n::x)
303 #endif // GAUDIKERNEL_SERVICE_H