wxHashSet Class Reference

#include <wx/hashset.h>

List of all members.


Detailed Description

This is a simple, type-safe, and reasonably efficient hash set class, whose interface is a subset of the interface of STL containers. In particular, the interface is modeled after std::set, and the various, non-standard, std::hash_map.

Library:  wxBase

Category:  group_class_FIXME

Public Member Functions

void clear ()
size_type count (const key_type &key) const
bool empty () const
Insert_Result insert (const value_type &v)
size_type size () const
 wxHashSet (size_type size=10)
 wxHashSet (const wxHashSet &set)
const_iterator begin ()
const iterator begin ()
const_iterator end ()
const iterator end ()
size_type erase (const key_type &key)
void erase (iterator it)
void erase (const_iterator it)
iterator find (const key_type &key) const
const_iterator find (const key_type &key) const

Constructor & Destructor Documentation

wxHashSet::wxHashSet ( size_type  size = 10  ) 

Copy constructor.

wxHashSet::wxHashSet ( const wxHashSet set  ) 

Copy constructor.


Member Function Documentation

const_iterator wxHashSet::begin (  ) 

Returns an iterator pointing at the first element of the hash set. Please remember that hash sets do not guarantee ordering.

const iterator wxHashSet::begin (  ) 

Returns an iterator pointing at the first element of the hash set. Please remember that hash sets do not guarantee ordering.

void wxHashSet::clear (  ) 

Removes all elements from the hash set.

size_type wxHashSet::count ( const key_type &  key  )  const

Counts the number of elements with the given key present in the set. This function returns only 0 or 1.

bool wxHashSet::empty (  )  const

Returns true if the hash set does not contain any elements, false otherwise.

const_iterator wxHashSet::end (  ) 

Returns an iterator pointing at the one-after-the-last element of the hash set. Please remember that hash sets do not guarantee ordering.

const iterator wxHashSet::end (  ) 

Returns an iterator pointing at the one-after-the-last element of the hash set. Please remember that hash sets do not guarantee ordering.

size_type wxHashSet::erase ( const key_type &  key  ) 

Erases the element pointed to by the iterator. After the deletion the iterator is no longer valid and must not be used.

void wxHashSet::erase ( iterator  it  ) 

Erases the element pointed to by the iterator. After the deletion the iterator is no longer valid and must not be used.

void wxHashSet::erase ( const_iterator  it  ) 

Erases the element pointed to by the iterator. After the deletion the iterator is no longer valid and must not be used.

iterator wxHashSet::find ( const key_type &  key  )  const

If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned (i.e. hashset.find( non_existent_key ) == hashset.end()).

const_iterator wxHashSet::find ( const key_type &  key  )  const

If an element with the given key is present, the functions returns an iterator pointing at that element, otherwise an invalid iterator is returned (i.e. hashset.find( non_existent_key ) == hashset.end()).

Insert_Result wxHashSet::insert ( const value_type &  v  ) 

Inserts the given value in the hash set. The return value is equivalent to a std::pairwxHashMap::iterator, bool; the iterator points to the inserted element, the boolean value is true if v was actually inserted.

size_type wxHashSet::size (  )  const

Returns the number of elements in the set.



wxWidgets logo

[ top ]