Warning, file /include/GaudiKernel/IDataStoreAgent.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_IDATASTOREAGENT_H
0012 #define GAUDIKERNEL_IDATASTOREAGENT_H
0013
0014
0015 #include <GaudiKernel/Kernel.h>
0016 #include <functional>
0017
0018
0019 class IRegistry;
0020
0021
0022
0023
0024
0025
0026
0027 class GAUDI_API IDataStoreAgent {
0028 public:
0029
0030 virtual ~IDataStoreAgent() = default;
0031
0032
0033
0034
0035 virtual bool analyse( IRegistry* pObject, int level ) = 0;
0036 };
0037
0038 namespace details {
0039 template <typename F>
0040 class GenericDataStoreAgent final : public IDataStoreAgent {
0041 F f;
0042
0043 public:
0044 template <typename G>
0045 GenericDataStoreAgent( G&& g ) : f{ std::forward<G>( g ) } {}
0046
0047 bool analyse( IRegistry* pObj, int level ) override { return std::invoke( f, pObj, level ); }
0048 };
0049 }
0050
0051 template <typename F>
0052 ::details::GenericDataStoreAgent<F> makeDataStoreAgent( F&& f ) {
0053 return { std::forward<F>( f ) };
0054 }
0055
0056 #endif