diff options
author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-06-19 22:28:06 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-07-23 11:57:15 +0200 |
commit | 18b6d25f7e4f0943b3592f3bb4f6ca5ed9c285d3 (patch) | |
tree | 8919012d1c610eaf6b2e8c157082a85fb71137a4 /include/astra/AstraObjectFactory.h | |
parent | 9e077994b382b2df63e4b79dd2afebc50366d419 (diff) | |
download | astra-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.h | 13 |
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 */ |