File indexing completed on 2024-04-06 12:13:02
0001 #ifndef FWCore_ServiceRegistry_ServiceMakerBase_h
0002 #define FWCore_ServiceRegistry_ServiceMakerBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <typeinfo>
0022
0023
0024 namespace edm {
0025 class ParameterSet;
0026 class ActivityRegistry;
0027
0028 namespace service {
0029 inline bool isProcessWideService(void const* ) { return false; }
0030 }
0031
0032 namespace serviceregistry {
0033 class SaveConfiguration;
0034 class ServiceWrapperBase;
0035 class ServicesManager;
0036
0037 class ServiceMakerBase {
0038 public:
0039 ServiceMakerBase();
0040 ServiceMakerBase(ServiceMakerBase const&) = delete;
0041 ServiceMakerBase const& operator=(ServiceMakerBase const&) = delete;
0042 virtual ~ServiceMakerBase();
0043
0044
0045 virtual std::type_info const& serviceType() const = 0;
0046
0047 virtual bool make(ParameterSet const&, ActivityRegistry&, ServicesManager&) const = 0;
0048
0049 virtual bool processWideService() const = 0;
0050
0051 virtual bool saveConfiguration() const = 0;
0052
0053
0054
0055
0056
0057 protected:
0058 bool testSaveConfiguration(SaveConfiguration const*) const { return true; }
0059 bool testSaveConfiguration(void const*) const { return false; }
0060
0061 private:
0062
0063 };
0064 }
0065 }
0066
0067 #endif