Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::API::SpectraAxisValidator Class Reference

A validator which checks whether the input workspace has the Spectra number in the axis. More...

#include <SpectraAxisValidator.h>

Inheritance diagram for Mantid::API::SpectraAxisValidator:
Mantid::API::MatrixWorkspaceValidator

Public Member Functions

Kernel::IValidator_sptr clone () const override
 Clone the current validator. More...
 
std::string getType () const
 Gets the type of the validator. More...
 
 SpectraAxisValidator (const int &axisNumber=1)
 Class constructor with parameter. More...
 

Private Member Functions

std::string checkValidity (const MatrixWorkspace_sptr &value) const override
 Check for validity. More...
 

Private Attributes

const int m_axisNumber
 Axis number to check on, defaults to 1. More...
 

Detailed Description

A validator which checks whether the input workspace has the Spectra number in the axis.

Definition at line 18 of file SpectraAxisValidator.h.

Constructor & Destructor Documentation

◆ SpectraAxisValidator()

Mantid::API::SpectraAxisValidator::SpectraAxisValidator ( const int &  axisNumber = 1)
explicit

Class constructor with parameter.

Parameters
axisNumber:: set the axis number to validate

Definition at line 16 of file SpectraAxisValidator.cpp.

Member Function Documentation

◆ checkValidity()

std::string Mantid::API::SpectraAxisValidator::checkValidity ( const MatrixWorkspace_sptr value) const
overrideprivate

Check for validity.

Checks that the axis stated.

Parameters
value:: The workspace to test
Returns
A message for users with negative results, otherwise ""

Definition at line 25 of file SpectraAxisValidator.cpp.

References Mantid::API::Axis::isSpectra(), m_axisNumber, std::to_string(), and value.

◆ clone()

Kernel::IValidator_sptr Mantid::API::SpectraAxisValidator::clone ( ) const
override

Clone the current validator.

Definition at line 19 of file SpectraAxisValidator.cpp.

◆ getType()

std::string Mantid::API::SpectraAxisValidator::getType ( ) const
inline

Gets the type of the validator.

Definition at line 23 of file SpectraAxisValidator.h.

Member Data Documentation

◆ m_axisNumber

const int Mantid::API::SpectraAxisValidator::m_axisNumber
private

Axis number to check on, defaults to 1.

Definition at line 31 of file SpectraAxisValidator.h.

Referenced by checkValidity().


The documentation for this class was generated from the following files: