CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
registration_macros.h
Go to the documentation of this file.
1 #ifndef PLUGINSYSTEM_REGISTRATION_MACROS_H
2 #define PLUGINSYSTEM_REGISTRATION_MACROS_H
3 // -*- C++ -*-
4 //
5 // Package: ESSources
6 // Class : registration_macros
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Jul 25 06:47:37 EDT 2005
19 //
20 
21 // system include files
22 
23 // user include files
26 
27 // forward declarations
28 
29 // macros
30 #define INSTANTIATE_PROXY(record_, type_) template class DataProxyWrapper<record_, type_>;
31 
32 #define ONLY_REGISTER_PLUGIN(record_, type_) \
33  typedef DataProxyWrapper<record_, type_> EDM_PLUGIN_SYM(Proxy, __LINE__); \
34  DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, __LINE__), #record_ "@NewProxy")
35 
36 #define REGISTER_PLUGIN(record_, type_) \
37  INSTANTIATE_PROXY(record_, type_) \
38  ONLY_REGISTER_PLUGIN(record_, type_)
39 
40 #define INSTANTIATE_PROXY_INIT(record_, type_, initializer_) \
41  template class DataProxyWrapper<record_, type_, initializer_>;
42 
43 #define ONLY_REGISTER_PLUGIN_INIT(record_, type_, initializer_) \
44  typedef DataProxyWrapper<record_, type_, initializer_> EDM_PLUGIN_SYM(Proxy, __LINE__); \
45  DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, __LINE__), #record_ "@NewProxy")
46 
47 #define REGISTER_PLUGIN_INIT(record_, type_, initializer_) \
48  INSTANTIATE_PROXY_INIT(record_, type_, initializer_) \
49  ONLY_REGISTER_PLUGIN_INIT(record_, type_, initializer_)
50 
51 // source_ is the record name of the keyed objects
52 #define REGISTER_KEYLIST_PLUGIN(record_, type_, source_) \
53  template class DataProxyWrapper<record_, type_>; \
54  struct EDM_PLUGIN_SYM(Proxy, record_) : public DataProxyWrapper<record_, type_> { \
55  EDM_PLUGIN_SYM(Proxy, record_)() : DataProxyWrapper<record_, type_>(#source_){}; \
56  }; \
57  DEFINE_EDM_PLUGIN(cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy, record_), #record_ "@NewProxy")
58 
59 #endif /* PLUGINSYSTEM_REGISTRATION_MACROS_H */