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.
|
void | enlist (unsigned path, MultiMap **root) |
| Enlist on a single linked list.
|
void | enlist (unsigned path, MultiMap **index, caddr_t key, unsigned size, size_t keysize=0) |
| Enlist binary key on a single map path.
|
MultiMap * | next (unsigned path) |
| Get next node from single chain.
|
ReusableObject * | getNext (void) |
| Get next effective reusable object when iterating.
|
void | delist (LinkedObject **root) |
| Locate and remove ourselves from a list of objects.
|
void | enlist (LinkedObject **root) |
| Add our object to an existing linked list through a pointer.
|
bool | isMember (LinkedObject *list) |
| Search to see if we are a member of a specific list.
|
virtual void | retain (void) |
| Retain by marking as self referenced list.
|
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.
|
static unsigned | keyindex (caddr_t key, unsigned max, size_t size=0) |
| Compute binary key index.
|
Protected Member Functions |
virtual bool | equal (unsigned path, caddr_t key, size_t size) |
| Modifiable interface for key matching.
|
| MultiMap (unsigned count) |
| Initialize a multilist object.
|
virtual | ~MultiMap () |
| Destroy a multilist object.
|
virtual void | release (void) |
| Release list, mark as no longer linked.
|
| LinkedObject (LinkedObject **root) |
| Construct base class attached to a chain of objects.
|
| LinkedObject () |
| Construct base class unattached to anyone.
|
Detailed Description
A multipath linked list where membership is managed in multiple lists.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 958 of file linked.h.
Constructor & Destructor Documentation
ucommon::MultiMap::MultiMap |
( |
unsigned |
count | ) |
|
|
protected |
Initialize a multilist object.
- Parameters
-
Member Function Documentation
void ucommon::MultiMap::delist |
( |
unsigned |
path | ) |
|
De-list from a single map path.
- Parameters
-
void ucommon::MultiMap::enlist |
( |
unsigned |
path, |
|
|
MultiMap ** |
root |
|
) |
| |
Enlist on a single linked list.
- Parameters
-
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.
- Parameters
-
path | to attach through. |
index | to attach to. |
key | value to use. |
size | of index. |
keysize | of key or 0 if NULL terminated string. |
virtual bool ucommon::MultiMap::equal |
( |
unsigned |
path, |
|
|
caddr_t |
key, |
|
|
size_t |
size |
|
) |
| |
|
protectedvirtual |
Modifiable interface for key matching.
- Parameters
-
path | to check. |
key | to check. |
size | of key to check or 0 if NULL terminated string. |
- Returns
- true if matches key.
static MultiMap* ucommon::MultiMap::find |
( |
unsigned |
path, |
|
|
MultiMap ** |
index, |
|
|
caddr_t |
key, |
|
|
unsigned |
max, |
|
|
size_t |
size = 0 |
|
) |
| |
|
static |
Find a multikey node.
- Returns
- node that is found or NULL if none.
- Parameters
-
path | of table. |
index | of hash table. |
key | to locate. |
max | size of index. |
size | of key or 0 if NULL terminated string. |
static unsigned ucommon::MultiMap::keyindex |
( |
caddr_t |
key, |
|
|
unsigned |
max, |
|
|
size_t |
size = 0 |
|
) |
| |
|
static |
Compute binary key index.
- Parameters
-
key | memory to compute. |
max | size of index. |
size | of key or 0 if NULL terminated string. |
- Returns
- associated hash value.
MultiMap* ucommon::MultiMap::next |
( |
unsigned |
path | ) |
|
The documentation for this class was generated from the following file: