kjs Library API Documentation

KJS::HashTable Struct Reference

A hash table Usually the hashtable is generated by the create_hash_table script, from a .table file. More...

#include <lookup.h>

Collaboration diagram for KJS::HashTable:

Collaboration graph
[legend]
List of all members.

Public Attributes

int type
int size
const HashEntry *const entries
int hashSize
const char *const sbase

Detailed Description

A hash table Usually the hashtable is generated by the create_hash_table script, from a .table file.

The implementation uses an array of entries, "size" is the total size of that array. The entries between 0 and hashSize-1 are the entry points for each hash value, and the entries between hashSize and size-1 are the overflow entries for the hash values that need one. The "next" pointer of the entry links entry points to overflow entries, and links overflow entries between them.

Definition at line 72 of file lookup.h.


Member Data Documentation

int KJS::HashTable::type
 

type is a version number.

Currently always 2

Definition at line 76 of file lookup.h.

int KJS::HashTable::size
 

size is the total number of entries in the hashtable, including the null entries, i.e.

the size of the "entries" array. Used to iterate over all entries in the table

Definition at line 82 of file lookup.h.

const HashEntry* const KJS::HashTable::entries
 

pointer to the array of entries Mind that some entries in the array are null (0,0,0,0).

Definition at line 87 of file lookup.h.

int KJS::HashTable::hashSize
 

the maximum value for the hash.

Always smaller than size.

Definition at line 91 of file lookup.h.

const char* const KJS::HashTable::sbase
 

pointer to the string table.

Definition at line 96 of file lookup.h.


The documentation for this struct was generated from the following file:
KDE Logo
This file is part of the documentation for kjs Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 12 23:07:26 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003