CMS 3D CMS Logo

register_dataproxybuilder_macro.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_register_dataproxybuilder_macro_h
2 #define Fireworks_Core_register_dataproxybuilder_macro_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : register_dataproxybuilder_macro
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu Jun 5 15:31:20 EDT 2008
19 //
20 
21 // system include files
22 #include <cstdlib>
23 #include <string>
24 
25 // user include files
28 
29 // forward declarations
30 
31 #define REGISTER_PROXYBUILDER_METHODS() \
32  const std::string& typeName() const { return classTypeName(); } \
33  const std::string& view() const { return classView(); } \
34  const std::string& purpose() const { return classPurpose(); } \
35  static const std::string& classRegisterTypeName(); \
36  static const std::string& classTypeName(); \
37  static const std::string& classPurpose(); \
38  static const std::string& classView()
39 
40 #define DEFINE_PROXYBUILDER_METHODS(_builder_, _type_, _purpose_, _view_) \
41  const std::string& _builder_::classTypeName() { \
42  static std::string s_type = edm::TypeWithDict(typeid(_type_)).name(); \
43  return s_type; \
44  } \
45  const std::string& _builder_::classRegisterTypeName() { \
46  static std::string s_type(typeid(_type_).name()); \
47  return s_type; \
48  } \
49  const std::string& _builder_::classView() { \
50  static std::string s_view(std::to_string(_view_)); \
51  return s_view; \
52  } \
53  const std::string& _builder_::classPurpose() { \
54  static std::string s_purpose(_purpose_); \
55  return s_purpose; \
56  } \
57  enum { EDM_CONCATENATE(dummy_proxybuilder_methods_, __LINE__) }
58 
59 #endif