ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
![]() ![]() |
This is a base class for objects that may be created in pager pools. More...
#include <memory.h>
Protected Member Functions | |
PagerObject () | |
Create a pager object. More... | |
void | reset (void) |
Reset state of object. More... | |
void | retain (void) __OVERRIDE |
Retain by marking as self referenced list. More... | |
void | release (void) __OVERRIDE |
Release a pager object reference. More... | |
void | dealloc (void) __OVERRIDE |
Return the pager object back to it's originating pool. More... | |
![]() | |
LinkedObject (LinkedObject **root) | |
Construct base class attached to a chain of objects. More... | |
LinkedObject () | |
Construct base class unattached to anyone. More... | |
LinkedObject (const LinkedObject &from) | |
![]() | |
CountedObject () | |
Construct a counted object, mark initially as unreferenced. More... | |
CountedObject (const ObjectProtocol &ref) | |
Construct a copy of a counted object. More... | |
virtual void | dealloc (void) |
Dealloc object no longer referenced. More... | |
void | reset (void) |
Force reset of count. More... | |
Protected Attributes | |
PagerPool * | pager |
![]() | |
LinkedObject * | Next |
Private Member Functions | |
__DELETE_COPY (PagerObject) | |
Friends | |
class | PagerPool |
Additional Inherited Members | |
![]() | |
virtual | ~LinkedObject () |
virtual void | release (void) __OVERRIDE |
Release list, mark as no longer linked. More... | |
virtual void | retain (void) __OVERRIDE |
Retain by marking as self referenced list. More... | |
void | enlist (LinkedObject **root) |
Add our object to an existing linked list through a pointer. More... | |
void | delist (LinkedObject **root) |
Locate and remove ourselves from a list of objects. More... | |
bool | is_member (LinkedObject *list) const |
Search to see if we are a member of a specific list. More... | |
LinkedObject * | getNext (void) const |
Get next effective object when iterating. More... | |
![]() | |
bool | is_copied (void) const |
Test if the object has copied references. More... | |
bool | is_retained (void) const |
Test if the object has been referenced (retained) by anyone yet. More... | |
unsigned | copied (void) const |
Return the number of active references (retentions) to our object. More... | |
void | retain (void) __OVERRIDE |
Increase reference count when retained. More... | |
void | release (void) __OVERRIDE |
Decrease reference count when released. More... | |
![]() | |
static void | purge (LinkedObject *root) |
Release all objects from a list. More... | |
static unsigned | count (const LinkedObject *root) |
Count the number of linked objects in a list. More... | |
static LinkedObject * | getIndexed (LinkedObject *root, unsigned index) |
Get member by index. More... | |
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.
|
protected |
Create a pager object.
This is object is constructed by a PagerPool.
Definition at line 900 of file memory.cpp.
|
private |
|
protectedvirtual |
Return the pager object back to it's originating pool.
Reimplemented from ucommon::CountedObject.
Definition at line 911 of file memory.cpp.
References ucommon::PagerPool::put().
|
protectedvirtual |
Release a pager object reference.
Reimplemented from ucommon::LinkedObject.
Definition at line 916 of file memory.cpp.
References ucommon::CountedObject::release().
|
protected |
Reset state of object.
Definition at line 905 of file memory.cpp.
References ucommon::LinkedObject::Next, and ucommon::CountedObject::reset().
Referenced by ucommon::PagerPool::get().
|
protectedvirtual |
Retain by marking as self referenced list.
Inherited from base Object.
Reimplemented from ucommon::LinkedObject.
Definition at line 921 of file memory.cpp.
References ucommon::CountedObject::retain().
|
protected |
Definition at line 791 of file memory.h.
Referenced by ucommon::PagerPool::get().