Grail (C++)  1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
Plan.hh
1 #ifndef GRAIL_PLAN_H
2 #define GRAIL_PLAN_H
3 
4 #include "Behavior.hh"
5 
6 #include <memory>
7 #include <queue>
8 
9 namespace grail
10 {
11  namespace planning
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 }
29 #endif //GRAIL_PLAN_H
grail::planning::Plan
A data structure used by PlannerReasoner to execute a sequence of behaviors.
Definition: Plan.hh:14
grail::planning::Plan::PushBehavior
void PushBehavior(std::unique_ptr< Behavior > behavior)
Use this method during plan translation in your implementation of DomainTranslator.
Definition: Plan.cpp:7