tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hashtable.h File Reference
#include "list.h"
#include "pair.h"
#include "tm.h"
#include "types.h"
#include "lehigh.h"
Include dependency graph for hashtable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hashtable
 
struct  hashtable_iter
 

Macros

#define TMHASHTABLE_ITER_RESET(it, ht)   TMhashtable_iter_reset(TM_ARG it, ht)
 
#define TMHASHTABLE_ITER_HASNEXT(it, ht)   TMhashtable_iter_hasNext(TM_ARG it, ht)
 
#define TMHASHTABLE_ITER_NEXT(it, ht)   TMhashtable_iter_next(TM_ARG it, ht)
 
#define TMHASHTABLE_ALLOC(i, h, c, r, g)   TMhashtable_alloc(TM_ARG, i, h, c, r, g)
 
#define TMHASHTABLE_FREE(ht)   TMhashtable_free(TM_ARG ht)
 
#define TMHASHTABLE_ISEMPTY(ht)   TMhashtable_isEmpty(TM_ARG ht)
 
#define TMHASHTABLE_GETSIZE(ht)   TMhashtable_getSize(TM_ARG ht)
 
#define TMHASHTABLE_FIND(ht, k)   TMhashtable_find(TM_ARG ht, k)
 
#define TMHASHTABLE_INSERT(ht, k, d)   TMhashtable_insert(TM_ARG ht, k, d)
 
#define TMHASHTABLE_REMOVE(ht)   TMhashtable_remove(TM_ARG ht)
 

Typedefs

typedef struct hashtable hashtable_t
 
typedef struct hashtable_iter hashtable_iter_t
 

Enumerations

enum  hashtable_config { HASHTABLE_DEFAULT_RESIZE_RATIO = 3, HASHTABLE_DEFAULT_GROWTH_FACTOR = 3 }
 

Functions

void hashtable_iter_reset (hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
void TMhashtable_iter_reset (TM_ARGDECL hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
bool_t hashtable_iter_hasNext (hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
bool_t TMhashtable_iter_hasNext (TM_ARGDECL hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
void * hashtable_iter_next (hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
void * TMhashtable_iter_next (TM_ARGDECL hashtable_iter_t *itPtr, hashtable_t *hashtablePtr)
 
hashtable_thashtable_alloc (long initNumBucket, ulong_t(*hash)(const void *), comparator_t *comparePairs, long resizeRatio, long growthFactor)
 
hashtable_tTMhashtable_alloc (TM_ARGDECL long initNumBucket, ulong_t(*hash)(const void *), comparator_t *comparePairs, long resizeRatio, long growthFactor)
 
void hashtable_free (hashtable_t *hashtablePtr)
 
void TMhashtable_free (TM_ARGDECL hashtable_t *hashtablePtr)
 
bool_t hashtable_isEmpty (hashtable_t *hashtablePtr)
 
bool_t TMhashtable_isEmpty (TM_ARGDECL hashtable_t *hashtablePtr)
 
long hashtable_getSize (hashtable_t *hashtablePtr)
 
long TMhashtable_getSize (TM_ARGDECL hashtable_t *hashtablePtr)
 
bool_t hashtable_containsKey (hashtable_t *hashtablePtr, void *keyPtr)
 
bool_t TMhashtable_containsKey (TM_ARGDECL hashtable_t *hashtablePtr, void *keyPtr)
 
void * hashtable_find (hashtable_t *hashtablePtr, void *keyPtr)
 
void * TMhashtable_find (TM_ARGDECL hashtable_t *hashtablePtr, void *keyPtr)
 
bool_t hashtable_insert (hashtable_t *hashtablePtr, void *keyPtr, void *dataPtr)
 
bool_t TMhashtable_insert (TM_ARGDECL hashtable_t *hashtablePtr, void *keyPtr, void *dataPtr)
 
bool_t hashtable_remove (hashtable_t *hashtablePtr, void *keyPtr)
 
bool_t TMhashtable_remove (TM_ARGDECL hashtable_t *hashtablePtr, void *keyPtr)
 

Macro Definition Documentation

#define TMHASHTABLE_ALLOC (   i,
  h,
  c,
  r,
 
)    TMhashtable_alloc(TM_ARG, i, h, c, r, g)
#define TMHASHTABLE_FIND (   ht,
 
)    TMhashtable_find(TM_ARG ht, k)
#define TMHASHTABLE_FREE (   ht)    TMhashtable_free(TM_ARG ht)
#define TMHASHTABLE_GETSIZE (   ht)    TMhashtable_getSize(TM_ARG ht)
#define TMHASHTABLE_INSERT (   ht,
  k,
 
)    TMhashtable_insert(TM_ARG ht, k, d)
#define TMHASHTABLE_ISEMPTY (   ht)    TMhashtable_isEmpty(TM_ARG ht)
#define TMHASHTABLE_ITER_HASNEXT (   it,
  ht 
)    TMhashtable_iter_hasNext(TM_ARG it, ht)
#define TMHASHTABLE_ITER_NEXT (   it,
  ht 
)    TMhashtable_iter_next(TM_ARG it, ht)
#define TMHASHTABLE_ITER_RESET (   it,
  ht 
)    TMhashtable_iter_reset(TM_ARG it, ht)
#define TMHASHTABLE_REMOVE (   ht)    TMhashtable_remove(TM_ARG ht)

