#include <vector.h>


Public Member Functions | |
| paged_reuse (mempager *pager, unsigned count) | |
| Create a managed reusable typed object pool. | |
| operator bool () | |
| Test if typed objects available from the pager or re-use list. | |
| bool | operator! () |
| Test if no objects are available for reuse or the pager. | |
| T * | get (void) |
| Get a typed object from the pager heap. | |
| T * | get (timeout_t timeout) |
| Get a typed object from the heap. | |
| T * | request (void) |
| Request immediately next available typed object from the pager heap. | |
| void | release (T *object) |
| Release (return) a typed object back to the pager heap for re-use. | |
| T * | operator* () |
| Get a typed object from the pager heap by type casting reference. | |
| operator T * () | |
| Get a typed object from the pager heap by pointer reference. | |
A pool of typed objects is created which can be allocated from a memory pager. Deallocated typed objects are also returned to this pool so they can be reallocated later.
Definition at line 567 of file vector.h.
| ucc::paged_reuse< T >::paged_reuse | ( | mempager * | pager, | |
| unsigned | count | |||
| ) | [inline] |
| T* ucc::paged_reuse< T >::get | ( | timeout_t | timeout | ) | [inline] |
Get a typed object from the heap.
This function blocks until the the heap has an object to return or the timer has expired.
| timeout | to wait for heap in milliseconds. |
Reimplemented from ucc::PagerReuse.
| T* ucc::paged_reuse< T >::get | ( | void | ) | [inline] |
Get a typed object from the pager heap.
This function blocks when the heap is empty until an object is returned to the heap.
Reimplemented from ucc::PagerReuse.
| ucc::paged_reuse< T >::operator bool | ( | ) | [inline] |
| ucc::paged_reuse< T >::operator T * | ( | ) | [inline] |
| bool ucc::paged_reuse< T >::operator! | ( | ) | [inline] |
| T* ucc::paged_reuse< T >::operator* | ( | ) | [inline] |
| void ucc::paged_reuse< T >::release | ( | T * | object | ) | [inline] |
| T* ucc::paged_reuse< T >::request | ( | void | ) | [inline] |
Request immediately next available typed object from the pager heap.
Reimplemented from ucc::PagerReuse.
1.5.9