File indexing completed on 2021-02-14 12:50:35
0001 #ifndef PLUGINSYSTEM_REGISTRATION_MACROS_H
0002 #define PLUGINSYSTEM_REGISTRATION_MACROS_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "CondCore/ESSources/interface/ProxyFactory.h"
0025 #include "CondCore/ESSources/interface/DataProxy.h"
0026
0027
0028
0029
0030 #define INSTANTIATE_PROXY(record_, type_) template class DataProxyWrapper<record_, type_>;
0031
0032 #define ONLY_REGISTER_PLUGIN(record_, type_) \
0033 typedef DataProxyWrapper<record_, type_> EDM_PLUGIN_SYM(Proxy, __LINE__); \
0034 DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, __LINE__), #record_ "@NewProxy")
0035
0036 #define REGISTER_PLUGIN(record_, type_) \
0037 INSTANTIATE_PROXY(record_, type_) \
0038 ONLY_REGISTER_PLUGIN(record_, type_)
0039
0040 #define INSTANTIATE_PROXY_INIT(record_, type_, initializer_) \
0041 template class DataProxyWrapper<record_, type_, initializer_>;
0042
0043 #define ONLY_REGISTER_PLUGIN_INIT(record_, type_, initializer_) \
0044 typedef DataProxyWrapper<record_, type_, initializer_> EDM_PLUGIN_SYM(Proxy, __LINE__); \
0045 DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, __LINE__), #record_ "@NewProxy")
0046
0047 #define REGISTER_PLUGIN_INIT(record_, type_, initializer_) \
0048 INSTANTIATE_PROXY_INIT(record_, type_, initializer_) \
0049 ONLY_REGISTER_PLUGIN_INIT(record_, type_, initializer_)
0050
0051
0052 #define REGISTER_KEYLIST_PLUGIN(record_, type_, source_) \
0053 template class DataProxyWrapper<record_, type_>; \
0054 struct EDM_PLUGIN_SYM(Proxy, record_) : public DataProxyWrapper<record_, type_> { \
0055 EDM_PLUGIN_SYM(Proxy, record_)() : DataProxyWrapper<record_, type_>(#source_){}; \
0056 }; \
0057 DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, record_), #record_ "@NewProxy")
0058
0059 #endif