X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..8dc9904630c28707c828328e997ec46639aca757:/include/wx/hash.h?ds=sidebyside diff --git a/include/wx/hash.h b/include/wx/hash.h index 8000d7b8b3..ec71b9b8c1 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __WXHASHH__ -#define __WXHASHH__ +#ifndef _WX_WXHASHH__ +#define _WX_WXHASHH__ #ifdef __GNUG__ #pragma interface "hash.h" @@ -38,10 +38,12 @@ class WXDLLEXPORT wxHashTable: public wxObject unsigned int key_type; wxList **hash_table; - wxHashTable(const int the_key_type = wxKEY_INTEGER, const int size = 1000); + wxHashTable(int the_key_type = wxKEY_INTEGER, int size = 1000); ~wxHashTable(void); + + void Destroy(void); // Robert Roebling - bool Create(const int the_key_type = wxKEY_INTEGER, const int size = 1000); + bool Create(int the_key_type = wxKEY_INTEGER, int size = 1000); // Note that there are 2 forms of Put, Get. // With a key and a value, the *value* will be checked @@ -56,31 +58,31 @@ class WXDLLEXPORT wxHashTable: public wxObject // e.g. 1 + 2 = 3, 2 + 1 = 3. // key and value are NOT necessarily the same - void Put(const long key, const long value, wxObject *object); - void Put(const long key, const char *value, wxObject *object); + void Put(long key, long value, wxObject *object); + void Put(long key, const wxChar *value, wxObject *object); // key and value are the same - void Put(const long value, wxObject *object); - void Put(const char *value, wxObject *object); + void Put(long value, wxObject *object); + void Put(const wxChar *value, wxObject *object); // key and value not the same - wxObject *Get(const long key, const long value) const; - wxObject *Get(const long key, const char *value) const; + wxObject *Get(long key, long value) const; + wxObject *Get(long key, const wxChar *value) const; // key and value are the same - wxObject *Get(const long value) const; - wxObject *Get(const char *value) const; + wxObject *Get(long value) const; + wxObject *Get(const wxChar *value) const; // Deletes entry and returns data if found - wxObject *Delete(const long key); - wxObject *Delete(const char *key); + wxObject *Delete(long key); + wxObject *Delete(const wxChar *key); - wxObject *Delete(const long key, const int value); - wxObject *Delete(const long key, const char *value); + wxObject *Delete(long key, int value); + wxObject *Delete(long key, const wxChar *value); // Construct your own integer key from a string, e.g. in case // you need to combine it with something - long MakeKey(const char *string) const; + long MakeKey(const wxChar *string) const; // Way of iterating through whole hash table (e.g. to delete everything) // Not necessary, of course, if you're only storing pointers to @@ -89,10 +91,10 @@ class WXDLLEXPORT wxHashTable: public wxObject void BeginFind(void); wxNode *Next(void); - void DeleteContents(const bool flag); + void DeleteContents(bool flag); void Clear(void); }; #endif - // __WXHASHH__ + // _WX_WXHASHH__