Skip to content

Commit

Permalink
Re #8943. Exposing IMaskWorkspace to python.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Feb 7, 2014
1 parent 3888999 commit e9de883
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Expand Up @@ -33,6 +33,7 @@ set ( EXPORT_FILES
src/Exports/IMDHistoWorkspace.cpp
src/Exports/IMDHistoWorkspaceProperty.cpp
src/Exports/IMDEventWorkspace.cpp
src/Exports/IMaskWorkspace.cpp
src/Exports/MatrixWorkspace.cpp
src/Exports/MatrixWorkspaceProperty.cpp
src/Exports/IEventWorkspace.cpp
Expand Down
@@ -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);
}

0 comments on commit e9de883

Please sign in to comment.