Mantid
|
The MultiFileValidator validates a MultiFileProperty, which contains a vector of vectors* of filenames - the meaning of which is discussed in MultiFileProperty.h. More...
#include <MultiFileValidator.h>
Public Member Functions | |
std::vector< std::string > | allowedValues () const override |
Returns the set of allowed extensions. More... | |
IValidator_sptr | clone () const override |
Clone the validator. More... | |
MultiFileValidator () | |
Default constructor. More... | |
MultiFileValidator (const MultiFileValidator &mfv) | |
Copy constructor. More... | |
MultiFileValidator (const std::vector< std::string > &extensions, bool testFilesExist=true) | |
Constructor. More... | |
MultiFileValidator & | operator= (MultiFileValidator) |
Protected Attributes | |
FileValidator | m_fileValidator |
FileValidator instance used for validating multiple files. More... | |
Private Member Functions | |
std::string | checkValidity (const std::vector< std::vector< std::string > > &values) const override |
Returns an error if at least one of the files is not valid, else "". More... | |
Friends | |
void | swap (MultiFileValidator &obj1, MultiFileValidator &obj2) |
The MultiFileValidator validates a MultiFileProperty, which contains a vector of vectors* of filenames - the meaning of which is discussed in MultiFileProperty.h.
This is essentially a wrapper around the FileValidator class; a single instance of which is called, once for each filename.
Definition at line 29 of file MultiFileValidator.h.
Mantid::Kernel::MultiFileValidator::MultiFileValidator | ( | ) |
Default constructor.
Definition at line 18 of file MultiFileValidator.cpp.
|
explicit |
Constructor.
extensions | :: The permitted file extensions (e.g. .RAW) |
testFilesExist | :: If to check if files exist |
Definition at line 41 of file MultiFileValidator.cpp.
Mantid::Kernel::MultiFileValidator::MultiFileValidator | ( | const MultiFileValidator & | mfv | ) |
Copy constructor.
mfv | :: The object with which to construct this object. |
Definition at line 24 of file MultiFileValidator.cpp.
|
override |
Returns the set of allowed extensions.
Returns the set of valid values.
Definition at line 45 of file MultiFileValidator.cpp.
References Mantid::Kernel::FileValidator::allowedValues(), and m_fileValidator.
|
overrideprivate |
Returns an error if at least one of the files is not valid, else "".
Checks that the files exist.
The filenames of any files that dont exist are returned in an error message, else the message is "".
values | :: a vector of vectors of file names |
Definition at line 59 of file MultiFileValidator.cpp.
References error, and m_fileValidator.
|
override |
Clone the validator.
Definition at line 51 of file MultiFileValidator.cpp.
MultiFileValidator & Mantid::Kernel::MultiFileValidator::operator= | ( | MultiFileValidator | tmp | ) |
Definition at line 32 of file MultiFileValidator.cpp.
|
friend |
Definition at line 27 of file MultiFileValidator.cpp.
Referenced by operator=().
|
protected |
FileValidator instance used for validating multiple files.
Definition at line 46 of file MultiFileValidator.h.
Referenced by allowedValues(), and checkValidity().