From 52987f395d423203fbb1a417961408804832c258 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 24 Aug 2018 14:28:25 +0200 Subject: Make filename more consistent --- astra_vc14.vcxproj | 4 +- astra_vc14.vcxproj.filters | 4 +- build/linux/Makefile.in | 2 +- build/msvc/gen.py | 4 +- include/astra/AstraObjectFactory.h | 2 +- include/astra/PluginAlgorithm.h | 64 -------------------------------- include/astra/PluginAlgorithmFactory.h | 64 ++++++++++++++++++++++++++++++++ matlab/mex/astra_mex_plugin_c.cpp | 2 +- python/astra/plugin_c.pyx | 2 +- python/astra/src/PythonPluginAlgorithm.h | 2 +- src/PluginAlgorithm.cpp | 35 ----------------- src/PluginAlgorithmFactory.cpp | 35 +++++++++++++++++ 12 files changed, 110 insertions(+), 110 deletions(-) delete mode 100644 include/astra/PluginAlgorithm.h create mode 100644 include/astra/PluginAlgorithmFactory.h delete mode 100644 src/PluginAlgorithm.cpp create mode 100644 src/PluginAlgorithmFactory.cpp diff --git a/astra_vc14.vcxproj b/astra_vc14.vcxproj index 893305f..6c19c41 100644 --- a/astra_vc14.vcxproj +++ b/astra_vc14.vcxproj @@ -538,7 +538,7 @@ - + @@ -626,7 +626,7 @@ - + diff --git a/astra_vc14.vcxproj.filters b/astra_vc14.vcxproj.filters index fef6a8a..226068e 100644 --- a/astra_vc14.vcxproj.filters +++ b/astra_vc14.vcxproj.filters @@ -108,7 +108,7 @@ Algorithms\source - + Algorithms\source @@ -374,7 +374,7 @@ Algorithms\headers - + Algorithms\headers diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 0b90bd9..2ec3851 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -168,7 +168,7 @@ BASE_OBJECTS=\ src/ParallelProjectionGeometry3D.lo \ src/ParallelVecProjectionGeometry3D.lo \ src/PlatformDepSystemCode.lo \ - src/PluginAlgorithm.lo \ + src/PluginAlgorithmFactory.lo \ src/ProjectionGeometry2D.lo \ src/ProjectionGeometry3D.lo \ src/Projector2D.lo \ diff --git a/build/msvc/gen.py b/build/msvc/gen.py index 47e7440..a42d8e5 100644 --- a/build/msvc/gen.py +++ b/build/msvc/gen.py @@ -188,7 +188,7 @@ P_astra["filters"]["Algorithms\\source"] = [ "src\\CglsAlgorithm.cpp", "src\\FilteredBackProjectionAlgorithm.cpp", "src\\ForwardProjectionAlgorithm.cpp", -"src\\PluginAlgorithm.cpp", +"src\\PluginAlgorithmFactory.cpp", "src\\ReconstructionAlgorithm2D.cpp", "src\\ReconstructionAlgorithm3D.cpp", "src\\SartAlgorithm.cpp", @@ -327,7 +327,7 @@ P_astra["filters"]["Algorithms\\headers"] = [ "include\\astra\\CudaBackProjectionAlgorithm3D.h", "include\\astra\\FilteredBackProjectionAlgorithm.h", "include\\astra\\ForwardProjectionAlgorithm.h", -"include\\astra\\PluginAlgorithm.h", +"include\\astra\\PluginAlgorithmFactory.h", "include\\astra\\ReconstructionAlgorithm2D.h", "include\\astra\\ReconstructionAlgorithm3D.h", "include\\astra\\SartAlgorithm.h", diff --git a/include/astra/AstraObjectFactory.h b/include/astra/AstraObjectFactory.h index c963e35..91efa61 100644 --- a/include/astra/AstraObjectFactory.h +++ b/include/astra/AstraObjectFactory.h @@ -40,7 +40,7 @@ along with the ASTRA Toolbox. If not, see . #include "AlgorithmTypelist.h" #ifdef ASTRA_PYTHON -#include "PluginAlgorithm.h" +#include "PluginAlgorithmFactory.h" #endif diff --git a/include/astra/PluginAlgorithm.h b/include/astra/PluginAlgorithm.h deleted file mode 100644 index afaaf05..0000000 --- a/include/astra/PluginAlgorithm.h +++ /dev/null @@ -1,64 +0,0 @@ -/* ------------------------------------------------------------------------ -Copyright: 2010-2018, imec Vision Lab, University of Antwerp - 2014-2018, CWI, Amsterdam - -Contact: astra@astra-toolbox.com -Website: http://www.astra-toolbox.com/ - -This file is part of the ASTRA Toolbox. - - -The ASTRA Toolbox is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -The ASTRA Toolbox is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the ASTRA Toolbox. If not, see . - ------------------------------------------------------------------------ -*/ - -#ifndef _INC_ASTRA_PLUGINALGORITHM -#define _INC_ASTRA_PLUGINALGORITHM - -#include "astra/Globals.h" - -#include -#include - -namespace astra { - -class CAlgorithm; - -class _AstraExport CPluginAlgorithmFactory { - -public: - CPluginAlgorithmFactory() { } - virtual ~CPluginAlgorithmFactory() { } - - virtual CAlgorithm * getPlugin(const std::string &name) = 0; - - virtual bool registerPlugin(std::string name, std::string className) = 0; - virtual bool registerPlugin(std::string className) = 0; - - virtual std::map getRegisteredMap() = 0; - - virtual std::string getHelp(const std::string &name) = 0; - - static void registerFactory(CPluginAlgorithmFactory *factory) { m_factory = factory; } - static CPluginAlgorithmFactory* getFactory() { return m_factory; } - -private: - static CPluginAlgorithmFactory *m_factory; -}; - -} - -#endif diff --git a/include/astra/PluginAlgorithmFactory.h b/include/astra/PluginAlgorithmFactory.h new file mode 100644 index 0000000..afaaf05 --- /dev/null +++ b/include/astra/PluginAlgorithmFactory.h @@ -0,0 +1,64 @@ +/* +----------------------------------------------------------------------- +Copyright: 2010-2018, imec Vision Lab, University of Antwerp + 2014-2018, CWI, Amsterdam + +Contact: astra@astra-toolbox.com +Website: http://www.astra-toolbox.com/ + +This file is part of the ASTRA Toolbox. + + +The ASTRA Toolbox is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +The ASTRA Toolbox is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the ASTRA Toolbox. If not, see . + +----------------------------------------------------------------------- +*/ + +#ifndef _INC_ASTRA_PLUGINALGORITHM +#define _INC_ASTRA_PLUGINALGORITHM + +#include "astra/Globals.h" + +#include +#include + +namespace astra { + +class CAlgorithm; + +class _AstraExport CPluginAlgorithmFactory { + +public: + CPluginAlgorithmFactory() { } + virtual ~CPluginAlgorithmFactory() { } + + virtual CAlgorithm * getPlugin(const std::string &name) = 0; + + virtual bool registerPlugin(std::string name, std::string className) = 0; + virtual bool registerPlugin(std::string className) = 0; + + virtual std::map getRegisteredMap() = 0; + + virtual std::string getHelp(const std::string &name) = 0; + + static void registerFactory(CPluginAlgorithmFactory *factory) { m_factory = factory; } + static CPluginAlgorithmFactory* getFactory() { return m_factory; } + +private: + static CPluginAlgorithmFactory *m_factory; +}; + +} + +#endif diff --git a/matlab/mex/astra_mex_plugin_c.cpp b/matlab/mex/astra_mex_plugin_c.cpp index 3bc812a..f39e87e 100644 --- a/matlab/mex/astra_mex_plugin_c.cpp +++ b/matlab/mex/astra_mex_plugin_c.cpp @@ -34,7 +34,7 @@ along with the ASTRA Toolbox. If not, see . #include "mexHelpFunctions.h" #include "mexInitFunctions.h" -#include "astra/PluginAlgorithm.h" +#include "astra/PluginAlgorithmFactory.h" #include diff --git a/python/astra/plugin_c.pyx b/python/astra/plugin_c.pyx index dcc22e9..2f473c1 100644 --- a/python/astra/plugin_c.pyx +++ b/python/astra/plugin_c.pyx @@ -48,7 +48,7 @@ cdef extern from "src/PythonPluginAlgorithm.h" namespace "astra": cdef extern from "src/PythonPluginAlgorithm.h" namespace "astra::CPythonPluginAlgorithmFactory": cdef CPythonPluginAlgorithmFactory* getSingletonPtr() -cdef extern from "astra/PluginAlgorithm.h" namespace "astra::CPluginAlgorithmFactory": +cdef extern from "astra/PluginAlgorithmFactory.h" namespace "astra::CPluginAlgorithmFactory": # NB: Using wrong pointer type here for convenience cdef void registerFactory(CPythonPluginAlgorithmFactory *) diff --git a/python/astra/src/PythonPluginAlgorithm.h b/python/astra/src/PythonPluginAlgorithm.h index b7072d6..f2fd76d 100644 --- a/python/astra/src/PythonPluginAlgorithm.h +++ b/python/astra/src/PythonPluginAlgorithm.h @@ -34,7 +34,7 @@ along with the ASTRA Toolbox. If not, see . #include "astra/Singleton.h" #include "astra/XMLDocument.h" #include "astra/XMLNode.h" -#include "astra/PluginAlgorithm.h" +#include "astra/PluginAlgorithmFactory.h" #include diff --git a/src/PluginAlgorithm.cpp b/src/PluginAlgorithm.cpp deleted file mode 100644 index ea1e104..0000000 --- a/src/PluginAlgorithm.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* ------------------------------------------------------------------------ -Copyright: 2010-2018, imec Vision Lab, University of Antwerp - 2014-2018, CWI, Amsterdam - -Contact: astra@astra-toolbox.com -Website: http://www.astra-toolbox.com/ - -This file is part of the ASTRA Toolbox. - - -The ASTRA Toolbox is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -The ASTRA Toolbox is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the ASTRA Toolbox. If not, see . - ------------------------------------------------------------------------ -*/ - -#include "astra/PluginAlgorithm.h" - -namespace astra { - -CPluginAlgorithmFactory *CPluginAlgorithmFactory::m_factory = 0; - -} - diff --git a/src/PluginAlgorithmFactory.cpp b/src/PluginAlgorithmFactory.cpp new file mode 100644 index 0000000..a6b445f --- /dev/null +++ b/src/PluginAlgorithmFactory.cpp @@ -0,0 +1,35 @@ +/* +----------------------------------------------------------------------- +Copyright: 2010-2018, imec Vision Lab, University of Antwerp + 2014-2018, CWI, Amsterdam + +Contact: astra@astra-toolbox.com +Website: http://www.astra-toolbox.com/ + +This file is part of the ASTRA Toolbox. + + +The ASTRA Toolbox is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +The ASTRA Toolbox is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the ASTRA Toolbox. If not, see . + +----------------------------------------------------------------------- +*/ + +#include "astra/PluginAlgorithmFactory.h" + +namespace astra { + +CPluginAlgorithmFactory *CPluginAlgorithmFactory::m_factory = 0; + +} + -- cgit v1.2.3