UCommon
Public Member Functions | Static Public Member Functions | Protected Attributes
ucommon::multimap< T, P > Class Template Reference

Embed data objects into a multipap structured memory database. More...

#include <linked.h>

Inheritance diagram for ucommon::multimap< T, P >:
Inheritance graph
[legend]
Collaboration diagram for ucommon::multimap< T, P >:
Collaboration graph
[legend]

Public Member Functions

T & get (void) const
 Return the typed value of this node. More...
 
 multimap ()
 Construct a multimap node.
 
multimapnext (unsigned path)
 Return next multimap typed object. More...
 
T & operator* () const
 Return typed value of this node by pointer reference. More...
 
void operator= (const T &data)
 Assign the value of our node. More...
 
void set (const T &reference)
 Set the value of a data based value tree. More...
 
void setPointer (const T pointer)
 Set the pointer of a pointer based value tree. More...
 
 ~multimap ()
 Destroy a multimap object.
 
- Public Member Functions inherited from ucommon::MultiMap
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...
 
MultiMapnext (unsigned path) const
 Get next node from single chain. More...
 
- Public Member Functions inherited from ucommon::ReusableObject
ReusableObjectgetNext (void)
 Get next effective reusable object when iterating. More...
 
- Public Member Functions inherited from ucommon::LinkedObject
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...
 
LinkedObjectgetNext (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...
 
- Public Member Functions inherited from ucommon::ObjectProtocol
ObjectProtocolcopy (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 multimapfind (unsigned path, MultiMap **index, caddr_t key, unsigned size, unsigned keysize=0)
 Find multimap key entry. More...
 
- Static Public Member Functions inherited from ucommon::MultiMap
static MultiMapfind (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 Public Member Functions inherited from ucommon::LinkedObject
static unsigned count (const LinkedObject *root)
 Count the number of linked objects in a list. More...
 
static LinkedObjectgetIndexed (LinkedObject *root, unsigned index)
 Get member by index. More...
 
static void purge (LinkedObject *root)
 Release all objects from a list. More...
 

Protected Attributes

value
 
- Protected Attributes inherited from ucommon::LinkedObject
LinkedObjectNext
 

Additional Inherited Members

- Static Public Attributes inherited from ucommon::LinkedObject
static const LinkedObjectinv
 Marker for invalid list pointer.
 
static const LinkedObjectnil
 Marker for end of linked list. More...
 
- Protected Member Functions inherited from ucommon::MultiMap
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.
 
- Protected Member Functions inherited from ucommon::ReusableObject
virtual void release (void)
 Release list, mark as no longer linked. More...
 
- Protected Member Functions inherited from ucommon::LinkedObject
 LinkedObject (LinkedObject **root)
 Construct base class attached to a chain of objects. More...
 
 LinkedObject ()
 Construct base class unattached to anyone. More...
 

Detailed Description

template<typename T, unsigned P>
class ucommon::multimap< T, P >

Embed data objects into a multipap structured memory database.

This can be used to form multi-key hash nodes. Embedded values can either be of direct types that are then stored as part of the template object, or of class types that are data pointers.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 1467 of file linked.h.

Member Function Documentation

template<typename T , unsigned P>
static multimap* ucommon::multimap< T, P >::find ( unsigned  path,
MultiMap **  index,
caddr_t  key,
unsigned  size,
unsigned  keysize = 0 
)
inlinestatic

Find multimap key entry.

Parameters
pathto search through.
indexof associated keys.
keyto search for, binary or NULL terminated string.
sizeof index used.
keysizeor 0 if NULL terminated string.
Returns
multipath typed object.

Definition at line 1535 of file linked.h.

Here is the call graph for this function:

template<typename T , unsigned P>
T& ucommon::multimap< T, P >::get ( void  ) const
inline

Return the typed value of this node.

Returns
reference to value of node.

Definition at line 1487 of file linked.h.

template<typename T , unsigned P>
multimap* ucommon::multimap< T, P >::next ( unsigned  path)
inline

Return next multimap typed object.

Parameters
pathto follow.
Returns
multimap typed.

Definition at line 1495 of file linked.h.

Here is the call graph for this function:

template<typename T , unsigned P>
T& ucommon::multimap< T, P >::operator* ( ) const
inline

Return typed value of this node by pointer reference.

Returns
value of node.

Definition at line 1502 of file linked.h.

template<typename T , unsigned P>
void ucommon::multimap< T, P >::operator= ( const T &  data)
inline

Assign the value of our node.

Parameters
datavalue to assign.

Definition at line 1523 of file linked.h.

template<typename T , unsigned P>
void ucommon::multimap< T, P >::set ( const T &  reference)
inline

Set the value of a data based value tree.

Parameters
referenceto value to copy into node.

Definition at line 1516 of file linked.h.

template<typename T , unsigned P>
void ucommon::multimap< T, P >::setPointer ( const T  pointer)
inline

Set the pointer of a pointer based value tree.

Parameters
pointerto set.

Definition at line 1509 of file linked.h.


The documentation for this class was generated from the following file: