slumber-quest/validators/validator.h

30 lines
545 B
C
Raw Normal View History

#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