ANTLR3_HASH_ENTRY_struct man page

ANTLR3_HASH_ENTRY_struct — Internal structure representing an element in a hash bucket.

Synopsis

#include <antlr3collections.h>

Public Member Functions

void (ANTLR3_CDECL *free)(void *data)
Pointer to routine that knows how to release the memory structure pointed at by data.

Data Fields

void * data
Pointer to the data for this particular entry.
ANTLR3_HASH_KEY keybase
Key that created this particular entry.
struct ANTLR3_HASH_ENTRY_struct * nextEntry
Pointer to the next entry in this bucket if there is one.

Detailed Description

Internal structure representing an element in a hash bucket.

Stores the original key so that duplicate keys can be rejected if necessary, and contains function can be supported. If the hash key could be unique I would have invented the perfect compression algorithm ;-)

Member Function Documentation

ANTLR3_HASH_ENTRY_struct::void (ANTLR3_CDECL * free)

Pointer to routine that knows how to release the memory structure pointed at by data. If this is NULL then we assume that the data pointer does not need to be freed when the entry is deleted from the table.

Field Documentation

void* ANTLR3_HASH_ENTRY_struct::data

Pointer to the data for this particular entry.

Referenced by antlr3EnumNext(), antlr3HashDelete(), antlr3HashDeleteI(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), and antlr3ListRemove().

ANTLR3_HASH_KEY ANTLR3_HASH_ENTRY_struct::keybase

Key that created this particular entry.

Referenced by antlr3EnumNext(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), antlr3HashRemove(), and antlr3HashRemoveI().

struct ANTLR3_HASH_ENTRY_struct* ANTLR3_HASH_ENTRY_struct::nextEntry

Pointer to the next entry in this bucket if there is one. Sometimes different keys will hash to the same bucket (especially if the number of buckets is small). We could implement dual hashing algorithms to minimize this, but that seems over the top for what this is needed for.

Referenced by antlr3EnumNextEntry(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), antlr3HashRemove(), and antlr3HashRemoveI().

Author

Generated automatically by Doxygen for ANTLR3C from the source code.

Referenced By

antlr3-data(3), antlr3-keybase(3), antlr3-nextEntry(3) and antlr3-void(3) are aliases of ANTLR3_HASH_ENTRY_struct(3).

Tue Oct 4 2016 Version 3.3.1 ANTLR3C