1 #ifndef _GAUDI_PLUGIN_SERVICE_H_ 2 #define _GAUDI_PLUGIN_SERVICE_H_ 22 #define DECLARE_FACTORY_WITH_ID( type, id, factory ) _INTERNAL_DECLARE_FACTORY( type, id, factory, __LINE__ ) 24 #define DECLARE_FACTORY( type, factory ) \ 25 DECLARE_FACTORY_WITH_ID( type, ::Gaudi::PluginService::Details::demangle<type>(), factory ) 27 #define DECLARE_FACTORY_WITH_CREATOR_AND_ID( type, typecreator, id, factory ) \ 28 _INTERNAL_DECLARE_FACTORY_WITH_CREATOR( type, typecreator, id, factory, __LINE__ ) 30 #define DECLARE_FACTORY_WITH_CREATOR( type, typecreator, factory ) \ 31 DECLARE_FACTORY_WITH_CREATOR_AND_ID( type, typecreator, ::Gaudi::PluginService::Details::demangle<type>(), factory ) 33 #define DECLARE_COMPONENT( type ) DECLARE_FACTORY( type, type::Factory ) 35 #define DECLARE_COMPONENT_WITH_ID( type, id ) DECLARE_FACTORY_WITH_ID( type, id, type::Factory ) 39 namespace PluginService
42 #if !defined( __REFLEX__ ) || defined( ATLAS ) 43 template <
typename R,
typename... Args>
53 const FuncType c = Details::getCreator<FuncType>( id );
54 return c ? ( *c )( std::forward<Args>(
args )... ) : 0;
72 const char* what()
const throw()
override;
80 #endif //_GAUDI_PLUGIN_SERVICE_H_ static ReturnType create(const T &id, Args...args)
static ReturnType create(const std::string &id, Args...args)
Class wrapping the signature for a factory with any number of arguments.
R(* FuncType)(Args &&...)
Helper functions to set/get the application return code.