Mantid
Loading...
Searching...
No Matches
ADSValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/DllConfig.h"
14
15namespace Mantid {
16namespace API {
17
21class MANTID_API_DLL ADSValidator : public Kernel::TypedValidator<std::vector<std::string>> {
22public:
24 ADSValidator(const bool allowMultiSelection = true, const bool isOptional = false);
25
27 Kernel::IValidator_sptr clone() const override;
28
29 bool isMultipleSelectionAllowed() override;
30
31 void setMultipleSelectionAllowed(const bool isMultiSelectionAllowed);
32
33 bool isOptional() const;
34
35 std::vector<std::string> allowedValues() const override;
36
37 void setOptional(const bool setOptional);
38
39protected:
46 std::string checkValidity(const std::vector<std::string> &value) const override;
47
48private:
53};
54
55} // namespace API
56} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
ADSValidator : a validator that requires the value of a property to be present in the ADS.
Definition: ADSValidator.h:21
bool m_AllowMultiSelection
if the validator should allow multiple selection
Definition: ADSValidator.h:50
bool m_isOptional
if the validator should an empty selection
Definition: ADSValidator.h:52
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition: IValidator.h:26
Helper class which provides the Collimation Length for SANS instruments.