|
HASHTABLE * | blInitializeHash (ULONG hashsize) |
|
void | blFreeHash (HASHTABLE *hashtable) |
|
char * | blStrdup (char *instr) |
|
void | blFreeHashKeyList (char **keylist) |
|
char ** | blGetHashKeyList (HASHTABLE *hashtable) |
|
BOOL | blSetHashValue (HASHTABLE *hashtable, char *key, int type,...) |
|
BPTR | blGetHashValue (HASHTABLE *hashtable, char *key, int *type) |
|
BOOL | blDumpHash (FILE *out, HASHTABLE *hashtable) |
|
BOOL | blSetHashValueString (HASHTABLE *hashtable, char *key, char *value) |
|
BOOL | blSetHashValueInt (HASHTABLE *hashtable, char *key, int value) |
|
BOOL | blSetHashValueDouble (HASHTABLE *hashtable, char *key, double value) |
|
BOOL | blSetHashValuePointer (HASHTABLE *hashtable, char *key, BPTR ptr) |
|
BOOL | blSetHashValueChar (HASHTABLE *hashtable, char *key, char value) |
|
int | blGetHashValueInt (HASHTABLE *hashtable, char *key) |
|
double | blGetHashValueDouble (HASHTABLE *hashtable, char *key) |
|
char | blGetHashValueChar (HASHTABLE *hashtable, char *key) |
|
char * | blGetHashValueString (HASHTABLE *hashtable, char *key) |
|
BPTR | blGetHashValuePointer (HASHTABLE *hashtable, char *key) |
|
BOOL | blHashKeyDefined (HASHTABLE *hashtable, char *key) |
|
void | blDeleteHashKey (HASHTABLE *hashtable, char *key) |
|
Defines for using hash functions.
- Version
- V1.2
- Date
- 26.11.15
- Copyright
- (c) UCL / Dr. Andrew C. R. Martin 2015
- Author
- Dr. Andrew C. R. Martin
- Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
- andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
Description:
Usage:
Revision History:
- V1.0 14.05.15 Original By: ACRM
- V1.1 03.06.15 Added wrappers to blSetHashValue()
- V1.2 26.11.15 Added check on HASH_H
Definition in file hash.h.
BPTR blGetHashValue |
( |
HASHTABLE * |
hashtable, |
|
|
char * |
key, |
|
|
int * |
type |
|
) |
| |
- Parameters
-
[in] | hashtable | The hash table |
[in] | key | The hash key |
[out] | type | The type for that item (or NULL) |
- Returns
- Pointer to the value
Obtain an entry from the hash. Type 'type' parameter can be NULL if you are sure you know what the type is and don't want to check. The value is returned as a pointer. If the value is itself a pointer or a string then this is what you want, but you will need to cast it appropriately. If it is an int, double or char then you need to cast and dereference this:
string: (char *)value pointer: (my-type *)value int: *(int *)value double: *(double *)value char: *(char *)value
- 12.05.15 Original By: ACRM
Definition at line 668 of file hash.c.