File indexing completed on 2025-02-21 10:00:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_DATAOBJECTFACTORY_H
0012 #define GAUDIKERNEL_DATAOBJECTFACTORY_H
0013
0014 #include <Gaudi/PluginService.h>
0015
0016 class IInterface;
0017 class DataObject;
0018 class ContainedObject;
0019
0020 using ObjFactory = Gaudi::PluginService::Factory<IInterface*( IInterface* )>;
0021 using DataObjFactory = Gaudi::PluginService::Factory<DataObject*()>;
0022 using ContainedObjFactory = Gaudi::PluginService::Factory<ContainedObject*()>;
0023
0024
0025 #define DECLARE_OBJECT_FACTORY( x ) DECLARE_FACTORY( x, ObjFactory )
0026 #define DECLARE_NAMESPACE_OBJECT_FACTORY( n, x ) \
0027 using n::x; \
0028 DECLARE_FACTORY( x, ObjFactory )
0029
0030 #define DECLARE_CONTAINEDOBJECT_FACTORY( x ) DECLARE_FACTORY_WITH_ID( x, x::classID(), ContainedObjFactory )
0031 #define DECLARE_DATAOBJECT_FACTORY( x ) DECLARE_FACTORY_WITH_ID( x, x::classID(), DataObjFactory )
0032
0033 #endif