Mantid
Loading...
Searching...
No Matches
MultiFileValidator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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 "FileValidator.h"
13
14#include <set>
15#include <string>
16#include <vector>
17
18namespace Mantid {
19namespace Kernel {
29class MANTID_KERNEL_DLL MultiFileValidator : public TypedValidator<std::vector<std::vector<std::string>>> {
30public:
32 explicit MultiFileValidator(const std::vector<std::string> &extensions, bool testFilesExist = true);
33
34 // Copy constructor / operator
35 friend void swap(MultiFileValidator &obj1, MultiFileValidator &obj2);
38
39 IValidator_sptr clone() const override;
40
42 std::vector<std::string> allowedValues() const override;
43
44protected:
47
48private:
50 std::string checkValidity(const std::vector<std::vector<std::string>> &values) const override;
51};
52
53} // namespace Kernel
54} // namespace Mantid
FileValidator is a validator that checks that a filepath is valid.
Definition: FileValidator.h:25
The MultiFileValidator validates a MultiFileProperty, which contains a vector of vectors* of filename...
FileValidator m_fileValidator
FileValidator instance used for validating multiple files.
void swap(MDLeanEvent< nd > &first, MDLeanEvent< nd > &second)
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.