A templated typed class for thread-safe stack of object pointers. More...
#include <thread.h>


Public Member Functions | |
| T * | pull (timeout_t timeout=0) |
| Get and remove last typed object posted to the stack. | |
| bool | push (T *object, timeout_t timeout=0) |
| Push a typed object into the stack by it's pointer. | |
| bool | remove (T *object) |
| Remove a specific typed object pointer for the stack. | |
| stackof (mempager *memory, size_t size=0) | |
| Create templated stack of typed objects. | |
A templated typed class for thread-safe stack of object pointers.
This allows one to use the stack class in a typesafe manner for a specific object type derived from Object rather than generically for any derived object class.
Definition at line 2190 of file thread.h.
| ucc::stackof< T >::stackof | ( | mempager * | memory, | |
| size_t | size = 0 | |||
| ) | [inline] |
| T* ucc::stackof< T >::pull | ( | timeout_t | timeout = 0 |
) | [inline] |
Get and remove last typed object posted to the stack.
This can wait for a specified timeout of the stack is empty. The object is still retained and must be released or deleted by the receiving function.
| timeout | to wait if empty in milliseconds. |
Reimplemented from ucc::stack.
Definition at line 2228 of file thread.h.

| bool ucc::stackof< T >::push | ( | T * | object, | |
| timeout_t | timeout = 0 | |||
| ) | [inline] |
Push a typed object into the stack by it's pointer.
This can wait for a specified timeout if the queue is full, for example, for another thread to remove an object pointer. This retains the object.
| object | to push. | |
| timeout | to wait if queue is full in milliseconds. |
Definition at line 2218 of file thread.h.

| bool ucc::stackof< T >::remove | ( | T * | object | ) | [inline] |
Remove a specific typed object pointer for the stack.
This can remove a member from any location in the stack, whether beginning, end, or somewhere in the middle. This releases the object.
| object | to remove. |
Definition at line 2207 of file thread.h.

1.6.3