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

MDAxisValidator is a class that checks the number of MD axes match the number of workspace dimensions, refactoring out the common validation code from several MD algorithms into a common class. More...

#include <Kernel/MDAxisValidator.h>

Public Member Functions

 MDAxisValidator (std::vector< int > axes, const size_t nDimensions, const bool checkIfEmpty)
 Constructor. More...
 
virtual std::map< std::string, std::string > validate () const
 Checks the MD axes given against the given number of dimensions of the input workspace. More...
 
virtual ~MDAxisValidator ()=default
 

Private Attributes

std::vector< int > m_axes
 
bool m_emptyCheck
 
size_t m_wsDimensions
 

Detailed Description

MDAxisValidator is a class that checks the number of MD axes match the number of workspace dimensions, refactoring out the common validation code from several MD algorithms into a common class.

Definition at line 29 of file MDAxisValidator.h.

Constructor & Destructor Documentation

◆ MDAxisValidator()

Mantid::Kernel::MDAxisValidator::MDAxisValidator ( std::vector< int >  axes,
const size_t  nDimensions,
const bool  checkIfEmpty 
)

Constructor.

Parameters
axesVector containing MD axes to validate
nDimensionsNumber of dimensions of input workspace for algorithm
checkIfEmptyWhether validator will check if the axes vector is empty

Definition at line 19 of file MDAxisValidator.cpp.

◆ ~MDAxisValidator()

virtual Mantid::Kernel::MDAxisValidator::~MDAxisValidator ( )
virtualdefault

Member Function Documentation

◆ validate()

std::map< std::string, std::string > Mantid::Kernel::MDAxisValidator::validate ( ) const
virtual

Checks the MD axes given against the given number of dimensions of the input workspace.

Returns
A map with validation warnings, to be used in an algorithm's validateInputs()

Definition at line 29 of file MDAxisValidator.cpp.

References m_axes, m_emptyCheck, and m_wsDimensions.

Referenced by Mantid::MDAlgorithms::TransposeMD::exec(), and Mantid::MDAlgorithms::SetMDFrame::validateInputs().

Member Data Documentation

◆ m_axes

std::vector<int> Mantid::Kernel::MDAxisValidator::m_axes
private

Definition at line 36 of file MDAxisValidator.h.

Referenced by validate().

◆ m_emptyCheck

bool Mantid::Kernel::MDAxisValidator::m_emptyCheck
private

Definition at line 38 of file MDAxisValidator.h.

Referenced by validate().

◆ m_wsDimensions

size_t Mantid::Kernel::MDAxisValidator::m_wsDimensions
private

Definition at line 37 of file MDAxisValidator.h.

Referenced by validate().


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