X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=blobdiff_plain;f=planner.h;h=f00c61473382884c6c42bf427614278c627c851f;hp=bb6836a269d23bf0ff8a85c9451dca6d40143abe;hb=d385ba13a2ded8ce22b83c82d8a50c89a5d1d63e;hpb=3dadaa088d9fff7ca05cbb297f3d7e88179faccb diff --git a/planner.h b/planner.h index bb6836a..f00c614 100644 --- 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 > { - 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(); @@ -49,9 +20,12 @@ class Planner { void addNode(Node* node); Node* _start; - __gnu_cxx::hash_map _addedNodes; - __gnu_cxx::hash_map _actions; - literals _init; - literals _goal; + Node* _finish; + __gnu_cxx::hash_map _addedEffects; + __gnu_cxx::hash_map _actionEffects; + Literals _init; + Literals _goal; + std::vector _addedNodes; + std::vector _actions; }; #endif