2021-05-08 03:36:26 +02:00
|
|
|
#ifndef LOCATIONREQUIREDPOLICY_H
|
|
|
|
#define LOCATIONREQUIREDPOLICY_H
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include "policy.h"
|
|
|
|
|
|
|
|
class Location;
|
|
|
|
|
|
|
|
class LocationRequiredPolicy : public Policy
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit LocationRequiredPolicy(const std::string& satisfaction, const std::string& dissatisfaction);
|
|
|
|
virtual ~LocationRequiredPolicy() override;
|
|
|
|
|
2021-05-16 01:44:19 +02:00
|
|
|
virtual Policy::CheckResult check(const std::shared_ptr<Actor>& actor) const override;
|
2021-05-08 03:36:26 +02:00
|
|
|
|
|
|
|
void setRequiredLocation(const std::shared_ptr<Location>& location);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Location> _location;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOCATIONREQUIREDPOLICY_H
|