Skip to content

Commit

Permalink
Refs #4399. Sub-directory for PythonAlgorithm
Browse files Browse the repository at this point in the history
Make it clearer what the bits of code are for
  • Loading branch information
martyngigg committed Feb 23, 2012
1 parent 91d8e64 commit 56da9de
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,13 @@
//-----------------------------------------------------------------------------
// Includes
//-----------------------------------------------------------------------------
#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"
#include "MantidPythonInterface/api/PythonAlgorithm/PythonAlgorithm.h"
#include <boost/python/wrapper.hpp>

namespace Mantid
{
namespace PythonInterface
{
/**
* Provides a marker class that makes it simpler to distinguish a
* C++ algorithm from a Python algorithm.
*
* It works in tandem with the AlgorithmWrapper such that
* when the AlgorithmWrapper is exported to Python
* a user sees the PythonAlgorithm class.
*/
class PythonAlgorithm : public API::Algorithm
{
};

/**
* Provides a wrapper class for boost::python to allow virtual functions
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#ifndef MANTID_PYTHONINTERFACE_PYTHONALGORITHM_H_
#define MANTID_PYTHONINTERFACE_PYTHONALGORITHM_H_
/**
Copyright &copy; 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
Mantid 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.
Mantid 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 this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
//-----------------------------------------------------------------------------
// Includes
//-----------------------------------------------------------------------------
#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"

namespace Mantid
{
namespace PythonInterface
{
/**
* Provides a marker class that makes it simpler to distinguish a
* C++ algorithm from a Python algorithm.
*
* It works in tandem with the AlgorithmWrapper such that
* when the AlgorithmWrapper is exported to Python
* a user sees the PythonAlgorithm class.
*/
class PythonAlgorithm : public API::Algorithm
{
};

}
}



#endif /* MANTID_PYTHONINTERFACE_PYTHONALGORITHM_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ set ( EXPORT_FILES

# Files containing additional helper code that are not related to exporting class/functions
set ( SRC_FILES
src/AlgorithmWrapper.cpp
src/PythonAlgorithm/AlgorithmWrapper.cpp
src/CloneMatrixWorkspace.cpp
)

set ( INC_FILES
${HEADER_DIR}/api/AlgorithmWrapper.h
${HEADER_DIR}/api/PythonAlgorithm/AlgorithmWrapper.h
${HEADER_DIR}/api/PythonAlgorithm/PythonAlgorithm.h
${HEADER_DIR}/api/BinaryOperations.h
${HEADER_DIR}/api/CloneMatrixWorkspace.h
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef _MSC_VER
#pragma warning( disable: 4250 ) // Disable warning regarding inheritance via dominance, we have no way around it with the design
#endif
#include "MantidPythonInterface/api/AlgorithmWrapper.h"
#include "MantidPythonInterface/api/PythonAlgorithm/AlgorithmWrapper.h"
#include "MantidAPI/AlgorithmProxy.h"
#ifdef _MSC_VER
#pragma warning( default: 4250 )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MantidPythonInterface/api/AlgorithmWrapper.h"
#include "MantidPythonInterface/api/PythonAlgorithm/AlgorithmWrapper.h"
#include "MantidPythonInterface/kernel/WrapperHelpers.h"
#include <boost/python/class.hpp>

Expand Down

0 comments on commit 56da9de

Please sign in to comment.