#include <antlr3collections.h>
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 ;-)
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. |
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.
Pointer to the data for this particular entry.
Referenced by antlr3EnumNext(), antlr3HashDelete(), antlr3HashDeleteI(), antlr3HashFree(), antlr3HashGet(), antlr3HashGetI(), antlr3HashPut(), antlr3HashPutI(), and antlr3ListRemove().
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 [read] |
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().