Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
GoalSelector.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_GOAL_SELECTOR_H
4 #define GRAIL_GOAL_SELECTOR_H
5 
6 #include "Goal.hh"
7 
8 namespace grail
9 {
10 namespace planner
11 {
17  {
18  public:
20  virtual void SetNewGoal(std::unique_ptr<Goal> newGoal, AIEntity& entity) = 0;
21 
23  virtual const Goal* GetCurrentGoal() const = 0;
24  };
25 
32  {
33  public:
34  GoalSelector() = default;
35  GoalSelector(const GoalSelector&) = default;
36  GoalSelector(GoalSelector&&) = default;
37 
38  virtual ~GoalSelector() = default;
39 
40  GoalSelector& operator =(const GoalSelector&) = default;
41  GoalSelector& operator =(GoalSelector&&) = default;
42 
44  virtual void UpdateGoal(IGoalAcceptor& goalAcceptor, AIEntity& entity) = 0;
45  };
46 }
47 }
48 #endif //GRAIL_GOAL_SELECTOR_H
grail::planner::GoalSelector
Definition: GoalSelector.hh:31
grail::AIEntity
The AIEntity class - Defines a basic object which can execute behaviors.
Definition: AIEntity.hh:50
grail::planner::IGoalAcceptor::SetNewGoal
virtual void SetNewGoal(std::unique_ptr< Goal > newGoal, AIEntity &entity)=0
Sets a new current goal for the given entity.
grail::planner::GoalSelector::UpdateGoal
virtual void UpdateGoal(IGoalAcceptor &goalAcceptor, AIEntity &entity)=0
This method should invoke goalAcceptor.setNewGoal whenever a new goal is selected.
grail::planner::IGoalAcceptor
Definition: GoalSelector.hh:16
grail::planner::IGoalAcceptor::GetCurrentGoal
virtual const Goal * GetCurrentGoal() const =0
grail::planner::Goal
Definition: Goal.hh:19