00001 #ifndef FWCore_ServiceRegistry_ServiceMakerBase_h 00002 #define FWCore_ServiceRegistry_ServiceMakerBase_h 00003 // -*- C++ -*- 00004 // 00005 // Package: ServiceRegistry 00006 // Class : ServiceMakerBase 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Mon Sep 5 13:33:00 EDT 2005 00019 // 00020 00021 00022 #include <typeinfo> 00023 00024 // forward declarations 00025 namespace edm { 00026 class ParameterSet; 00027 class ActivityRegistry; 00028 00029 namespace service { 00030 inline bool isProcessWideService(void const* service) { 00031 return false; 00032 } 00033 } 00034 00035 namespace serviceregistry { 00036 class SaveConfiguration; 00037 class ServiceWrapperBase; 00038 class ServicesManager; 00039 00040 class ServiceMakerBase { 00041 00042 public: 00043 ServiceMakerBase(); 00044 virtual ~ServiceMakerBase(); 00045 00046 // ---------- const member functions --------------------- 00047 virtual std::type_info const& serviceType() const = 0; 00048 00049 virtual bool make(ParameterSet const&, 00050 ActivityRegistry&, 00051 ServicesManager&) const = 0; 00052 00053 virtual bool processWideService() const = 0; 00054 00055 virtual bool saveConfiguration() const = 0; 00056 00057 // ---------- static member functions -------------------- 00058 00059 // ---------- member functions --------------------------- 00060 00061 protected: 00062 bool testSaveConfiguration(SaveConfiguration const*) const {return true;} 00063 bool testSaveConfiguration(void const*) const {return false;} 00064 00065 private: 00066 ServiceMakerBase(ServiceMakerBase const&); // stop default 00067 00068 ServiceMakerBase const& operator=(ServiceMakerBase const&); // stop default 00069 00070 // ---------- member data -------------------------------- 00071 00072 }; 00073 } 00074 } 00075 00076 #endif