From d2b82979ee18ad1e827ab79834e6e5b762f35725 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 28 Sep 2015 01:37:56 +0100 Subject: Suport finding ComponentLoaders in AdHoc Plugins --- project2/common/plugable.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 void Plugable::onAllComponents(const boost::function & func) { InstanceSet::OnAll(func); + for(auto p : AdHoc::PluginManager::getDefault()->getAll()) { + if (auto c = dynamic_cast(p->implementation())) { + func(c); + } + } } -- cgit v1.2.3