Go to the previous, next section.
#include <CNCL/HashDynamic.h>
CN_HASHDYNAMIC
CNHashTable
None
CNHashStatic, CNHashIterator, CNKey, CNKeyString, CNKeyInt, CNManager
CNHashDynamic is a class which provides a hash table with dynamic capacity
for storing and retrieving CNCL compatible objects.
Constructors:
CNHashDynamic(unsigned long cap = DEFAULT_HASH_TABLE_CAPACITY);
CNHashDynamic(CNParam *param);
CNHashDynamic. The hash table's capacity is set to
the value passed to HashDynamic. The capacity is dynamic, i.e. if the
number of entries exceeds 3/4 of the hash table's capacity, it is
enlarged to a proper value.
Destructors:
~CNHashDynamic();
CNHashDynamic provides the member functions required by CNCL and
CNHashTable.
Some member functions defined in CNHashTable and
implemented in CNHashDynamic demand further explanation:
void store_key(CNKey *k);
get_key() and
get_object(). The capacity is dynamic, i.e. if the
number of entries exceeds 3/4 of the hash table's capacity, it is
enlarged to a proper value.
bool delete_key(CNKey *k);
FALSE is returned, otherwise TRUE.
bool delete_key_absolutely(CNKey *k);
FALSE is returned, otherwise TRUE.
Refer to CNHashStatic for an example as to how to use a
CNHashDynamic object in order to store and retrieve CNCL
compatible objects.
Go to the previous, next section.