CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
24 
25 // forward declarations
26 
27 #define REGISTER_PROXYBUILDER_METHODS() \
28  const std::string& typeName() const { return classTypeName(); } \
29  const std::string& view() const { return classView(); } \
30  const std::string& purpose() const { return classPurpose(); } \
31  static const std::string& classRegisterTypeName(); \
32  static const std::string& classTypeName(); \
33  static const std::string& classPurpose(); \
34  static const std::string& classView()
35 
36 #define CONCATENATE_HIDDEN(a, b) a##b
37 #define CONCATENATE(a, b) CONCATENATE_HIDDEN(a, b)
38 
39 #define DEFINE_PROXYBUILDER_METHODS(_builder_, _type_, _purpose_, _view_) \
40  const std::string& _builder_::classTypeName() { \
41  static std::string s_type = edm::TypeWithDict(typeid(_type_)).name(); \
42  return s_type; \
43  } \
44  const std::string& _builder_::classRegisterTypeName() { \
45  static std::string s_type(typeid(_type_).name()); \
46  return s_type; \
47  } \
48  const std::string& _builder_::classView() { \
49  static std::string s_view(std::to_string(_view_)); \
50  return s_view; \
51  } \
52  const std::string& _builder_::classPurpose() { \
53  static std::string s_purpose(_purpose_); \
54  return s_purpose; \
55  } \
56  enum { CONCATENATE(dummy_proxybuilder_methods_, __LINE__) }
57 
58 #endif