system_service_macros.h
Go to the documentation of this file.
1 #ifndef art_Framework_Services_Registry_detail_system_service_macros_h
2 #define art_Framework_Services_Registry_detail_system_service_macros_h
3 
6 
7 // System service macros.
8 
9 // System services require support code in Event Processor since they
10 // have no maker function.
11 
12 #define DECLARE_ART_SYSTEM_SERVICE(svc, scope) \
13  namespace art::detail { \
14  template <> \
15  struct ServiceHelper<svc> : public ServiceImplHelper, \
16  public ServiceLGRHelper { \
17  DEFINE_ART_SERVICE_TYPEID(svc) \
18  DEFINE_ART_SERVICE_SCOPE(scope) \
19  bool \
20  is_interface_impl() const override \
21  { \
22  return false; \
23  } \
24  DEFINE_ART_SERVICE_RETRIEVER(svc) \
25  }; \
26  }
27 
28 // Note that it makes very little sense to have a system service
29 // implementing an interface since it has to be constructed and
30 // added to the service cache list with no way to define the maker
31 // and converter functions. One could conceivably do a second add
32 // for the interface, but one would have to add interface to
33 // ServicesManager (and ServicesManager::Cache). If we ever need it,
34 // it should be relatively trivial.
35 
36 #endif /* art_Framework_Services_Registry_detail_system_service_macros_h */
37 
38 // Local Variables:
39 // mode: c++
40 // End: