| The Gaudi Framework v32r1 (f65d50dc)

IDataStoreAgent.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IDATASTOREAGENT_H
2 #define GAUDIKERNEL_IDATASTOREAGENT_H
3
4 // Framework include files
5 #include "GaudiKernel/Kernel.h"
6 #include <functional>
7
8 // Forward declarations:
9 class IRegistry;
10
17 class GAUDI_API IDataStoreAgent {
18 public:
20 virtual ~IDataStoreAgent() = default;
21
25 virtual bool analyse( IRegistry* pObject, int level ) = 0;
26 };
27
28 namespace details {
29 template <typename F>
30 class GenericDataStoreAgent final : public IDataStoreAgent {
31 F f;
32
33 public:
34 template <typename G>
35 GenericDataStoreAgent( G&& g ) : f{std::forward<G>( g )} {}
36
37 bool analyse( IRegistry* pObj, int level ) override { return std::invoke( f, pObj, level ); }
38 };
39 } // namespace details
40
41 template <typename F>
42 ::details::GenericDataStoreAgent<F> makeDataStoreAgent( F&& f ) {
43 return {std::forward<F>( f )};
44 }
45
46 #endif // GAUDIKERNEL_IDATASTOREAGENT_H
Kernel.h
details::GenericDataStoreAgent::analyse
bool analyse(IRegistry *pObj, int level) override
Analyse the data object.
Definition: IDataStoreAgent.h:37
details::GenericDataStoreAgent::f
F f
Definition: IDataStoreAgent.h:31
details::GenericDataStoreAgent
Definition: IDataStoreAgent.h:30
details::GenericDataStoreAgent::GenericDataStoreAgent
GenericDataStoreAgent(G &&g)
Definition: IDataStoreAgent.h:35
details
Definition: AnyDataWrapper.h:10
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
IDataStoreAgent
Generic data agent interface.
Definition: IDataStoreAgent.h:17
gaudirun.g
dictionary g
Definition: gaudirun.py:520
gaudirun.level
level
Definition: gaudirun.py:334
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
makeDataStoreAgent
::details::GenericDataStoreAgent< F > makeDataStoreAgent(F &&f)
Definition: IDataStoreAgent.h:42