UCommon
Public Member Functions | Protected Member Functions
ucommon::ArrayReuse Class Reference

An array of reusable objects. More...

#include <vector.h>

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

Public Member Functions

 ~ArrayReuse ()
 Destroy reusable private heap array.
 

Protected Member Functions

 ArrayReuse (size_t objsize, unsigned c)
 
 ArrayReuse (size_t objsize, unsigned c, void *memory)
 
bool avail (void)
 
ReusableObjectget (timeout_t timeout)
 
ReusableObjectget (void)
 
ReusableObjectrequest (void)
 
- Protected Member Functions inherited from ucommon::ReusableAllocator
ReusableObjectnext (ReusableObject *object)
 Get next reusable object in the pool. More...
 
void release (ReusableObject *object)
 Release resuable object. More...
 
 ReusableAllocator ()
 Initialize reusable allocator through a conditional. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from ucommon::Conditional
static pthread_condattr_t * initializer (void)
 Support function for getting conditional attributes for realtime scheduling. More...
 
static void set (struct timespec *hires, timeout_t timeout)
 Convert a millisecond timeout into use for high resolution conditional timers. More...
 
- Protected Attributes inherited from ucommon::ReusableAllocator
ReusableObjectfreelist
 
unsigned waiting
 

Detailed Description

An array of reusable objects.

This class is used to support the array_use template. A pool of objects are created which can be allocated as needed. Deallocated objects are returned to the pool so they can be reallocated later. This is a private fixed size heap.

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

Definition at line 45 of file vector.h.


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