27 #include <boost/range/adaptor/map.hpp>
28 #include <boost/range/algorithm/copy.hpp>
33 ProtocolFactory::Registry&
34 ProtocolFactory::getRegistry()
36 static Registry registry;
40 unique_ptr<ProtocolFactory>
43 Registry& registry = getRegistry();
44 auto found = registry.find(
id);
45 return found == registry.end() ?
nullptr : found->second();
51 std::set<std::string> factoryIds;
52 boost::copy(getRegistry() | boost::adaptors::map_keys,
53 std::inserter(factoryIds, factoryIds.end()));
static std::set< std::string > listRegistered()
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
static unique_ptr< ProtocolFactory > create(const std::string &id)