ucommon
Public Member Functions
ucommon::objqueue< T > Class Template Reference

Template for typesafe basic object queue container. More...

#include <linked.h>

Inheritance diagram for ucommon::objqueue< T >:
Inheritance graph
[legend]
Collaboration diagram for ucommon::objqueue< T >:
Collaboration graph
[legend]

Public Member Functions

void add (T *object)
 Add an object to the end of the object queue. More...
 
 objqueue ()
 Create a new object stack.
 
T * pop (void)
 Pop an object from the end of the object queue. More...
 
T * pull (void)
 Pull an object from the start of the object queue. More...
 
void push (T *object)
 Push an object to start of queue. More...
 
- Public Member Functions inherited from ucommon::ObjectQueue
void add (DLinkedObject *object)
 Add an object to the end of the queue. More...
 
 ObjectQueue ()
 Create an empty object queue.
 
DLinkedObjectpop (void)
 Pop an object from the end of the queue. More...
 
DLinkedObjectpull (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...
 
LinkedObjectbegin (void) const
 Return first object in list for iterators. More...
 
unsigned count (void) const
 Count of objects this list manages. More...
 
LinkedObjectend (void) const
 Return last object in list for iterators. More...
 
LinkedObjectfind (unsigned offset) const
 Find a specific member in the ordered list. More...
 
LinkedObjectget (void)
 Get (pull) object off the list. More...
 
LinkedObjectgetIndexed (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...
 
LinkedObjectoperator* () const
 Return head object pointer. More...
 
void operator*= (OrderedObject *object)
 Add object to our list. More...
 
OrderedIndexoperator= (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
OrderedObjecthead
 
OrderedObjecttail
 

Detailed Description

template<class T>
class ucommon::objqueue< T >

Template for typesafe basic object queue container.

The object type, T, that is contained in the fifo must be derived from DLinkedObject.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Examples:
linked.cpp.

Definition at line 1248 of file linked.h.

Member Function Documentation

template<class T >
void ucommon::objqueue< T >::add ( T *  object)
inline

Add an object to the end of the object queue.

Parameters
objectof specified type to add.
Examples:
linked.cpp.

Definition at line 1267 of file linked.h.

Here is the call graph for this function:

template<class T >
T* ucommon::objqueue< T >::pop ( void  )
inline

Pop an object from the end of the object queue.

Returns
object of specified type or NULL if empty.

Definition at line 1281 of file linked.h.

Here is the call graph for this function:

template<class T >
T* ucommon::objqueue< T >::pull ( void  )
inline

Pull an object from the start of the object queue.

Returns
object of specified type or NULL if empty.

Definition at line 1274 of file linked.h.

Here is the call graph for this function:

template<class T >
void ucommon::objqueue< T >::push ( T *  object)
inline

Push an object to start of queue.

Parameters
objectof specified type to push.

Definition at line 1260 of file linked.h.

Here is the call graph for this function:


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