6 #include <ext/hash_map>
9 typedef std::vector<std::string> Literals;
10 typedef __gnu_cxx::hash_map<std::string,bool> Preconditions;
11 typedef __gnu_cxx::hash_map<int,Literals> EffectsMap;
15 template< typename CharT, typename Traits, typename Alloc >
16 struct hash< std::basic_string<CharT, Traits, Alloc> > {
17 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
19 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
21 return c.hash(s.c_str(), s.c_str() + s.size());
27 template< typename CharT, typename Traits, typename Alloc >
28 struct hash< const std::basic_string<CharT, Traits, Alloc> > { //yes you need this version aswell!
30 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
32 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
34 return c.hash(s.c_str(), s.c_str() + s.size());
41 Action(std::string name, const Preconditions& preconditions, std::string executable, const EffectsMap& effects);
42 Action(const Action& action);
44 const Literals& effects(int value) const;
45 const Preconditions& preconditions() const;
46 const std::string& name() const;
51 std::string _executable;
52 Preconditions _preconditions;
54 static const Literals _empty;