X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTDictionary.hh;h=4864630f969cf0c36bb117a7a5855300aead6de2;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=43c2e51af3f5511d79f45e814918fd1045e2ad37;hpb=98e5817ce4fa424fb3181d90d327935c1b100ec4;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/TDictionary.hh b/helm/DEVEL/mathml_editor/src/TDictionary.hh index 43c2e51af..4864630f9 100644 --- a/helm/DEVEL/mathml_editor/src/TDictionary.hh +++ b/helm/DEVEL/mathml_editor/src/TDictionary.hh @@ -30,7 +30,13 @@ #include #include +#if defined(HAVE_EXT_HASH_MAP) +#include +#elif defined(HAVE_HASH_MAP) #include +#else +#error "no hash_map could be found" +#endif #include #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&) 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()(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()(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 >