Go to the first, previous, next, last section, table of contents.


CNKeyInt -- Object Management via Integer Keys

SYNOPSIS

#include <CNCL/KeyInt.h>

TYPE

CN_KEYINT

BASE CLASSES

CNKey

DERIVED CLASSES

None

RELATED CLASSES

CNKeyString, CNKeyObject, CNHashTable, CNHashStatic, CNHashDynamic, CNHashIterator, CNManager

DESCRIPTION

CNKeyInt is a class for managing CNCL compatible objects via integer keys. Objects of this type can be stored in and retrieved from hash tables. Constructors:

CNKeyInt(unsigned long key_int, CNObject *obj = NIL);
CNKeyInt(CNParam *param);
Initializes CNKeyInt. The supplied integer key is used to calculate the hash table position. Therefore, the integer key must be unique.

In addition to the member functions required by CNCL, CNKeyInt provides:

unsigned long get_key() const;
Returns the integer key. Unlike the object the integer key cannot be changed.
virtual unsigned long hash( unsigned long capacity, int par = 0) const;
Evaluates the hash-table value.
virtual bool compare(CNKey *k) const;
virtual bool compare(CNKey &k) const;
Compares two CNKeys.


Go to the first, previous, next, last section, table of contents.