UCommon
Public Member Functions | Protected Member Functions | Protected Attributes
ucommon::LinkedAllocator Class Reference

Linked allocator helper for linked_allocator template. More...

#include <containers.h>

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

Public Member Functions

 operator bool ()
 Test if there is still objects in the free list.
bool operator! ()
 Test if the free list is empty.

Protected Member Functions

LinkedObject * get (void)
LinkedObject * get (timeout_t timeout)
void release (LinkedObject *node)

Protected Attributes

LinkedObject * freelist

Additional Inherited Members

- Static Private Member Functions inherited from ucommon::Conditional
static void gettimeout (timeout_t timeout, struct timespec *hires)
 Convert a millisecond timeout into use for high resolution conditional timers.
static pthread_condattr_t * initializer (void)
 Support function for getting conditional attributes for realtime scheduling.

Detailed Description

Linked allocator helper for linked_allocator template.

This is used to alloc an array of typed objects tied to a free list in a single operation.

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

Definition at line 60 of file containers.h.


Member Function Documentation

ucommon::LinkedAllocator::operator bool ( )

Test if there is still objects in the free list.

Returns:
true if there are objects.
bool ucommon::LinkedAllocator::operator! ( )

Test if the free list is empty.

Returns:
true if the free list is empty.

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