1 #ifndef ServiceRegistry_ServicesManager_h 2 #define ServiceRegistry_ServicesManager_h 43 namespace serviceregistry {
57 typedef std::map<TypeIDBase, std::shared_ptr<ServiceWrapperBase>>
Type2Service;
68 std::vector<ParameterSet>& iConfiguration,
69 bool associate =
true);
79 Type2Maker::const_iterator itFoundMaker;
86 "Service Request unable to find requested service with compiler type name '",
97 std::shared_ptr<ServiceWrapper<T>> ptr(std::dynamic_pointer_cast<
ServiceWrapper<T>>(itFound->second));
98 assert(
nullptr != ptr.get());
103 template <
typename T>
106 Type2Maker::const_iterator itFoundMaker;
128 template <
typename T>
Type2Service type2Service_
bool put(std::shared_ptr< ServiceWrapper< T >> iPtr, bool iOverride=false)
returns false if put fails because a service of this type already exists
MakerHolder(std::shared_ptr< ServiceMakerBase > iMaker, ParameterSet &iPSet, ActivityRegistry &)
void fillListOfMakers(std::vector< ParameterSet > &)
ServicesManager const & operator=(ServicesManager const &)=delete
void createServiceFor(MakerHolder const &)
void copySlotsTo(ActivityRegistry &)
copy our Service's slots to the argument's signals
std::map< TypeIDBase, MakerHolder > Type2Maker
edm::propagate_const< std::shared_ptr< ServiceMakerBase > > maker_
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
constexpr element_type const * get() const
std::vector< TypeIDBase > actualCreationOrder_
void connectTo(ActivityRegistry &iOther)
causes iOther's signals to be forward to us
void copySlotsFrom(ActivityRegistry &)
the copy the argument's slots to the our signals
std::vector< TypeIDBase > requestedCreationOrder_
std::string typeDemangle(char const *mangledName)
ActivityRegistry registry_
edm::propagate_const< std::unique_ptr< Type2Maker > > type2Maker_
ServicesManager(std::vector< ParameterSet > &iConfiguration)
bool add(ServicesManager &) const
std::map< TypeIDBase, std::shared_ptr< ServiceWrapperBase > > Type2Service
edm::propagate_const< std::shared_ptr< ServicesManager > > associatedManager_
ActivityRegistry * registry_
bool isAvailable() const
returns true of the particular service is accessible
void connect(ActivityRegistry &iOther)
causes our ActivityRegistry's signals to be forwarded to iOther