UCommon
Protected Member Functions | Protected Attributes | Friends
ucommon::PagerObject Class Reference

This is a base class for objects that may be created in pager pools. More...

#include <memory.h>

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

Protected Member Functions

void dealloc (void)
 Return the pager object back to it's originating pool.
 PagerObject ()
 Create a pager object.
void release (void)
 Release a pager object reference.
- Protected Member Functions inherited from ucommon::LinkedObject
 LinkedObject (LinkedObject **root)
 Construct base class attached to a chain of objects.
 LinkedObject ()
 Construct base class unattached to anyone.
- Protected Member Functions inherited from ucommon::CountedObject
 CountedObject ()
 Construct a counted object, mark initially as unreferenced.
 CountedObject (const ObjectProtocol &ref)
 Construct a copy of a counted object.

Protected Attributes

PagerPoolpager
- Protected Attributes inherited from ucommon::LinkedObject
LinkedObjectnext

Friends

class PagerPool

Additional Inherited Members

- 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 isMember (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::CountedObject
unsigned copied (void)
 Return the number of active references (retentions) to our object.
bool isCopied (void)
 Test if the object has copied references.
bool isRetained (void)
 Test if the object has been referenced (retained) by anyone yet.
void retain (void)
 Increase reference count when retained.
- 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.
- Static Public Attributes inherited from ucommon::LinkedObject
static const LinkedObjectinv
 Marker for invalid list pointer.
static const LinkedObjectnil
 Marker for end of linked list.

Detailed Description

This is a base class for objects that may be created in pager pools.

This is also used to create objects which can be maintained as managed memory and returned to a pool. The linked list is used when freeing and re-allocating the object. These objects are reference counted so that they are returned to the pool they come from automatically when falling out of scope. This can be used to create automatic garbage collection pools.

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

Definition at line 739 of file memory.h.

Constructor & Destructor Documentation

ucommon::PagerObject::PagerObject ( )
protected

Create a pager object.

This is object is constructed by a PagerPool.


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