Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #8943. Exposing IMaskWorkspace to python.
- Loading branch information
1 parent
3888999
commit e9de883
Showing
2 changed files
with
23 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.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,22 @@ | ||
#include "MantidAPI/IMaskWorkspace.h" | ||
#include "MantidPythonInterface/kernel/SharedPtrToPythonMacro.h" | ||
#include "MantidPythonInterface/kernel/Registry/RegisterSingleValueHandler.h" | ||
|
||
#include <boost/python/class.hpp> | ||
|
||
using Mantid::API::IMaskWorkspace; | ||
using Mantid::API::IMaskWorkspace_sptr; | ||
using namespace boost::python; | ||
|
||
/** Python exports of the Mantid::API::IMaskWorkspace class. */ | ||
void export_IMaskWorkspace() | ||
{ | ||
REGISTER_SHARED_PTR_TO_PYTHON(IMaskWorkspace); | ||
|
||
class_<IMaskWorkspace, boost::noncopyable>("IMaskWorkspace", no_init) | ||
.def("getNumberMasked", &IMaskWorkspace::getNumberMasked, args("self"), | ||
"Total number of masked pixels") | ||
; | ||
|
||
REGISTER_SINGLEVALUE_HANDLER(IMaskWorkspace_sptr); | ||
} |