Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 "GaudiKernel/invoke.h"
7 
8 // Forward declarations:
9 class IRegistry;
10 
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 Gaudi::invoke( f, pObj, level ); }
38  };
39 } // namespace details
40 
41 template <typename F>
43  return {std::forward<F>( f )};
44 }
45 
46 #endif // GAUDIKERNEL_IDATASTOREAGENT_H
bool analyse(IRegistry *pObj, int level) override
Analyse the data object.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
Generic data agent interface.
dictionary g
Definition: gaudirun.py:516
auto invoke(F &&f, ArgTypes &&...args) noexcept(noexcept(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))) -> decltype(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))
Definition: invoke.h:82
#define GAUDI_API
Definition: Kernel.h:71
::details::GenericDataStoreAgent< F > makeDataStoreAgent(F &&f)