diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-05-12 16:25:32 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-05-12 16:25:32 +0100 |
commit | c4019aac50df36fbab743b6dc1a882d9a9e30686 (patch) | |
tree | 659fb14b057ade4018845fe71452a033683d190b /libadhocutil/plugins.h | |
parent | Add missing include guard (diff) | |
download | libadhocutil-c4019aac50df36fbab743b6dc1a882d9a9e30686.tar.bz2 libadhocutil-c4019aac50df36fbab743b6dc1a882d9a9e30686.tar.xz libadhocutil-c4019aac50df36fbab743b6dc1a882d9a9e30686.zip |
Move multi index typeslibadhocutil-0.5.1.1
Reduce header bloat by moving the types into the .cpp.
Diffstat (limited to 'libadhocutil/plugins.h')
-rw-r--r-- | libadhocutil/plugins.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/libadhocutil/plugins.h b/libadhocutil/plugins.h index fe86834..d51ad2b 100644 --- a/libadhocutil/plugins.h +++ b/libadhocutil/plugins.h @@ -4,11 +4,6 @@ #include <memory> #include <functional> #include <optional> -#include <boost/multi_index_container_fwd.hpp> -#include <boost/multi_index/ordered_index_fwd.hpp> -#include <boost/multi_index/member.hpp> -#include <boost/multi_index/mem_fun.hpp> -#include <boost/multi_index/composite_key.hpp> #include <typeinfo> #include <set> #include <map> @@ -106,7 +101,7 @@ namespace AdHoc { typedef std::function<std::optional<std::string> (const std::type_info &, const std::string &)> PluginResolver; PluginManager(); - virtual ~PluginManager(); + virtual ~PluginManager() = default; /// Install a plugin. void add(const PluginPtr &); @@ -208,22 +203,10 @@ namespace AdHoc { private: static void loadLibrary(const std::string &); - typedef boost::multi_index_container<PluginPtr, - boost::multi_index::indexed_by< - boost::multi_index::ordered_non_unique<boost::multi_index::member<Plugin, const std::string, &Plugin::name>>, - boost::multi_index::ordered_non_unique<boost::multi_index::const_mem_fun<Plugin, const std::type_info &, &Plugin::type>>, - boost::multi_index::ordered_unique< - boost::multi_index::composite_key< - Plugin, - boost::multi_index::member<Plugin, const std::string, &Plugin::name>, - boost::multi_index::const_mem_fun<Plugin, const std::type_info &, &Plugin::type> - >> - >> PluginStore; - - typedef std::map<size_t, PluginResolver> TypePluginResolvers; - - PluginStore * plugins; - TypePluginResolvers * resolvers; + class PluginStore; + std::unique_ptr<PluginStore> plugins; + class TypePluginResolvers; + std::unique_ptr<TypePluginResolvers> resolvers; }; } |