For example, there may be man items stored that have the lowest order bit set in their mask. If a fetch is done with 0x1 as the key then all of these items will match.
Since a fetch may return many items, a cursor based method is used.
Copyright 1998-2001 Russell Leighton
#include "util.h"
Go to the source code of this file.
Data Structures | |
| struct | aw_mask_cursor_t |
| struct | aw_mask_entry_struct |
| struct | aw_mask_t |
Defines | |
| #define | AW_MASK_NROWS (sizeof(u_int32_t)*8) |
Typedefs | |
| typedef aw_mask_entry_struct | aw_mask_entry_t |
Functions | |
| int32_t | aw_mask_defrag (aw_mask_t *mt) |
| Realloc all entries into a contiguous block, freeing old ones . | |
| void | aw_mask_delete (u_int32_t mask, aw_mask_t *mt) |
| Delete ALL user_pointers associated with mask in table mt. | |
| void | aw_mask_delete_specific (u_int32_t mask, void *user_pointer, aw_mask_t *mt) |
| Delete user_pointer associated with mask,user_pointer pair in table mt. | |
| void | aw_mask_destroy (aw_mask_t *mt) |
| Free mask table. | |
| void * | aw_mask_fetch (aw_mask_cursor_t *c) |
| Fill cursor with next match. | |
| int32_t | aw_mask_insert (u_int32_t mask, void *user_pointer, aw_mask_t *mt) |
| Associate user_pointer with mask in table mt. | |
| aw_mask_t * | aw_mask_make (void) |
Create mask table.
| |
| void | aw_mask_query (u_int32_t key, aw_mask_cursor_t *c, const aw_mask_t *mt) |
| Fill cursor with results of query. Must call aw_mask_fetch() to get data in cursor. | |
|
|
|
|
|
|
|
|
Realloc all entries into a contiguous block, freeing old ones . aw_mask_defrag
|
|
||||||||||||
|
Delete ALL user_pointers associated with mask in table mt.
|
|
||||||||||||||||
|
Delete user_pointer associated with mask,user_pointer pair in table mt.
|
|
|
Free mask table.
|
|
|
Fill cursor with next match.
|
|
||||||||||||||||
|
Associate user_pointer with mask in table mt.
|
|
|
Create mask table.
|
|
||||||||||||||||
|
Fill cursor with results of query. Must call aw_mask_fetch() to get data in cursor.
|