UCommon
Public Member Functions
ucommon::ObjectQueue Class Reference

A queue of double linked object. More...

#include <linked.h>

Inheritance diagram for ucommon::ObjectQueue:
Inheritance graph
[legend]
Collaboration diagram for ucommon::ObjectQueue:
Collaboration graph
[legend]

Public Member Functions

void add (DLinkedObject *object)
 Add an object to the end of the queue. More...
 
 ObjectQueue ()
 Create an empty object queue.
 
DLinkedObject * pop (void)
 Pop an object from the end of the queue. More...
 
DLinkedObject * pull (void)
 Pull an object from the front of the queue. More...
 
void push (DLinkedObject *object)
 Push an object to the front of the queue. More...
 
- Public Member Functions inherited from ucommon::OrderedIndex
void add (OrderedObject *ordered)
 Add an object into the ordered index. More...
 
LinkedObject * begin (void) const
 Return first object in list for iterators. More...
 
unsigned count (void) const
 Count of objects this list manages. More...
 
LinkedObject * end (void) const
 Return last object in list for iterators. More...
 
LinkedObject * find (unsigned offset) const
 Find a specific member in the ordered list. More...
 
LinkedObject * get (void)
 Get (pull) object off the list. More...
 
LinkedObject * getIndexed (unsigned index) const
 Get an indexed member from the ordered index. More...
 
LinkedObject ** index (void) const
 Return a pointer to the head of the list. More...
 
virtual void lock_index (void)
 Used to synchronize lists managed by multiple threads. More...
 
LinkedObject * operator* () const
 Return head object pointer. More...
 
void operator*= (OrderedObject *object)
 Add object to our list. More...
 
OrderedIndex & operator= (const OrderedIndex &object)
 Assign ordered index. More...
 
 OrderedIndex ()
 Create and initialize an empty index.
 
 OrderedIndex (const OrderedIndex &source)
 
void purge (void)
 Purge the linked list and then set the index to empty.
 
void reset (void)
 Reset linked list to empty without purging.
 
virtual void unlock_index (void)
 Used to synchronize lists managed by multiple threads. More...
 
virtual ~OrderedIndex ()
 Destroy index.
 

Additional Inherited Members

- Protected Member Functions inherited from ucommon::OrderedIndex
void copy (const OrderedIndex &source)
 
- Protected Attributes inherited from ucommon::OrderedIndex
OrderedObject * head
 
OrderedObject * tail
 

Detailed Description

A queue of double linked object.

This uses the linkedlist class to form a basic queue of objects.

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

Definition at line 894 of file linked.h.

Member Function Documentation

void ucommon::ObjectQueue::add ( DLinkedObject *  object)

Add an object to the end of the queue.

Parameters
objectto add.
DLinkedObject* ucommon::ObjectQueue::pop ( void  )

Pop an object from the end of the queue.

Returns
object popped or NULL if empty.
DLinkedObject* ucommon::ObjectQueue::pull ( void  )

Pull an object from the front of the queue.

Returns
object pulled or NULL if empty.
void ucommon::ObjectQueue::push ( DLinkedObject *  object)

Push an object to the front of the queue.

Parameters
objectto push.

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