]> ruin.nu Git - popboot.git/blobdiff - planner.h
including iterator
[popboot.git] / planner.h
index 1b4938b36e7eb04560342e9403baeec3499d896f..8d116933f14a6d0122aaa0182ca22f21686ca277 100644 (file)
--- a/planner.h
+++ b/planner.h
@@ -1,14 +1,39 @@
 #ifndef __PLANNER_H__
 #define __PLANNER_H__
 
-#include <hash_map>
-#include "node.h"
+#include <ext/hash_map>
+#include <vector>
+#include <queue>
+#include <pthread.h>
+#include <semaphore.h>
+#include "action.h"
+
+class Node;
 
 class Planner {
        public:
+               Planner(std::vector<Action> actions, Literals init, Literals goal);
+               ~Planner();
+
+               void execute();
+
 
        protected:
-               Node start;
-               std::hash_map<string,Node*> addedNodes;
+
+               void makePlan(Node* node);
+               void addNode(Node* node);
+
+               sem_t _nodes;
+               sem_t _list;
+               std::queue<Node*> _executedNodes;
+               
+               Node* _start;
+               Node* _finish;
+               __gnu_cxx::hash_map<std::string,Node*> _addedEffects;
+               __gnu_cxx::hash_map<std::string,Action*> _actionEffects;
+               Literals _init;
+               Literals _goal;
+               std::vector<Node*> _addedNodes;
+               std::vector<Action*> _actions;
 };
 #endif