6 #include <ext/hash_map>
8 typedef std::vector<std::string> Literals;
9 typedef __gnu_cxx::hash_map<std::string,bool> Preconditions;
10 typedef __gnu_cxx::hash_map<int,Literals> EffectsMap;
14 template< typename CharT, typename Traits, typename Alloc >
15 struct hash< std::basic_string<CharT, Traits, Alloc> > {
16 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
18 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
20 return c.hash(s.c_str(), s.c_str() + s.size());
26 template< typename CharT, typename Traits, typename Alloc >
27 struct hash< const std::basic_string<CharT, Traits, Alloc> > { //yes you need this version aswell!
29 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
31 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
33 return c.hash(s.c_str(), s.c_str() + s.size());
40 Action(std::string name, const Preconditions& preconditions, std::string executable, const EffectsMap& effects);
41 Action(const Action& action);
43 const Literals& effects(int value) const;
44 const Preconditions& preconditions() const;
45 const std::string& name() const;
50 std::string _executable;
51 Preconditions _preconditions;
53 static const Literals _empty;