]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/src/TDictionary.hh
ocaml 3.09 transition
[helm.git] / helm / DEVEL / mathml_editor / src / TDictionary.hh
index 43c2e51af3f5511d79f45e814918fd1045e2ad37..4864630f969cf0c36bb117a7a5855300aead6de2 100644 (file)
 
 #include <string>
 #include <vector>
+#if defined(HAVE_EXT_HASH_MAP)
+#include <ext/hash_map>
+#elif defined(HAVE_HASH_MAP)
 #include <hash_map>
+#else
+#error "no hash_map could be found"
+#endif
 #include <list>
 
 #include "dom.hh"
@@ -84,6 +90,8 @@ public:
     unsigned table : 1;
   };
 
+  static std::string getDefaultDictionaryPath(void);
+
   void load(const std::string&);
   void load(const std::string&, const std::string&);
   void load(const DOM::Document&, const std::string& = "");
@@ -91,8 +99,15 @@ public:
   std::string complete(const std::string, std::list<std::string>&) const;
 
 private:
+#if defined(HAVE_EXT_HASH_MAP)
+  struct StringHash : public std::unary_function< std::string, size_t >
+  { size_t operator()(const std::string& s) const { return __gnu_cxx::hash<char*>()(s.c_str()); } };
+#elif defined(HAVE_HASH_MAP)
   struct StringHash : public std::unary_function< std::string, size_t >
   { size_t operator()(const std::string& s) const { return hash<char*>()(s.c_str()); } };
+#else
+#error "no hash_map could be found"
+#endif
 
 #if 0
   struct StringEq : public std::binary_function< std::string, std::string, bool >