16#include <boost/python/class.hpp>
19using Mantid::Kernel::TypedValidator;
30 class_<MatrixWorkspaceValidator, bases<TypedValidator<MatrixWorkspace_sptr>>, boost::noncopyable>(
31 "MatrixWorkspaceValidator", no_init);
33 class_<TypedValidator<IMDWorkspace_sptr>, boost::noncopyable>(
"IMDWorkspaceValidator", no_init);
37#define EXPORT_WKSP_VALIDATOR_NO_ARG(ValidatorType, DocString) \
38 class_<ValidatorType, bases<MatrixWorkspaceValidator>, boost::noncopyable>(#ValidatorType, init<>(DocString));
41#define EXPORT_WKSP_VALIDATOR_ARG(ValidatorType, ArgType, ArgName, DocString) \
42 class_<ValidatorType, bases<MatrixWorkspaceValidator>, boost::noncopyable>(#ValidatorType, \
43 init<ArgType>(arg(ArgName), DocString));
47#define EXPORT_WKSP_VALIDATOR_DEFAULT_ARG(ValidatorType, ArgType, ArgName, DefaultValue, DocString) \
48 class_<ValidatorType, bases<MatrixWorkspaceValidator>, boost::noncopyable>( \
49 #ValidatorType, init<ArgType>(arg(ArgName) = DefaultValue, DocString));
55 "Checks the workspace has the given unit along the X-axis");
57 "If mustBeHistogram=True then the "
58 "workspace must be a histogram "
59 "otherwise it must be point data.");
61 "If mustNotBeDistribution=True then the workspace must not have been "
62 "divided by the bin-width");
65 "Checks whether the axis specified by axisNumber is a SpectraAxis");
67 "Checks whether the axis specified by axisNumber is a NumericAxis");
69 class_<MDFrameValidator, bases<TypedValidator<IMDWorkspace_sptr>>, boost::noncopyable>(
70 "MDFrameValidator", init<std::string>(arg(
"frameName"),
"Checks the MD workspace has the given frame along all "
71 "dimensions. Accepted values for the `frameName` are "
72 "currently: `HKL`, `QLab`, `QSample`, `Time of "
73 "Flight`, `Distance`, `General frame`, `Unknown "
#define EXPORT_WKSP_VALIDATOR_NO_ARG(ValidatorType, DocString)
Export a validator derived from a MatrixWorkspaceValidator that has a no-arg constructor.
#define EXPORT_WKSP_VALIDATOR_ARG(ValidatorType, ArgType, ArgName, DocString)
Export a validator derived from a MatrixWorkspaceValidator that has a single-arg constructor.
void export_WorkspaceValidators()
#define EXPORT_WKSP_VALIDATOR_DEFAULT_ARG(ValidatorType, ArgType, ArgName, DefaultValue, DocString)
Export a validator derived from a MatrixWorkspaceValidator that has a single-arg constructor with a d...
void export_MatrixWorkspaceValidator()
This is the base TypedValidator for most of the WorkspaceValidators.
A validator which provides a TENTATIVE check that a workspace contains common bins in each spectrum.
A validator which checks that a workspace contains histogram data (the default) or point data as requ...
An interface for those validators that require the MatrixWorkspace interface.
A validator which checks whether the input workspace has the Numeric data in the axis.
A validator which checks that a workspace contains raw counts in its bins.
A validator which checks whether the input workspace has the Spectra number in the axis.
A validator which checks that the unit of the workspace referred to by a WorkspaceProperty is the exp...
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Declares a simple static struct to export a TypedValidator to Python.
static void define(const char *pythonClassName)