UCommon
ucommon::ReusableObject Class Reference

Reusable objects for forming private heaps. More...

#include <linked.h>

Inheritance diagram for ucommon::ReusableObject:
Collaboration diagram for ucommon::ReusableObject:

Public Member Functions

ReusableObjectgetNext (void)
 Get next effective reusable object when iterating.
 
- Public Member Functions inherited from ucommon::LinkedObject
void delist (LinkedObject **root)
 Locate and remove ourselves from a list of objects.
 
void enlist (LinkedObject **root)
 Add our object to an existing linked list through a pointer.
 
LinkedObjectgetNext (void) const
 Get next effective object when iterating.
 
bool is_member (LinkedObject *list) const
 Search to see if we are a member of a specific list.
 
virtual void retain (void)
 Retain by marking as self referenced list.
 
- Public Member Functions inherited from ucommon::ObjectProtocol
ObjectProtocolcopy (void)
 Retain (increase retention of) object when copying.
 
void operator++ (void)
 Increase retention operator.
 
void operator-- (void)
 Decrease retention operator.
 
virtual ~ObjectProtocol ()
 Required virtual destructor.
 

Protected Member Functions

virtual void release (void)
 Release list, mark as no longer linked.
 
- Protected Member Functions inherited from ucommon::LinkedObject
 LinkedObject ()
 Construct base class unattached to anyone.
 
 LinkedObject (const LinkedObject &from)
 
 LinkedObject (LinkedObject **root)
 Construct base class attached to a chain of objects.
 

Friends

class ReusableAllocator
 

Additional Inherited Members

- Static Public Member Functions inherited from ucommon::LinkedObject
static unsigned count (const LinkedObject *root)
 Count the number of linked objects in a list.
 
static LinkedObjectgetIndexed (LinkedObject *root, unsigned index)
 Get member by index.
 
static void purge (LinkedObject *root)
 Release all objects from a list.
 
- Protected Attributes inherited from ucommon::LinkedObject
LinkedObjectNext
 

Detailed Description

Reusable objects for forming private heaps.

Reusable objects are linked objects that may be allocated in a private heap, and are returned to a free list when they are no longer needed so they can be reused without having to be re-allocated. The free list is the root of a linked object chain. This is used as a base class for those objects that will be managed through reusable heaps.

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

Definition at line 152 of file linked.h.

Member Function Documentation

◆ getNext()

ReusableObject * ucommon::ReusableObject::getNext ( void )
inline

Get next effective reusable object when iterating.

Returns
next reusable object in list.

Definition at line 164 of file linked.h.

◆ release()

virtual void ucommon::ReusableObject::release ( void )
protectedvirtual

Release list, mark as no longer linked.

Inherited from base Object.

Reimplemented from ucommon::LinkedObject.

Friends And Related Symbol Documentation

◆ ReusableAllocator

friend class ReusableAllocator
friend

Definition at line 154 of file linked.h.


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