summaryrefslogtreecommitdiffstats
path: root/include/astra/AstraObjectFactory.h
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-06-19 22:28:06 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-07-23 11:57:15 +0200
commit18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3 (patch)
tree8919012d1c610eaf6b2e8c157082a85fb71137a4 /include/astra/AstraObjectFactory.h
parent9e077994b382b2df63e4b79dd2afebc50366d419 (diff)
downloadastra-18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3.tar.gz
astra-18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3.tar.bz2
astra-18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3.tar.xz
astra-18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3.zip
Add support for Python algorithm plugins
Diffstat (limited to 'include/astra/AstraObjectFactory.h')
-rw-r--r--include/astra/AstraObjectFactory.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/astra/AstraObjectFactory.h b/include/astra/AstraObjectFactory.h
index 356acf9..325989e 100644
--- a/include/astra/AstraObjectFactory.h
+++ b/include/astra/AstraObjectFactory.h
@@ -40,6 +40,10 @@ $Id$
#include "AlgorithmTypelist.h"
+#ifdef ASTRA_PYTHON
+#include "PluginAlgorithm.h"
+#endif
+
namespace astra {
@@ -147,6 +151,15 @@ T* CAstraObjectFactory<T, TypeList>::create(const Config& _cfg)
*/
class _AstraExport CAlgorithmFactory : public CAstraObjectFactory<CAlgorithm, AlgorithmTypeList> {};
+#ifdef ASTRA_PYTHON
+template <>
+inline CAlgorithm* CAstraObjectFactory<CAlgorithm, AlgorithmTypeList>::findPlugin(std::string _sType)
+ {
+ CPluginAlgorithmFactory *fac = CPluginAlgorithmFactory::getSingletonPtr();
+ return fac->getPlugin(_sType);
+ }
+#endif
+
/**
* Class used to create 2D projectors from a string or a config object
*/