The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ObjectFactory.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13#include <Gaudi/PluginService.h>
14
15class IInterface;
16class DataObject;
17class ContainedObject;
18
19using ObjFactory = Gaudi::PluginService::Factory<IInterface*( IInterface* )>;
20using DataObjFactory = Gaudi::PluginService::Factory<DataObject*()>;
21using ContainedObjFactory = Gaudi::PluginService::Factory<ContainedObject*()>;
22
23// Macros to declare component factories
24#define DECLARE_OBJECT_FACTORY( x ) DECLARE_FACTORY( x, ObjFactory )
25#define DECLARE_NAMESPACE_OBJECT_FACTORY( n, x ) \
26 using n::x; \
27 DECLARE_FACTORY( x, ObjFactory )
28
29#define DECLARE_CONTAINEDOBJECT_FACTORY( x ) DECLARE_FACTORY_WITH_ID( x, x::classID(), ContainedObjFactory )
30#define DECLARE_DATAOBJECT_FACTORY( x ) DECLARE_FACTORY_WITH_ID( x, x::classID(), DataObjFactory )
Gaudi::PluginService::Factory< IInterface *(IInterface *)> ObjFactory
Gaudi::PluginService::Factory< ContainedObject *()> ContainedObjFactory
Gaudi::PluginService::Factory< DataObject *()> DataObjFactory
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
Definition of the basic interface.
Definition IInterface.h:225