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


Public Member Functions | |
| T * | operator[] (unsigned offset) |
| Examine past item in the stack. | |
| T * | peek (unsigned offset=0) |
| Examine past item in the stack. | |
| 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. | |
Public Member Functions inherited from ucommon::stack | |
| size_t | getCount (void) |
| Get number of object points currently in the stack. | |
| bool | push (ObjectProtocol *object, timeout_t timeout=0) |
| Push an object into the stack by it's pointer. | |
| bool | remove (ObjectProtocol *object) |
| Remove a specific object pointer for the queue. | |
| stack (mempager *pager=((void *) 0), size_t number=0) | |
| Create a stack that uses a memory pager for internally managed member objects for a specified maximum number of object pointers. | |
| ~stack () | |
| Destroy queue. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ucommon::stack | |
| static size_t | count (stack &stack) |
| Convenience function to get count of objects in the stack. | |
| static ObjectProtocol * | pull (stack &stack, timeout_t timeout=0) |
| Convenience function pull last object from the stack. | |
| static bool | push (stack &stack, ObjectProtocol *object, timeout_t timeout=0) |
| Convenience function to push object into the stack. | |
| static bool | remove (stack &stack, ObjectProtocol *object) |
| Convenience function to remove an object from the stacl. | |
Protected Attributes inherited from ucommon::stack | |
| size_t | limit |
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 600 of file containers.h.
|
inline |
Create templated stack of typed objects.
| memory | pool for internal use of stack. |
| size | of stack to construct. Uses 0 if no size limit. |
Definition at line 608 of file containers.h.
|
inline |
Examine past item in the stack.
This is a typecast of the peek operation.
| offset | in stack. |
Reimplemented from ucommon::stack.
Definition at line 656 of file containers.h.
|
inline |
Examine past item in the stack.
This is a typecast of the peek operation.
| offset | in stack. |
Reimplemented from ucommon::stack.
Definition at line 647 of file containers.h.
|
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 ucommon::stack.
Definition at line 638 of file containers.h.

|
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 628 of file containers.h.

|
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 617 of file containers.h.

1.8.1.1