Typedef Documentation

typedef struct hashtable hashtable_t

Enumeration Type Documentation

Enumerator
HASHTABLE_DEFAULT_RESIZE_RATIO 
HASHTABLE_DEFAULT_GROWTH_FACTOR 

Function Documentation

hashtable_t* hashtable_alloc ( long  initNumBucket,
ulong_t(*)(const void *)  hash,
comparator_t comparePairs,
long  resizeRatio,
long  growthFactor 
)

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t hashtable_containsKey ( hashtable_t hashtablePtr,
void *  keyPtr 
)

Here is the call graph for this function:

void* hashtable_find ( hashtable_t hashtablePtr,
void *  keyPtr 
)

Here is the call graph for this function:

void hashtable_free ( hashtable_t hashtablePtr)

Here is the call graph for this function:

Here is the caller graph for this function:

long hashtable_getSize ( hashtable_t hashtablePtr)

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t hashtable_insert ( hashtable_t hashtablePtr,
void *  keyPtr,
void *  dataPtr 
)

Here is the call graph for this function:

bool_t hashtable_isEmpty ( hashtable_t hashtablePtr)

Here is the call graph for this function:

bool_t hashtable_iter_hasNext ( hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)

Here is the call graph for this function:

void* hashtable_iter_next ( hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)

Here is the call graph for this function:

void hashtable_iter_reset ( hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)

Here is the call graph for this function:

bool_t hashtable_remove ( hashtable_t hashtablePtr,
void *  keyPtr 
)

Here is the call graph for this function:

hashtable_t* TMhashtable_alloc ( TM_ARGDECL long  initNumBucket,
ulong_t(*)(const void *)  hash,
comparator_t comparePairs,
long  resizeRatio,
long  growthFactor 
)

Here is the call graph for this function:

bool_t TMhashtable_containsKey ( TM_ARGDECL hashtable_t hashtablePtr,
void *  keyPtr 
)
void* TMhashtable_find ( TM_ARGDECL hashtable_t hashtablePtr,
void *  keyPtr 
)
void TMhashtable_free ( TM_ARGDECL hashtable_t hashtablePtr)

Here is the call graph for this function:

long TMhashtable_getSize ( TM_ARGDECL hashtable_t hashtablePtr)
bool_t TMhashtable_insert ( TM_ARGDECL hashtable_t hashtablePtr,
void *  keyPtr,
void *  dataPtr 
)
bool_t TMhashtable_isEmpty ( TM_ARGDECL hashtable_t hashtablePtr)
bool_t TMhashtable_iter_hasNext ( TM_ARGDECL hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)

Here is the call graph for this function:

void* TMhashtable_iter_next ( TM_ARGDECL hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)

Here is the call graph for this function:

void TMhashtable_iter_reset ( TM_ARGDECL hashtable_iter_t itPtr,
hashtable_t hashtablePtr 
)
bool_t TMhashtable_remove ( TM_ARGDECL hashtable_t hashtablePtr,
void *  keyPtr 
)