]> ruin.nu Git - popboot.git/blobdiff - planner.h
some done, need parser
[popboot.git] / planner.h
index bb6836a269d23bf0ff8a85c9451dca6d40143abe..3faa6fb6918559f0182e45b51fc167c340920db1 100644 (file)
--- a/planner.h
+++ b/planner.h
@@ -7,38 +7,9 @@
 
 class Node;
 
-
-
-namespace __gnu_cxx {
-
-    template< typename CharT, typename Traits, typename Alloc >
-    struct hash< std::basic_string<CharT, Traits, Alloc> > {
-        size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
-            
-           const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
-           
-           return c.hash(s.c_str(), s.c_str() + s.size());
-
-}
-
-    };
-
-    template< typename CharT, typename Traits, typename Alloc >
-    struct hash< const std::basic_string<CharT, Traits, Alloc> > { //yes you need this version aswell!
-
-size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
-       
-          const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
-      
-          return c.hash(s.c_str(), s.c_str() + s.size());
-        }
-
-    };
-};
-
 class Planner {
        public:
-               Planner(std::vector<Action> actions, literals init, literals goal);
+               Planner(std::vector<Action> actions, Literals init, Literals goal);
                ~Planner();
 
                void execute();
@@ -49,9 +20,10 @@ class Planner {
                void addNode(Node* node);
                
                Node* _start;
+               Node* _finish;
                __gnu_cxx::hash_map<std::string,Node*> _addedNodes;
-               __gnu_cxx::hash_map<std::string,Action*> _actions;
-               literals _init;
-               literals _goal;
+               __gnu_cxx::hash_map<std::string,Action> _actions;
+               Literals _init;
+               Literals _goal;
 };
 #endif