CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
33 #define ONLY_REGISTER_PLUGIN(record_,type_)\
34 typedef DataProxyWrapper<record_, type_> EDM_PLUGIN_SYM(Proxy , __LINE__ ); \
35 DEFINE_EDM_PLUGIN( cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy , __LINE__ ), #record_ "@NewProxy")
36 
37 #define REGISTER_PLUGIN(record_, type_ ) \
38 INSTANTIATE_PROXY(record_, type_ ) \
39 ONLY_REGISTER_PLUGIN(record_, type_ )
40 
41 #define INSTANTIATE_PROXY_INIT(record_, type_, initializer_) 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 
52 
53 // source_ is the record name of the keyed objects
54 #define REGISTER_KEYLIST_PLUGIN(record_, type_, source_) \
55 template class DataProxyWrapper<record_, type_>; \
56  struct EDM_PLUGIN_SYM(Proxy , record_ ) : public DataProxyWrapper<record_, type_> { EDM_PLUGIN_SYM(Proxy , record_ ) () : DataProxyWrapper<record_, type_>(#source_){};}; \
57 DEFINE_EDM_PLUGIN( cond::ProxyFactory, EDM_PLUGIN_SYM(Proxy , record_ ), #record_ "@NewProxy")
58 
59 
60 
61 #endif /* PLUGINSYSTEM_REGISTRATION_MACROS_H */