14Logger
g_log(
"MultiFileValidator");
19 : TypedValidator<
std::vector<
std::vector<
std::string>>>(), m_fileValidator(
std::vector<
std::string>(), true) {}
25 : TypedValidator<
std::vector<
std::vector<
std::string>>>(), m_fileValidator(mfv.m_fileValidator) {}
42 : TypedValidator<
std::vector<
std::vector<
std::string>>>(), m_fileValidator(extensions, testFilesExist) {}
63 std::string accumulatedErrors;
65 for (
auto row : values) {
66 for (
const auto &valueIt : row) {
71 if (accumulatedErrors.empty())
72 accumulatedErrors =
"Could not validate the following file(s): " + valueIt;
74 accumulatedErrors.append(
", ").append(valueIt);
79 return accumulatedErrors;
std::vector< std::string > allowedValues() const override
Returns the set of valid values.
The MultiFileValidator validates a MultiFileProperty, which contains a vector of vectors* of filename...
FileValidator m_fileValidator
FileValidator instance used for validating multiple files.
friend void swap(MultiFileValidator &obj1, MultiFileValidator &obj2)
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 "".
MultiFileValidator & operator=(MultiFileValidator)
std::vector< std::string > allowedValues() const override
Returns the set of allowed extensions.
MultiFileValidator()
Default constructor.
IValidator_sptr clone() const override
Clone the validator.
Logger g_log("DateAndTime")
void swap(MultiFileValidator &obj1, MultiFileValidator &obj2)
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.