ChannelProviderRegistry::add w/ factory function

This commit is contained in:
Michael Davidsaver
2017-06-06 10:35:13 +02:00
parent 6926d911ee
commit de84fadeb7
2 changed files with 42 additions and 0 deletions

View File

@@ -1245,6 +1245,10 @@ public:
return add(fact, replace) ? fact : typename Factory::shared_pointer();
}
typedef ChannelProvider::shared_pointer (*factoryfn_t)(const std::tr1::shared_ptr<Configuration>&);
ChannelProviderFactory::shared_pointer add(const std::string& name, factoryfn_t, bool replace=true);
//! Attempt to remove a factory with the given name. Return Factory which was removed, or NULL if not found.
ChannelProviderFactory::shared_pointer remove(const std::string& name);