coan 4.2.4
|
![]() |
Data Structures | |
struct | ptr_set |
Files | |
file | ptr_set.c |
Defines | |
#define | SOMEWHERE(loc) ((loc) >= 0) |
#define | NOWHERE(loc) ((loc) < 0) |
#define | POINTER(loc) (NOWHERE(loc) ? ~(loc) : (loc)) |
Functions | |
static int | default_comparator (void const *obj, void const *key, locator_t ignore) |
static void | ptr_set_init (ptr_set_h ps, comparator_t compare, dtor_t dtor, cloner_t cloner) |
static void | ptr_set_copy_init (ptr_set_h dest, ptr_set_const_h src) |
The Pointer-Set component internals.
#define NOWHERE | ( | loc | ) | ((loc) < 0) |
Predicate denoting a non-existent location
Definition at line 57 of file ptr_set.c.
Referenced by ptr_set_insert(), and ptr_set_search().
#define POINTER | ( | loc | ) | (NOWHERE(loc) ? ~(loc) : (loc)) |
#define SOMEWHERE | ( | loc | ) | ((loc) >= 0) |
Predicate denoting that a location exists
Definition at line 54 of file ptr_set.c.
Referenced by ptr_set_insert().
static int default_comparator | ( | void const * | obj, |
void const * | key, | ||
locator_t | ignore | ||
) | [static] |
Default comparator function for ordering pointer sets.
obj | Address to an object to be compared with a key. |
key | Address of the key to compare with obj. |
ignore | Unused parameter required by comparator_t prototype. |
Definition at line 83 of file ptr_set.c.
Referenced by ptr_set_init().
static void ptr_set_copy_init | ( | ptr_set_h | dest, |
ptr_set_const_h | src | ||
) | [static] |
Initialise a pointer set from another
dest | The pointer set to initialise. Is assumed to control only unitialised storage. |
src | The pointer set to be copied. |
dest is initialised as a copy of src
Definition at line 116 of file ptr_set.c.
References ptr_set::cached_pos, ptr_set::compare, ptr_vector_copy(), and ptr_set::pv.
Referenced by ptr_set_copy().
static void ptr_set_init | ( | ptr_set_h | ps, |
comparator_t | compare, | ||
dtor_t | dtor, | ||
cloner_t | cloner | ||
) | [static] |
Initialise a pointer set.
ps | The pointer set to initialise. Is assumed to control only unitialised storage. |
compare | The comparator to be used for ordering this pointer set. |
dtor | The destructor to be applied to members of this pointer set. |
cloner | The function for cloning elements of this pointer set. |
Definition at line 98 of file ptr_set.c.
References ptr_set::cached_pos, ptr_set::compare, default_comparator(), ptr_vector_new(), and ptr_set::pv.
Referenced by ptr_set_new().