UCommon
|
A multipath linked list where membership is managed in multiple lists. More...
#include <linked.h>
Public Member Functions | |
void | delist (unsigned path) |
De-list from a single map path. More... | |
void | enlist (unsigned path, MultiMap **root) |
Enlist on a single linked list. More... | |
void | enlist (unsigned path, MultiMap **index, caddr_t key, unsigned size, size_t keysize=0) |
Enlist binary key on a single map path. More... | |
MultiMap * | next (unsigned path) const |
Get next node from single chain. More... | |
![]() | |
ReusableObject * | getNext (void) |
Get next effective reusable object when iterating. More... | |
![]() | |
void | delist (LinkedObject **root) |
Locate and remove ourselves from a list of objects. More... | |
void | enlist (LinkedObject **root) |
Add our object to an existing linked list through a pointer. More... | |
LinkedObject * | getNext (void) const |
Get next effective object when iterating. More... | |
bool | is_member (LinkedObject *list) const |
Search to see if we are a member of a specific list. More... | |
virtual void | retain (void) |
Retain by marking as self referenced list. More... | |
![]() | |
ObjectProtocol * | copy (void) |
Retain (increase retention of) object when copying. | |
void | operator++ (void) |
Increase retention operator. | |
void | operator-- (void) |
Decrease retention operator. | |
virtual | ~ObjectProtocol () |
Required virtual destructor. | |
Static Public Member Functions | |
static MultiMap * | find (unsigned path, MultiMap **index, caddr_t key, unsigned max, size_t size=0) |
Find a multikey node. More... | |
static unsigned | keyindex (caddr_t key, unsigned max, size_t size=0) |
Compute binary key index. More... | |
![]() | |
static unsigned | count (const LinkedObject *root) |
Count the number of linked objects in a list. More... | |
static LinkedObject * | getIndexed (LinkedObject *root, unsigned index) |
Get member by index. More... | |
static void | purge (LinkedObject *root) |
Release all objects from a list. More... | |
Protected Member Functions | |
virtual bool | equal (unsigned path, caddr_t key, size_t size) const |
Modifiable interface for key matching. More... | |
MultiMap (unsigned count) | |
Initialize a multilist object. More... | |
virtual | ~MultiMap () |
Destroy a multilist object. | |
![]() | |
virtual void | release (void) |
Release list, mark as no longer linked. More... | |
![]() | |
LinkedObject (LinkedObject **root) | |
Construct base class attached to a chain of objects. More... | |
LinkedObject () | |
Construct base class unattached to anyone. More... | |
Additional Inherited Members | |
![]() | |
static const LinkedObject * | inv |
Marker for invalid list pointer. | |
static const LinkedObject * | nil |
Marker for end of linked list. More... | |
![]() | |
LinkedObject * | Next |
A multipath linked list where membership is managed in multiple lists.
|
protected |
Initialize a multilist object.
count | of link paths. |
void ucommon::MultiMap::delist | ( | unsigned | path | ) |
De-list from a single map path.
path | to detach from. |
void ucommon::MultiMap::enlist | ( | unsigned | path, |
MultiMap ** | root | ||
) |
Enlist on a single linked list.
path | to attach through. |
root | of list to attach. |
void ucommon::MultiMap::enlist | ( | unsigned | path, |
MultiMap ** | index, | ||
caddr_t | key, | ||
unsigned | size, | ||
size_t | keysize = 0 |
||
) |
Enlist binary key on a single map path.
path | to attach through. |
index | to attach to. |
key | value to use. |
size | of index. |
keysize | of key or 0 if NULL terminated string. |
|
protectedvirtual |
Modifiable interface for key matching.
path | to check. |
key | to check. |
size | of key to check or 0 if NULL terminated string. |
|
static |
Find a multikey node.
path | of table. |
index | of hash table. |
key | to locate. |
max | size of index. |
size | of key or 0 if NULL terminated string. |
|
static |
Compute binary key index.
key | memory to compute. |
max | size of index. |
size | of key or 0 if NULL terminated string. |
MultiMap* ucommon::MultiMap::next | ( | unsigned | path | ) | const |
Get next node from single chain.
path | to follow. |