1 #ifndef GAUDIKERNEL_CONVERTER_H
2 #define GAUDIKERNEL_CONVERTER_H
5 #include "GaudiKernel/IConverter.h"
6 #include "GaudiKernel/ISvcLocator.h"
7 #include "GaudiKernel/IService.h"
8 #include "GaudiKernel/ConversionSvc.h"
9 #include "GaudiKernel/IDataProviderSvc.h"
10 #include "GaudiKernel/IDataManagerSvc.h"
56 const CLID& objType()
const override;
60 virtual long i_repSvcType()
const;
91 StatusCode service(
const std::string&
name, T*& psvc,
bool createIf =
false )
const {
92 return service_i(name, createIf, T::interfaceID(), (
void**)&psvc);
97 StatusCode service(
const std::string&
type,
const std::string& name, T*& psvc)
const {
98 return service_i(type, name, T::interfaceID(), (
void**)&psvc);
102 SmartIF<IService> service(
const std::string& name,
const bool createIf =
true)
const;
123 const CLID m_classType;
138 StatusCode service_i(
const std::string& svcName,
142 StatusCode service_i(
const std::string& svcType,
143 const std::string& svcName,
154 return m_stype ==
id.m_stype && m_clid ==
id.m_clid;
163 return s <<
"CNV_" <<
id.m_stype <<
"_" <<
id.m_clid;
167 #ifndef GAUDI_NEW_PLUGIN_SERVICE
172 template <
typename S,
typename... Args>
173 static typename S::ReturnType
create(Args&&...
a1) {
174 return new T(std::forward<Args>(
a1)...);
180 #define DECLARE_CONVERTER_FACTORY(x) \
181 DECLARE_FACTORY_WITH_CREATOR_AND_ID(x, CnvFactory< x >, \
182 ConverterID(x::storageType(), x::classID()), Converter::Factory)
183 #define DECLARE_NAMESPACE_CONVERTER_FACTORY(n, x) \
184 DECLARE_CONVERTER_FACTORY(n::x)
189 #define DECLARE_CONVERTER_FACTORY(x) \
190 DECLARE_COMPONENT_WITH_ID(x, ConverterID(x::storageType(), x::classID()))
191 #define DECLARE_NAMESPACE_CONVERTER_FACTORY(n, x) \
192 DECLARE_CONVERTER_FACTORY(n::x)
196 #endif // GAUDIKERNEL_CONVERTER_H
std::ostream & operator<<(std::ostream &s, const ConverterID &id)
Base class used to implement the interfaces.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
The data converters are responsible to translate data from one representation into another...
IAddressCreator interface definition.
static S::ReturnType create(Args &&...a1)
Data provider interface definition.
This class is used for returning status codes from appropriate routines.
The IMessage is the interface implemented by the message service.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Class wrapping the signature for a factory with any number of arguments.
Opaque address interface definition.
unsigned int CLID
Class ID definition.
A DataObject is the base class of any identifiable object on any data store.
bool operator==(const GaudiUtils::Allocator< T1 > &, const GaudiUtils::Allocator< T2 > &)