/////////////////////////////////////////////////////////////////////////////
// Name: hashmap.h
-// Purpose: documentation for wxHashMap class
+// Purpose: interface of wxHashMap
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/**
@class wxHashMap
@wxheader{hashmap.h}
-
+
This is a simple, type-safe, and reasonably efficient hash map class,
whose interface is a subset of the interface of STL containers. In
particular, the interface is modeled after std::map, and the various,
non-standard, std::hash_map.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxHashMap
+class wxHashMap
{
public:
//@{
Copy constructor.
*/
wxHashMap(size_type size = 10);
- wxHashMap(const wxHashMap& map);
+ wxHashMap(const wxHashMap& map);
//@}
//@{
Please remember that hash maps do not guarantee ordering.
*/
const_iterator begin();
- iterator begin();
+ const iterator begin();
//@}
/**
Counts the number of elements with the given key present in the map.
This function returns only 0 or 1.
*/
- size_type count(const key_type& key);
+ size_type count(const key_type& key) const;
/**
Returns @true if the hash map does not contain any elements, @false otherwise.
*/
- bool empty();
+ bool empty() const;
//@{
/**
Please remember that hash maps do not guarantee ordering.
*/
const_iterator end();
- iterator end();
+ const iterator end();
//@}
//@{
the iterator is no longer valid and must not be used.
*/
size_type erase(const key_type& key);
- void erase(iterator it);
- void erase(const_iterator it);
+ void erase(iterator it);
+ void erase(const_iterator it);
//@}
//@{
an iterator pointing at that element, otherwise an invalid iterator
is returned (i.e. hashmap.find( non_existent_key ) == hashmap.end()).
*/
- iterator find(const key_type& key);
- const_iterator find(const key_type& key);
+ iterator find(const key_type& key) const;
+ const_iterator find(const key_type& key) const;
//@}
/**
/**
Returns the number of elements in the map.
*/
- size_type size();
+ size_type size() const;
};
+