You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
545 B
C++

#ifndef VALIDATOR_H
#define VALIDATOR_H
#include <list>
#include <memory>
#include <string>
class Policy;
class Actor;
class Validator
{
public:
explicit Validator(const std::list<std::shared_ptr<Policy>>& policies);
virtual ~Validator() = 0;
struct ValidateResult
{
bool success = false;
std::string validate_output;
};
virtual ValidateResult validate(const std::shared_ptr<Actor>& actor) const = 0;
protected:
std::list<std::shared_ptr<Policy>> _validation_policies;
};
#endif // VALIDATOR_H