|
Mantid
|
A validator which checks that the unit of the workspace referred to by a WorkspaceProperty is the expected one. More...
#include <WorkspaceUnitValidator.h>
Public Member Functions | |
| Kernel::IValidator_sptr | clone () const override |
| Clone the current state. More... | |
| std::string | getType () const |
| Gets the type of the validator. More... | |
| WorkspaceUnitValidator (std::string unitID="") | |
| Constructor. More... | |
Private Member Functions | |
| std::string | checkValidity (const MatrixWorkspace_sptr &value) const override |
| Check for validity. More... | |
Private Attributes | |
| const std::string | m_unitID |
| The name of the required unit. More... | |
A validator which checks that the unit of the workspace referred to by a WorkspaceProperty is the expected one.
Definition at line 18 of file WorkspaceUnitValidator.h.
|
explicit |
Constructor.
| unitID | :: The name of the unit that the workspace must have. If left empty, the validator will simply check that the workspace is not unitless. |
Definition at line 22 of file WorkspaceUnitValidator.cpp.
|
overrideprivate |
Check for validity.
Checks that the units of the workspace data are declared match any required units.
| value | :: The workspace to test |
Definition at line 38 of file WorkspaceUnitValidator.cpp.
|
override |
Clone the current state.
Definition at line 28 of file WorkspaceUnitValidator.cpp.
|
inline |
Gets the type of the validator.
Definition at line 22 of file WorkspaceUnitValidator.h.
|
private |
The name of the required unit.
Definition at line 31 of file WorkspaceUnitValidator.h.
Referenced by checkValidity().