Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

hash.h File Reference

Go to the source code of this file.

Compounds

struct  hash_t

Defines

#define HASH_FAIL   -1
#define VMDEXTERNSTATIC

Typedefs

typedef hash_t hash_t

Functions

void hash_init (hash_t *, int)
int hash_lookup (const hash_t *, const char *)
int hash_insert (hash_t *, const char *, int)
int hash_delete (hash_t *, const char *)
int hash_entries (hash_t *)
void hash_destroy (hash_t *)
char * hash_stats (hash_t *)


Define Documentation

#define HASH_FAIL   -1
 

Definition at line 33 of file hash.h.

#define VMDEXTERNSTATIC
 

Definition at line 40 of file hash.h.


Typedef Documentation

typedef struct hash_t hash_t
 

hash table top level data structure


Function Documentation

int hash_delete hash_t  ,
const char *   
 

delete a string from the hash table, given its string name

Definition at line 183 of file hash.c.

Referenced by NameList< Material * >::set_name.

void hash_destroy hash_t  
 

destroy the hash table completely, deallocate memory

Definition at line 234 of file hash.c.

Referenced by NameList< Material * >::clear, ParseTree::find_recursion, same_double, same_string, and NameList< Material * >::~NameList.

int hash_entries hash_t  
 

return the number of entries in the hash table

Definition at line 223 of file hash.c.

void hash_init hash_t  ,
int   
 

initialize hash table for first use

Definition at line 63 of file hash.c.

Referenced by NameList< Material * >::clear, ParseTree::find_recursion, NameList< Material * >::NameList, rebuild_table, same_double, and same_string.

int hash_insert hash_t  ,
const char *   ,
int   
 

insert a string into the hash table, along with an integer key

Definition at line 151 of file hash.c.

Referenced by NameList< Material * >::add_name, ParseTree::find_recursion, same_double, same_string, and NameList< Material * >::set_name.

int hash_lookup const hash_t  ,
const char *   
 

lookup a string key in the hash table returning its integer key

Definition at line 127 of file hash.c.

Referenced by NameList< Material * >::add_name, NameList< Material * >::data, hash_insert, same_double, same_string, and NameList< Material * >::typecode.

char* hash_stats hash_t  
 

print hash table vital stats

Definition at line 280 of file hash.c.


Generated on Mon May 6 04:27:30 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002