cucon/rumap.h: Recursive Hash Map with Integer Keys
[Associative Containers (trees, maps, sets)]

Data Structures

struct  cucon_rumap

Defines

#define cuconP_APPLY(macro,...)   macro(__VA_ARGS__)
#define cuconP_RUMAP_MREF_ARR(width, rmap, key_arr, key_cnt)

Functions

void cucon_rumap_init (cucon_rumap_t rmap)
cucon_rumap_t cucon_rumap_new (void)
void cucon_rumap_swap (cucon_rumap_t map0, cucon_rumap_t map1)
void * cucon_rumap_value (cucon_rumap_t rmap)
void cucon_rumap_set_value (cucon_rumap_t rmap, void *ptr)
cu_bool_t cucon_rumap_is_leaf (cucon_rumap_t rmap)
cucon_rumap_t cucon_rumap_mref (cucon_rumap_t rmap, uintptr_t key)
cucon_rumap_t cucon_rumap_cref (cucon_rumap_t rmap, uintptr_t key)
cucon_rumap_t cucon_rumap_mref_by_uint8_arr (cucon_rumap_t rmap, uint8_t const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_uint16_arr (cucon_rumap_t rmap, uint16_t const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_uint32_arr (cucon_rumap_t rmap, uint32_t const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_uchar_arr (cucon_rumap_t rmap, unsigned char const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_schar_arr (cucon_rumap_t rmap, signed char const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_short_arr (cucon_rumap_t rmap, short const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_ushort_arr (cucon_rumap_t rmap, unsigned short const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_int_arr (cucon_rumap_t rmap, int const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_uint_arr (cucon_rumap_t rmap, unsigned int const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_char_arr (cucon_rumap_t rmap, char const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_wchar_arr (cucon_rumap_t rmap, cu_wchar_t const *key_arr, size_t key_cnt)
cucon_rumap_t cucon_rumap_mref_by_wstring (cucon_rumap_t rmap, cu_wstring_t s)
size_t cucon_rumap_assign_left_union (cucon_rumap_t dst, cucon_rumap_t src)
size_t cucon_rumap_assign_right_union (cucon_rumap_t dst, cucon_rumap_t src)
cu_bool_t cucon_rumap_conj (cucon_rumap_t rmap, cu_clop(fn, cu_bool_t, uintptr_t, cucon_rumap_t))

Define Documentation

#define cuconP_RUMAP_MREF_ARR ( width,
rmap,
key_arr,
key_cnt   ) 
Value:
cucon_rumap_mref_by_uint##width##_arr(                  \
            rmap, (uint##width##_t *)key_arr, key_cnt)

Function Documentation

cucon_rumap_t cucon_rumap_cref ( cucon_rumap_t  rmap,
uintptr_t  key 
)

Return the branch of rmap at key or NULL if key is unbound.

void cucon_rumap_init ( cucon_rumap_t  rmap  ) 

Initialise rmap as a leaf with no value.

cu_bool_t cucon_rumap_is_leaf ( cucon_rumap_t  rmap  ) 

True iff rmap has no branches.

cucon_rumap_t cucon_rumap_mref ( cucon_rumap_t  rmap,
uintptr_t  key 
)

Mutably dereference rmap at key, constructing a new leaf if key does not already have a binding.

cucon_rumap_t cucon_rumap_new ( void   ) 

Return a valueless leaf.

void cucon_rumap_set_value ( cucon_rumap_t  rmap,
void *  ptr 
)

Assign ptr as the value of rmap.

void cucon_rumap_swap ( cucon_rumap_t  map0,
cucon_rumap_t  map1 
)

Swap the values and subtrees of map0 and map1.

void* cucon_rumap_value ( cucon_rumap_t  rmap  ) 

The value at rmap.

Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.