X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1dc9f8394c1488ad8e7d945e6f943f7b34554ce..8a7afe4dfef33756855c0e7bd38cf20d0d9a9e2f:/include/wx/hash.h diff --git a/include/wx/hash.h b/include/wx/hash.h index 106290a216..5cf258f5d2 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -13,6 +13,7 @@ #define _WX_HASH_H__ #include "wx/defs.h" +#include "wx/string.h" #define wxUSE_OLD_HASH_TABLE 0 @@ -152,7 +153,7 @@ public: typedef wxHashTableBase_Node Node; wxHashTableBase(); - virtual ~wxHashTableBase() { }; + virtual ~wxHashTableBase() { } void Create( wxKeyType keyType = wxKEY_INTEGER, size_t size = wxHASH_SIZE_DEFAULT ); @@ -269,6 +270,9 @@ public: { DoPut( value, lhash, object ); } void Put(const wxChar *value, wxObject *object) { DoPut( value, MakeKey( value ), object ); } + // FIXME-UTF8: have only wxString forms here + void Put(const wxString& value, wxObject *object) + { DoPut( value, MakeKey( value ), object ); } void Put(long lhash, const wxChar *value, wxObject *object) { DoPut( value, lhash, object ); } @@ -279,6 +283,9 @@ public: { return (wxObject*)DoGet( value, lhash ); } wxObject *Get(const wxChar *value) const { return (wxObject*)DoGet( value, MakeKey( value ) ); } + // FIXME-UTF8: have only wxString forms here + wxObject *Get(const wxString& value) const + { return (wxObject*)DoGet( value, MakeKey( value ) ); } wxObject *Get(long lhash, const wxChar *value) const { return (wxObject*)DoGet( value, lhash ); } @@ -289,6 +296,9 @@ public: { return (wxObject*)DoDelete( key, lhash ); } wxObject *Delete(const wxChar *key) { return (wxObject*)DoDelete( key, MakeKey( key ) ); } + // FIXME-UTF8: have only wxString forms here + wxObject *Delete(const wxString& key) + { return (wxObject*)DoDelete( key, MakeKey( key ) ); } wxObject *Delete(long lhash, const wxChar *key) { return (wxObject*)DoDelete( key, lhash ); } @@ -325,6 +335,8 @@ private: #else // if wxUSE_OLD_HASH_TABLE +typedef wxNode wxHashTable_Node; + class WXDLLIMPEXP_BASE wxHashTable : public wxObject { public: