ucommon

ucommon/linked.h File Reference

Linked objects, lists, templates, and containers. More...

#include <ucommon/platform.h>
#include <ucommon/object.h>
Include dependency graph for linked.h:

Go to the source code of this file.

Data Structures

class  DLinkedObject
 A double-linked Object, used for certain kinds of lists. More...
class  keylist< T >
 A template for ordered index of typed name key mapped objects. More...
class  keymap< T, M >
 A template class for a hash map. More...
class  linked_pointer< T >
 A smart pointer template for iterating linked lists. More...
class  linked_value< T, O >
 Template value class to embed data structure into a linked list. More...
class  LinkedList
 A double linked list object. More...
class  LinkedObject
 Common base class for all objects that can be formed into a linked list. More...
class  multimap< T, P >
 Embed data objects into a multipap structured memory database. More...
class  MultiMap
 A multipath linked list where membership is managed in multiple lists. More...
class  named_value< T, O >
 Template value class to embed data structure into a named list. More...
class  NamedObject
 A linked object base class with members found by name. More...
class  NamedTree
 The named tree class is used to form a tree oriented list of associated objects. More...
class  ObjectQueue
 A queue of double linked object. More...
class  objfifo< T >
 Template for typesafe basic object fifo container. More...
class  objqueue< T >
 Template for typesafe basic object queue container. More...
class  objstack< T >
 Template for typesafe basic object stack container. More...
class  OrderedIndex
 An index container for maintaining an ordered list of objects. More...
class  OrderedObject
 A linked object base class for ordered objects. More...
class  ReusableObject
 Reusable objects for forming private heaps. More...
class  treemap< T >
 Embed data objects into a tree structured memory database. More...

Typedefs

typedef LinkedObjectLinkedIndex
 Convenience typedef for root pointers of single linked lists.
typedef OrderedIndex objfifo_t
 Convenience type for a fifo of linked objects.
typedef ObjectQueue objqueue_t
 Convenience type for a queue of linked objects.
typedef ObjectStack objstack_t
 Convenience type for a stack of linked objects.

Functions

void add (ObjectStack &stack, LinkedObject *object)
 Add a linked object onto a stack of linked objects.
void add (ObjectQueue &queue, DLinkedObject *object)
 Add a linked object to end of queue of objects.
void add (OrderedIndex &fifo, LinkedObject *object)
 Add a linked object onto a fifo of linked objects.
DLinkedObjectpop (ObjectQueue &queue)
 Pop a linked object from end of queue.
LinkedObjectpop (ObjectStack &stack)
 Pop a linked object from a stack of linked objects.
LinkedObjectpop (OrderedIndex &fifo)
 Pop a linked object from a fifo of linked objects.
LinkedObjectpull (OrderedIndex &fifo)
 Pop a linked object from a fifo of linked objects.
DLinkedObjectpull (ObjectQueue &queue)
 Pull a linked object from start of a queue.
LinkedObjectpull (ObjectStack &stack)
 Pop a linked object from a stack of linked objects.
void push (OrderedIndex &fifo, LinkedObject *object)
 Push a linked object onto a fifo of linked objects.
void push (ObjectQueue &queue, DLinkedObject *object)
 Push a linked object to start of queue.
void push (ObjectStack &stack, LinkedObject *object)
 Push a linked object onto a stack of linked objects.

Detailed Description

Linked objects, lists, templates, and containers.

Common support for objects that might be organized as single and double linked lists, rings and queues, and tree oriented data structures. These generic classes may be used to help form anything from callback registration systems and indexed memory hashes to xml parsed tree nodes.

Definition in file linked.h.


Function Documentation

void add ( ObjectStack &  stack,
LinkedObject object 
) [inline]

Add a linked object onto a stack of linked objects.

Parameters:
stackto push object onto.
objectto push onto stack.

Definition at line 1927 of file linked.h.

void add ( ObjectQueue queue,
DLinkedObject object 
) [inline]

Add a linked object to end of queue of objects.

Parameters:
queueto add object onto.
objectto add onto queue.

Definition at line 1991 of file linked.h.

Here is the call graph for this function:

void add ( OrderedIndex fifo,
LinkedObject object 
) [inline]

Add a linked object onto a fifo of linked objects.

Parameters:
fifoto push object onto.
objectto push onto fifo.

Definition at line 1959 of file linked.h.

Here is the call graph for this function:

DLinkedObject* pop ( ObjectQueue queue) [inline]

Pop a linked object from end of queue.

Parameters:
queueto pop object from.
Returns:
object popped from queue or NULL if none.

Definition at line 1999 of file linked.h.

Here is the call graph for this function:

LinkedObject* pop ( ObjectStack &  stack) [inline]

Pop a linked object from a stack of linked objects.

Parameters:
stackto pull object from.
Returns:
object pulled from stack or NULL if none.
Examples:
linked.cpp.

Definition at line 1935 of file linked.h.

LinkedObject* pop ( OrderedIndex fifo) [inline]

Pop a linked object from a fifo of linked objects.

Parameters:
fifoto pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1967 of file linked.h.

Here is the call graph for this function:

LinkedObject* pull ( OrderedIndex fifo) [inline]

Pop a linked object from a fifo of linked objects.

Parameters:
fifoto pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1975 of file linked.h.

Here is the call graph for this function:

DLinkedObject* pull ( ObjectQueue queue) [inline]

Pull a linked object from start of a queue.

Parameters:
queueto pull object from.
Returns:
object pulled from queue or NULL if none.

Definition at line 2007 of file linked.h.

Here is the call graph for this function:

LinkedObject* pull ( ObjectStack &  stack) [inline]

Pop a linked object from a stack of linked objects.

Parameters:
stackto pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1943 of file linked.h.

void push ( OrderedIndex fifo,
LinkedObject object 
) [inline]

Push a linked object onto a fifo of linked objects.

Parameters:
fifoto push object onto.
objectto push onto fifo.

Definition at line 1951 of file linked.h.

Here is the call graph for this function:

void push ( ObjectQueue queue,
DLinkedObject object 
) [inline]

Push a linked object to start of queue.

Parameters:
queueto push object into.
objectto push onto fifo.

Definition at line 1983 of file linked.h.

Here is the call graph for this function:

void push ( ObjectStack &  stack,
LinkedObject object 
) [inline]

Push a linked object onto a stack of linked objects.

Parameters:
stackto push object onto.
objectto push onto stack.

Definition at line 1919 of file linked.h.