definition_helper_macros.h
Go to the documentation of this file.
1 #ifndef art_Framework_Services_Registry_detail_definition_helper_macros_h
2 #define art_Framework_Services_Registry_detail_definition_helper_macros_h
3 // vim: set sw=2 expandtab :
4 
6 
7 #include <memory>
8 
9 // Define the C-linkage function to create the helper.
10 #define DEFINE_ART_SH_CREATE(svc) DEFINE_ART_SH_CREATE_DETAIL(svc, service)
11 
12 #define DEFINE_ART_SIH_CREATE(svc) DEFINE_ART_SH_CREATE_DETAIL(svc, iface)
13 
14 #define DEFINE_ART_SH_CREATE_DETAIL(svc, type) \
15  EXTERN_C_FUNC_DECLARE_START \
16  std::unique_ptr<art::detail::ServiceHelperBase> create_##type##_helper() \
17  { \
18  return std::make_unique<art::detail::ServiceHelper<svc>>(); \
19  } \
20  EXTERN_C_FUNC_DECLARE_END
21 
22 #endif /* art_Framework_Services_Registry_detail_definition_helper_macros_h */
23 
24 // Local Variables:
25 // mode: c++
26 // End: