Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:33

0001 #ifndef Fireworks_Core_register_dataproxybuilder_macro_h
0002 #define Fireworks_Core_register_dataproxybuilder_macro_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     register_dataproxybuilder_macro
0007 //
0008 /**
0009 
0010    Description: Adds needed methods to a ProxyBuilder
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu Jun  5 15:31:20 EDT 2008
0019 //
0020 
0021 // system include files
0022 #include <cstdlib>
0023 #include <string>
0024 
0025 // user include files
0026 #include "FWCore/Reflection/interface/TypeWithDict.h"
0027 #include "FWCore/Utilities/interface/concatenate.h"
0028 
0029 // forward declarations
0030 
0031 #define REGISTER_PROXYBUILDER_METHODS()                           \
0032   const std::string& typeName() const { return classTypeName(); } \
0033   const std::string& view() const { return classView(); }         \
0034   const std::string& purpose() const { return classPurpose(); }   \
0035   static const std::string& classRegisterTypeName();              \
0036   static const std::string& classTypeName();                      \
0037   static const std::string& classPurpose();                       \
0038   static const std::string& classView()
0039 
0040 #define DEFINE_PROXYBUILDER_METHODS(_builder_, _type_, _purpose_, _view_) \
0041   const std::string& _builder_::classTypeName() {                         \
0042     static std::string s_type = edm::TypeWithDict(typeid(_type_)).name(); \
0043     return s_type;                                                        \
0044   }                                                                       \
0045   const std::string& _builder_::classRegisterTypeName() {                 \
0046     static std::string s_type(typeid(_type_).name());                     \
0047     return s_type;                                                        \
0048   }                                                                       \
0049   const std::string& _builder_::classView() {                             \
0050     static std::string s_view(std::to_string(_view_));                    \
0051     return s_view;                                                        \
0052   }                                                                       \
0053   const std::string& _builder_::classPurpose() {                          \
0054     static std::string s_purpose(_purpose_);                              \
0055     return s_purpose;                                                     \
0056   }                                                                       \
0057   enum { EDM_CONCATENATE(dummy_proxybuilder_methods_, __LINE__) }
0058 
0059 #endif