Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hash_table.h File Reference
#include <stddef.h>
Include dependency graph for hash_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __OSL_HASH_TABLE_C
 

Typedefs

typedef void * CkHashtable_c
 

Functions

CkHashtable_c CkCreateHashtable_int (int objBytes, int initSize)
 
CkHashtable_c CkCreateHashtable_string (int objBytes, int initSize)
 
void CkDeleteHashtable (CkHashtable_c h)
 
void * CkHashtablePut (CkHashtable_c h, const void *atKey)
 
void * CkHashtableGet (CkHashtable_c h, const void *fromKey)
 
void CkHashtableRemove (CkHashtable_c h, const void *doomedKey)
 

Macro Definition Documentation

#define __OSL_HASH_TABLE_C

Definition at line 76 of file hash_table.h.

Typedef Documentation

typedef void* CkHashtable_c

Definition at line 81 of file hash_table.h.

Function Documentation

CkHashtable_c CkCreateHashtable_int ( int  objBytes,
int  initSize 
)

Definition at line 421 of file hash_table.cpp.

422 {
423  int objStart=2*sizeof(int);
424  CkHashtableLayout layout(sizeof(int),sizeof(int),
425  objStart,objBytes,objStart+objBytes);
426  return (CkHashtable_c)new CkHashtable(layout,initSize,0.5,
427  CkHashFunction_int,CkHashCompare_int);
428 }
void * CkHashtable_c
Definition: hash_table.h:81
CkHashtable_c CkCreateHashtable_string ( int  objBytes,
int  initSize 
)

Definition at line 430 of file hash_table.cpp.

References CkHashCompare_string(), and CkHashFunction_string().

431 {
432  int objStart=2*sizeof(char *);
433  CkHashtableLayout layout(sizeof(char *),sizeof(char *),
434  objStart,objBytes,objStart+objBytes);
435  return (CkHashtable_c)new CkHashtable(layout,initSize,0.5,
437 }
void * CkHashtable_c
Definition: hash_table.h:81
int CkHashCompare_string(const void *key1, const void *key2, size_t keyLen)
Definition: hash_table.cpp:112
CkHashCode CkHashFunction_string(const void *keyData, size_t keyLen)
Definition: hash_table.cpp:88

Here is the call graph for this function:

void CkDeleteHashtable ( CkHashtable_c  h)

Definition at line 438 of file hash_table.cpp.

439 {
440  delete (CkHashtable *)h;
441 }
void* CkHashtableGet ( CkHashtable_c  h,
const void *  fromKey 
)

Definition at line 449 of file hash_table.cpp.

450 {
451  return ((CkHashtable *)h)->get(fromKey);
452 }
void* CkHashtablePut ( CkHashtable_c  h,
const void *  atKey 
)

Definition at line 443 of file hash_table.cpp.

444 {
445  return ((CkHashtable *)h)->put(atKey);
446 }
void CkHashtableRemove ( CkHashtable_c  h,
const void *  doomedKey 
)

Definition at line 454 of file hash_table.cpp.

455 {
456  ((CkHashtable *)h)->remove(doomedKey);
457 }