Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Plan.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_PLAN_H
4 #define GRAIL_PLAN_H
5 
6 #include "Behavior.hh"
7 
8 #include <memory>
9 #include <queue>
10 
11 namespace grail
12 {
14  class Plan
15  {
16  public:
18  void PushBehavior(std::unique_ptr<Behavior> behavior);
19  std::unique_ptr<Behavior> PopFirstBehavior();
20  bool IsNonEmpty() const;
21  void Clear();
22  std::size_t Size() const;
23 
24  private:
25  std::queue<std::unique_ptr<Behavior>> actionSequence{};
26  };
27 }
28 #endif //GRAIL_PLAN_H
grail::Plan
A data structure used by PlannerReasoner to execute a sequence of behaviors.
Definition: Plan.hh:14
grail::Plan::PushBehavior
void PushBehavior(std::unique_ptr< Behavior > behavior)
Use this method during plan translation in your implementation of DomainTranslator.
Definition: Plan.cpp:7