#include "allpoliciesvalidator.h" #include "policy.h" AllPoliciesValidator::AllPoliciesValidator(const std::list>& policies) : Validator(policies) {} AllPoliciesValidator::~AllPoliciesValidator() {} Validator::ValidateResult AllPoliciesValidator::validate(const std::shared_ptr &actor) const { Validator::ValidateResult validate_result{true, ""}; for (const auto& policy : _validation_policies) { const auto result = policy->check(actor); validate_result.validate_output += result.commentary; validate_result.validate_output += "\n\n"; if (!result.satisfied) { validate_result.success = false; break; } } return validate_result; }