class DictionaryOf


Definition#include <sysadm/DictionaryOf.h>
Template formDictionaryOf<template class Type>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

inline  DictionaryOf (unsigned int buckets = 251)

The number of buckets needs to be carefully selected. Notice the default value is a prime number. Making the bucket count prime reduces the likely hood of collisions, or at least keeps the chain length relatively uniform across the buckets.

The constructor will compute the next larger prime number if given a non-prime value for buckets. This can create a rather compute intensive construction if a large non-prime number is provided. It can also generate a dramatically larger bucket count than expected.

The expectations of the contructor is that most bucket counts will be relatively small numbers so the next prime number is relatively close to the value given.

inline  DictionaryOf (const DictionaryOf& copy)

inline ~ DictionaryOf (void)

inline DictionaryOf&  operator= (const DictionaryOf& copy)

inline void  add (Type* element, Hashable * adoptKey)

inline Type*  remove (const Hashable& key)

inline Type*  lookupByKey (const Hashable & key, const Hashable** retKey = NULL)

If retKey is non-NULL, it will be set to point the the key used by the dictionary. This is useful for maximizing string sharing.

inline const Type*  lookupByKey (const Hashable & key, const Hashable** retKey = NULL)

[const]

inline Type*  operator[] (const Hashable& key)

inline const Type*  operator[] (const Hashable& key)

[const]

inline unsigned int  getSize ()

[const]

inline unsigned int  getBucketOverflow ()

[const]

inline unsigned int  getMaxChain ()

[const]

DictionaryOfTempl * _templ

[protected]


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.