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


CNKeyObject -- Object Management via CNCL object pointers keys

SYNOPSIS

#include <CNCL/KeyObject.h>

TYPE

CN_KEYOBJECT

BASE CLASSES

CNKey

DERIVED CLASSES

None

RELATED CLASSES

CNKeyString, CNKeyInt, CNHashTable, CNHashStatic, CNHashDynamic, CNHashIterator, CNManager

DESCRIPTION

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

CNKeyObject(CNObject *key_int, CNObject *obj = NIL);
CNKeyObject(CNParam *param);
Initializes CNKeyObject. The supplied object pointer key is used to calculate the hash table position. Therefore, the object pointer key must be unique. In normal memory models this is complied.

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

CNObject *get_key() const;
Returns the object pointer key. Unlike the object the object pointer 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.