summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-09-28 01:37:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-09-28 01:37:56 +0100
commitd2b82979ee18ad1e827ab79834e6e5b762f35725 (patch)
treeb6dd124f6ecad44ec9931537462486f7037fbafd
parentUse AdHoc plugins for decompressors (diff)
downloadproject2-d2b82979ee18ad1e827ab79834e6e5b762f35725.tar.bz2
project2-d2b82979ee18ad1e827ab79834e6e5b762f35725.tar.xz
project2-d2b82979ee18ad1e827ab79834e6e5b762f35725.zip
Suport finding ComponentLoaders in AdHoc Plugins
-rw-r--r--project2/common/plugable.cpp7
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);
+ }
+ }
}