Mantid
Loading...
Searching...
No Matches
DirectoryValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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 "IValidator.h"
13#include "MantidKernel/DllConfig.h"
15#include <string>
16#include <vector>
17
18namespace Mantid {
19namespace Kernel {
20
27class MANTID_KERNEL_DLL DirectoryValidator : public FileValidator {
28public:
29 explicit DirectoryValidator(bool testDirectoryExists = true);
30 std::vector<std::string> allowedValues() const override;
31 IValidator_sptr clone() const override;
32
33private:
34 std::string checkValidity(const std::string &value) const override;
35};
36
37} // namespace Kernel
38} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
DirectoryValidator is a validator that checks that a directory path is valid.
FileValidator is a validator that checks that a filepath is valid.
Definition: FileValidator.h:25
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.