HashSet Struct Reference

HashSet: A set which backed by Hash Table. More...

#include <collection.h>

Data Fields

GHashTable * hTable
 The backing GHashTable.
ElementType setType
 Element type of key.

Detailed Description

HashSet provides a hash table (GHashTable) backed data structure for set-like data. Unlike GHashTable which works on key-value pairs; HashSet, however, deals with only element values, as they serve as both keys and values. In other words, each element value is inserted to GHashTable as keys and values.

The property setType not only tells what this HashSet stores, but also determine the default handler functions such as element hash and equal functions.

Note that due to the nature or hash table, the element order is deemed to be unstable. Also, since GHashTable does not copy key and value, neither does HashSet. The referred storages should remain present until HashSet is freed.

See also:

The documentation for this struct was generated from the following file:

Generated on Tue Oct 21 17:13:23 2008 for libUnihan by  doxygen 1.5.6