28 #include "Requirement.h"
29 #include "RequirementLoader.h"
81 virtual void Parse(Value json,
const std::string& path)
override
86 auto& head = json.isMember(
"anyOf") ? json[
"anyOf"] : json;
91 reqs_.push_back(std::move(req));
92 reqs_.back()->Parse(val, path);
102 virtual void Validate(
const Value& json,
const std::string& path)
override
106 r->Validate(json, path);
115 for(
const auto& error : r->GetErrors())
119 for(
const auto& notice : r->GetNotices())
Requires that at least one of a list of Requirements hold.
RequireList reqs_
List of Requirements.
virtual void Validate(const Value &json, const std::string &path) override
Validate that at least one Requirement holds.
virtual void ClearNotices() override
Clear list of notices for all Requirements.
virtual void Reset() override
Reset all Requirements.
virtual void ClearErrors() override
Clear list of error messages for all Requirements.
virtual void Parse(Value json, const std::string &path) override
Parse JSON value and create list of Requirements.
AnyOfRequirement()
Constructor.
Helper class to load Requirement.
std::unique_ptr< Requirement > LoadRequirement(const Value &json)
Load specific requirement.
Requirements on input files.
void PushNotice(const std::string ¬ice)
Add message to list of notices.
virtual void ClearNotices()
Clear list of notice messages.
virtual void ClearErrors()
Clear list of error messages.
void PushError(const std::string &error)
Add error to list of error messages.
std::vector< std::unique_ptr< Requirement > > RequireList
List of Requirements.