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

A validator which checks that a workspace has a valid instrument. More...

#include <InstrumentValidator.h>

Inheritance diagram for Mantid::API::InstrumentValidator:

Public Types

enum  Requirements { SourcePosition = 0x1 , SamplePosition = 0x2 }
 Enumeration describing requirements. More...
 

Public Member Functions

std::string checkValidity (const std::shared_ptr< ExperimentInfo > &value) const override
 Checks that the workspace has an instrument defined. More...
 
Kernel::IValidator_sptr clone () const override
 
std::string getType () const
 
 InstrumentValidator (const unsigned int flags=SamplePosition)
 Construct a validator with requirements (default = SamplePosition) More...
 

Private Attributes

unsigned int m_requires
 

Detailed Description

A validator which checks that a workspace has a valid instrument.

Definition at line 21 of file InstrumentValidator.h.

Member Enumeration Documentation

◆ Requirements

Enumeration describing requirements.

Enumerator
SourcePosition 
SamplePosition 

Definition at line 24 of file InstrumentValidator.h.

Constructor & Destructor Documentation

◆ InstrumentValidator()

Mantid::API::InstrumentValidator::InstrumentValidator ( const unsigned int  flags = SamplePosition)

Construct a validator with requirements (default = SamplePosition)

Parameters
flagsA combination of flags to specify requirements

Definition at line 21 of file InstrumentValidator.cpp.

Member Function Documentation

◆ checkValidity()

std::string Mantid::API::InstrumentValidator::checkValidity ( const std::shared_ptr< ExperimentInfo > &  value) const
override

Checks that the workspace has an instrument defined.

Parameters
value:: The workspace to test
Returns
A user-level description if a problem exists or ""

Definition at line 37 of file InstrumentValidator.cpp.

References m_requires, SamplePosition, SourcePosition, and value.

◆ clone()

Kernel::IValidator_sptr Mantid::API::InstrumentValidator::clone ( ) const
override
Returns
A copy of the current state of the object

Definition at line 31 of file InstrumentValidator.cpp.

◆ getType()

std::string Mantid::API::InstrumentValidator::getType ( ) const
Returns
A string type identifier for the object

Definition at line 26 of file InstrumentValidator.cpp.

Member Data Documentation

◆ m_requires

unsigned int Mantid::API::InstrumentValidator::m_requires
private

Definition at line 33 of file InstrumentValidator.h.

Referenced by checkValidity().


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