-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #4399. Stub for PythonAlgorithm class.
- Loading branch information
1 parent
00b5242
commit 1e3b4ec
Showing
6 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/PythonAlgorithmExport.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#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/PythonAlgorithm/AlgorithmWrapper.h" | ||
#ifdef _MSC_VER | ||
#pragma warning( default: 4250 ) | ||
#endif | ||
|
||
#include <boost/python/class.hpp> | ||
#include <boost/python/register_ptr_to_python.hpp> | ||
#include <boost/python/bases.hpp> | ||
#include <boost/python/args.hpp> | ||
|
||
using Mantid::API::Algorithm; | ||
using Mantid::PythonInterface::AlgorithmWrapper; | ||
using namespace boost::python; | ||
|
||
void export_leaf_classes() | ||
{ | ||
/** | ||
* Export the algorithm wrapper that boost.python makes look like a PythonAlgorithm | ||
*/ | ||
class_<AlgorithmWrapper, bases<Algorithm>, boost::noncopyable>("PythonAlgorithm", "Base class for all Python algorithms") | ||
; | ||
; | ||
} |
12 changes: 12 additions & 0 deletions
12
Code/Mantid/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/PythonAlgorithm.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//----------------------------------------------------------------------------- | ||
// Includes | ||
//----------------------------------------------------------------------------- | ||
#include "MantidPythonInterface/api/PythonAlgorithm/PythonAlgorithm.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace PythonInterface | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters