software engineer &        architecture


class Reference

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::ref::Reference Class Reference

#include <Reference.h>

Inheritance diagram for acdk::lang::ref::Reference:

acdk::lang::Object acdk::lang::ref::NotifyObjectEventListener acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::lang::ref::PhantomReference acdk::lang::ref::SoftReference acdk::lang::ref::WeakReference acdk::util::WeakHashMapKey List of all members.

Detailed Description

The Reference class is similar to the corrsponding Java class.

Roger Rene Kommer
2005/02/05 10:44:59
See also:

Public Member Functions

 Reference (IN(RObject) ref, IN(RReferenceQueue) queue=Nil)
 Standard constructor.

 ~Reference ()
virtual RObject get ()
ObjectobjectPtr ()
virtual void clear ()
virtual bool isEnqueued ()
bool isDequeued ()
virtual bool enqueue ()
virtual void notifyBeforeConstruction (Object *obj)
virtual bool notifyBeforeDestruction (Object *obj)
 called if RefCount == 0.

virtual void notifyWhileDestruction (Object *obj)
 called in destructor of given object.

virtual bool listHeaps (IN(::acdk::lang::sys::RHeapFrame) theheap)
 used as callback function to list all heaps of all threads.

virtual bool listedAllocated (IN(::acdk::lang::sys::RHeapFrame) theheap, void *obj,::acdk::lang::sys::AllocatedType type, int size)
 used as callback function, used by::acdk::lang::sys::HeapFrame::listObjects()

Protected Attributes

bool _releaseReference
RReferenceQueue _queue
bool _isOnQueue
bool _isDequeued
RReference _next
 for linked list in Queeue

bool _inDestructor


class ReferenceQueue

Constructor & Destructor Documentation

acdk::lang::ref::Reference::Reference IN(RObject ref,
IN(RReferenceQueue queue = Nil

Standard constructor.

ref the reference to hold. do not pass a acdk::lang::Object* to this constructor if queue !+ Nil, because this may causes problems with the GC with a dangling pointer on MT & SMP environments
queue which collects released references

acdk::lang::ref::Reference::~Reference  ) 

Member Function Documentation

virtual void acdk::lang::ref::Reference::clear  )  [virtual]

virtual bool acdk::lang::ref::Reference::enqueue  )  [virtual]

virtual RObject acdk::lang::ref::Reference::get  )  [virtual]

Reimplemented in acdk::lang::ref::WeakReference.

bool acdk::lang::ref::Reference::isDequeued  )  [inline]

virtual bool acdk::lang::ref::Reference::isEnqueued  )  [virtual]

virtual bool acdk::lang::ref::Reference::listedAllocated IN(::acdk::lang::sys::RHeapFrame theheap,
void *  obj,
::acdk::lang::sys::AllocatedType  type,
int  size
[inline, virtual]

used as callback function, used by::acdk::lang::sys::HeapFrame::listObjects()

thehead the current heap
obj the Object in the heap
to abort listing return false

Implements acdk::lang::ref::NotifyObjectEventListener.

virtual bool acdk::lang::ref::Reference::listHeaps IN(::acdk::lang::sys::RHeapFrame theheap  )  [inline, virtual]

used as callback function to list all heaps of all threads.

tid ThreadID of the Thread, which owns the Heap

Implements acdk::lang::ref::NotifyObjectEventListener.

virtual void acdk::lang::ref::Reference::notifyBeforeConstruction Object obj  )  [virtual]

Implements acdk::lang::ref::NotifyObjectEventListener.

virtual bool acdk::lang::ref::Reference::notifyBeforeDestruction Object obj  )  [virtual]

called if RefCount == 0.

false if object should not be destroyd

Implements acdk::lang::ref::NotifyObjectEventListener.

Reimplemented in acdk::lang::ref::PhantomReference, acdk::lang::ref::SoftReference, and acdk::lang::ref::WeakReference.

virtual void acdk::lang::ref::Reference::notifyWhileDestruction Object obj  )  [virtual]

called in destructor of given object.

Note virtual function will not work

Implements acdk::lang::ref::NotifyObjectEventListener.

Object* acdk::lang::ref::Reference::objectPtr  )  [inline]

Friends And Related Function Documentation

friend class ReferenceQueue [friend]

Member Data Documentation

bool acdk::lang::ref::Reference::_inDestructor [protected]

bool acdk::lang::ref::Reference::_isDequeued [protected]

bool acdk::lang::ref::Reference::_isOnQueue [protected]

RReference acdk::lang::ref::Reference::_next [protected]

for linked list in Queeue

RReferenceQueue acdk::lang::ref::Reference::_queue [protected]

Object* acdk::lang::ref::Reference::_ref [protected]

bool acdk::lang::ref::Reference::_releaseReference [protected]

Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer