maxscript/foundation/hashtable.h File Reference

hashtable.h File Reference

#include "../kernel/value.h"

Classes

struct  binding
 
struct  secondary
 
class  HashTabMapper
 

Macros

#define KEY_IS_OBJECT   0x0001 /* init flags that indicate whether keys & values are full MXS collectable objects */
 
#define VALUE_IS_OBJECT   0x0002
 
#define is_hashtable(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(HashTable))
 
#define SECONDARY_BUCKET   5
 

Functions

ScripterExport int default_eq_fn (const void *key1, const void *key2)
 
ScripterExport DWORD_PTR default_hash_fn (const void *key)
 
ScripterExport HashTable (UINT primary_size, eq_fn_type key_eq_fn, hash_fn_type key_hash_fn, int flags)
 
 HashTable ()
 
 HashTable (UINT primary_size)
 
ScripterExport ~HashTable ()
 
ScripterExport void init (UINT primary_size, eq_fn_type key_eq_fn, hash_fn_type key_hash_fn, int flags)
 
static void setup ()
 
 classof_methods (HashTable, Value)
 
ScripterExport void collect ()
 
ScripterExport void gc_trace ()
 
ScripterExport Valueget (const void *key)
 
ScripterExport Valueput (const void *key, const void *val)
 
ScripterExport Valueput_new (const void *key, const void *val)
 
ScripterExport Valuefind_key (const void *val)
 
ScripterExport Valueset (const void *key, const void *val)
 
ScripterExport void remove (const void *key)
 
ScripterExport void map_keys_and_vals (void(*fn)(const void *key, const void *val, void *arg), void *arg)
 
ScripterExport void map_keys_and_vals (HashTabMapper *mapper)
 
ScripterExport int num_entries ()
 
HashTableenter_scope ()
 
HashTableleave_scope ()
 
HashTablenext_scope ()
 
int scope_level ()
 

Variables

visible_class_debug_ok(HashTable)
class HashTable typedef int(* 
eq_fn_type )(const void *, const void *)
 
secondary ** table
 
UINT size
 
int n_entries
 
eq_fn_type eq_fn
 
hash_fn_type hash_fn
 
int cursor
 
int secondCursor
 
short flags
 
HashTableinner
 
HashTableouter
 
int level
 
static ScripterExport
CRITICAL_SECTION 
hash_update
 

Macro Definition Documentation

#define KEY_IS_OBJECT   0x0001 /* init flags that indicate whether keys & values are full MXS collectable objects */
#define VALUE_IS_OBJECT   0x0002
#define is_hashtable (   v)    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(HashTable))
#define SECONDARY_BUCKET   5

Function Documentation

ScripterExport int default_eq_fn ( const void key1,
const void key2 
)
ScripterExport DWORD_PTR default_hash_fn ( const void key)
ScripterExport HashTable ( UINT  primary_size,
eq_fn_type  key_eq_fn,
hash_fn_type  key_hash_fn,
int  flags 
)
HashTable ( )
ScripterExport DWORD_PTR default_hash_fn(const void *key)
#define KEY_IS_OBJECT
Definition: hashtable.h:24
ScripterExport void init(UINT primary_size, eq_fn_type key_eq_fn, hash_fn_type key_hash_fn, int flags)
ScripterExport int default_eq_fn(const void *key1, const void *key2)
#define VALUE_IS_OBJECT
Definition: hashtable.h:25
HashTable ( UINT  primary_size)
ScripterExport DWORD_PTR default_hash_fn(const void *key)
#define KEY_IS_OBJECT
Definition: hashtable.h:24
ScripterExport void init(UINT primary_size, eq_fn_type key_eq_fn, hash_fn_type key_hash_fn, int flags)
ScripterExport int default_eq_fn(const void *key1, const void *key2)
#define VALUE_IS_OBJECT
Definition: hashtable.h:25
ScripterExport void init ( UINT  primary_size,
eq_fn_type  key_eq_fn,
hash_fn_type  key_hash_fn,
int  flags 
)
static void setup ( )
static
classof_methods ( HashTable  ,
Value   
)
ScripterExport void collect ( )
ScripterExport void gc_trace ( )
ScripterExport Value* get ( const void key)
ScripterExport Value* put ( const void key,
const void val 
)
ScripterExport Value* put_new ( const void key,
const void val 
)
ScripterExport Value* find_key ( const void val)
ScripterExport Value* set ( const void key,
const void val 
)
ScripterExport void remove ( const void key)
ScripterExport void map_keys_and_vals ( void(*)(const void *key, const void *val, void *arg)  fn,
void arg 
)
ScripterExport void map_keys_and_vals ( HashTabMapper mapper)
ScripterExport int num_entries ( )
89 { return n_entries; }
int n_entries
Definition: hashtable.h:55
HashTable* enter_scope ( )
HashTable* leave_scope ( )
HashTable* next_scope ( )
int scope_level ( )
95 { return level; }
int level
Definition: hashtable.h:63

Variable Documentation

visible_class_debug_ok (HashTable) class HashTable typedef int(* eq_fn_type)(const void *, const void *)
secondary** table
UINT size
int n_entries
eq_fn_type eq_fn
hash_fn_type hash_fn
int cursor
int secondCursor
short flags
HashTable* inner
HashTable* outer
int level
ScripterExport CRITICAL_SECTION hash_update
static