Skip to content

Commit

Permalink
Re #8943. Moving newly exposed IMaskWorkspace into python.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Apr 3, 2014
1 parent ce0be8c commit a296cb5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Expand Up @@ -34,8 +34,8 @@ 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/IMaskWorkspace.cpp
src/Exports/MatrixWorkspaceProperty.cpp
src/Exports/IEventWorkspace.cpp
src/Exports/IEventWorkspaceProperty.cpp
Expand Down
@@ -1,15 +1,22 @@
#include "MantidAPI/IMaskWorkspace.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidPythonInterface/kernel/Registry/DataItemInterface.h"
#include <boost/python/class.hpp>

using Mantid::API::IMaskWorkspace;
using Mantid::API::IMaskWorkspace_sptr;
using Mantid::API::MatrixWorkspace;
using namespace boost::python;
namespace Registry = Mantid::PythonInterface::Registry;

/** Python exports of the Mantid::API::IMaskWorkspace class. */
void export_IMaskWorkspace()
{
class_<IMaskWorkspace, boost::noncopyable>("IMaskWorkspace", no_init)
class_<IMaskWorkspace, bases<MatrixWorkspace>, boost::noncopyable>("IMaskWorkspace", no_init)
.def("getNumberMasked", &IMaskWorkspace::getNumberMasked, args("self"),
"Total number of masked pixels")
;

Registry::DataItemInterface<IMaskWorkspace> entry;
entry.castFromID("MaskWorkspace");
}
Expand Up @@ -239,10 +239,10 @@ void export_MatrixWorkspace()

//-------------------------------------------------------------------------------------------------

static const int NUM_IDS = 10;
static const int NUM_IDS = 9;
static const char * WORKSPACE_IDS[NUM_IDS] = {\
"CompressedWorkspace2D", "GroupingWorkspace", "ManagedWorkspace2D",
"ManagedRawFileWorkspace2D", "MaskWorkspace", "OffsetsWorkspace",
"ManagedRawFileWorkspace2D", "OffsetsWorkspace",
"RebinnedOutput", "SpecialWorkspace2D", "Workspace2D", "WorkspaceSingleValue"
};

Expand Down

0 comments on commit a296cb5

Please sign in to comment.