Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:34

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
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 // Macros to declare component factories
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 // GAUDIKERNEL_OBJECTFactory_H