X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=planner.h;h=3faa6fb6918559f0182e45b51fc167c340920db1;hb=41efed0d6ee664fb79ea21a0e7239edcf51926d8;hp=7932eb9251814908502d07b197c198d5bed9f712;hpb=dc49c0c521090f0eb4b9692b25a129537c07e19e;p=popboot.git diff --git a/planner.h b/planner.h index 7932eb9..3faa6fb 100644 --- a/planner.h +++ b/planner.h @@ -7,45 +7,23 @@ class Node; - - -namespace __gnu_cxx { - - template< typename CharT, typename Traits, typename Alloc > - struct hash< std::basic_string > { - size_t operator()(const std::basic_string& s) const { - - const std::collate& c = std::use_facet< std::collate >(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 > { //yes you need this version aswell! - -size_t operator()(const std::basic_string& s) const { - - const std::collate& c = std::use_facet< std::collate >(std::locale()); - - return c.hash(s.c_str(), s.c_str() + s.size()); - } - - }; -}; - class Planner { public: - Planner(std::vector actions, literals init, literals goal); + Planner(std::vector actions, Literals init, Literals goal); + ~Planner(); + + void execute(); protected: void makePlan(Node* node); + void addNode(Node* node); Node* _start; + Node* _finish; __gnu_cxx::hash_map _addedNodes; __gnu_cxx::hash_map _actions; + Literals _init; + Literals _goal; }; #endif