eg_hash.h File Reference

#include "eg_macros.h"
#include "eg_listint.h"
#include <limits.h>
#include <inttypes.h>

Include dependency graph for eg_hash.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EGhash_t
struct  EGhashList_t
struct  EGhashListNode__

Defines

#define EGhashFunction(key, maxsize, vptr)
#define EGnewHash(A, B)   __EGnewHash(A,B,__FILE__,__LINE__);

Typedefs

typedef EGhashListNode_t EGhashData_t
typedef EGhashListNode__ EGhashListNode_t
typedef uint64_t EGkey_t

Functions

EGhash_t__EGnewHash (size_t maxsize, EGmemPool_t *mempool, const char *file, const int line)
void EGfreeHash (void *hash)
void EGhashClear (EGhash_t *hash, EGfree_f dataFree)
int EGhashDisplay (const EGhash_t *hash, FILE *logFile)
int EGhashErase (EGhash_t *, EGkey_t)
EGhashData_tEGhashFind (const EGhash_t *hash, const EGkey_t key)
int EGhashInsert (EGhash_t *hash, const EGkey_t key, void *data)
void EGhashTest (void)

Variables

EGkey_t EGhashA
EGkey_t EGhashB
EGkey_t EGhashPrime


Define Documentation

#define EGhashFunction key,
maxsize,
vptr   ) 
 

Value:

{*(vptr) = ((unsigned int)( \
  (((EGkey_t)(key)) * EGhashB  + EGhashA )% EGhashPrime)) % (maxsize);}

Definition at line 69 of file eg_hash.h.

#define EGnewHash A,
 )     __EGnewHash(A,B,__FILE__,__LINE__);
 

Definition at line 119 of file eg_hash.h.


Typedef Documentation

typedef EGhashListNode_t EGhashData_t
 

Definition at line 86 of file eg_hash.h.

typedef struct EGhashListNode__ EGhashListNode_t
 

typedef uint64_t EGkey_t
 

Definition at line 56 of file eg_hash.h.


Function Documentation

EGhash_t* __EGnewHash size_t  maxsize,
EGmemPool_t mempool,
const char *  file,
const int  line
 

Definition at line 49 of file eg_hash.c.

void EGfreeHash void *  hash  ) 
 

Definition at line 89 of file eg_hash.c.

void EGhashClear EGhash_t hash,
EGfree_f  dataFree
[inline]
 

Definition at line 189 of file eg_hash.h.

int EGhashDisplay const EGhash_t hash,
FILE *  logFile
 

Definition at line 228 of file eg_hash.c.

int EGhashErase EGhash_t ,
EGkey_t 
 

Definition at line 198 of file eg_hash.c.

EGhashData_t* EGhashFind const EGhash_t hash,
const EGkey_t  key
[inline]
 

Definition at line 148 of file eg_hash.h.

int EGhashInsert EGhash_t hash,
const EGkey_t  key,
void *  data
 

Definition at line 141 of file eg_hash.c.

Here is the call graph for this function:

void EGhashTest void   ) 
 

Definition at line 261 of file eg_hash.c.

Here is the call graph for this function:


Variable Documentation

EGkey_t EGhashA
 

Definition at line 28 of file eg_hash.c.

EGkey_t EGhashB
 

Definition at line 26 of file eg_hash.c.

EGkey_t EGhashPrime
 

Definition at line 24 of file eg_hash.c.


Generated on Mon Jan 30 08:51:12 2006 for EGlib by  doxygen 1.4.5