diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-28 01:37:56 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-28 01:37:56 +0100 |
commit | d2b82979ee18ad1e827ab79834e6e5b762f35725 (patch) | |
tree | b6dd124f6ecad44ec9931537462486f7037fbafd | |
parent | Use AdHoc plugins for decompressors (diff) | |
download | project2-d2b82979ee18ad1e827ab79834e6e5b762f35725.tar.bz2 project2-d2b82979ee18ad1e827ab79834e6e5b762f35725.tar.xz project2-d2b82979ee18ad1e827ab79834e6e5b762f35725.zip |
Suport finding ComponentLoaders in AdHoc Plugins
-rw-r--r-- | project2/common/plugable.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/project2/common/plugable.cpp b/project2/common/plugable.cpp index 969f530..15d8cda 100644 --- a/project2/common/plugable.cpp +++ b/project2/common/plugable.cpp @@ -1,8 +1,15 @@ #include "plugable.h" +#include "componentLoader.h" +#include <plugins.h> void Plugable::onAllComponents(const boost::function<void(ComponentLoader *)> & func) { InstanceSet<ComponentLoader>::OnAll(func); + for(auto p : AdHoc::PluginManager::getDefault()->getAll()) { + if (auto c = dynamic_cast<ComponentLoader *>(p->implementation())) { + func(c); + } + } } |