2005/5/9

     
 

class SharedOwning

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

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

#include <SharedOwning.h>

Inheritance diagram for acdk::lang::ref::SharedOwning:

acdk::lang::Object acdk::lang::ref::NotifyObjectEventListener acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Implements mechanism for small garbage collection for local shared owning.


Public Types

typedef acdk::lang::sys::core_vector<
SharedOwned
SharedOwnedVec

Public Member Functions

 SharedOwning ()
virtual ~SharedOwning ()
void registerSharedObject (Object *obj, RObject *refedBy, bool isMaster)
void unregisterSharedObject (Object *obj, RObject *refedBy, bool onDelete)
void registerSharedObjectRefs (RObject *masterRef, RObject *slaveRef)
void unregisterSharedObjectRefs (RObject *masterRef, RObject *slaveRef, bool onDelete=false)
void unregisterAll ()

Public Attributes

SharedOwnedVec _sharedElements

Protected Member Functions

virtual void notifyBeforeConstruction (Object *obj)
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()

virtual bool notifyBeforeDestruction (Object *obj)
 called if RefCount == 0.

void setMaster (SharedOwned &shown, bool isMaster)
bool isNowMaster (SharedOwned &toDel, SharedOwned &el, SharedOwned &oldMaster)
SharedOwnedgetMaster ()
SharedOwnedgetElement (Object *obj)
bool canRelease (Object *obj)
void removeElement (Object *obj)
void dump (const char *msg=)

Static Protected Member Functions

SharedOwned_getEmtpySharedOwned ()


Member Typedef Documentation

typedef acdk::lang::sys::core_vector<SharedOwned> acdk::lang::ref::SharedOwning::SharedOwnedVec
 


Constructor & Destructor Documentation

acdk::lang::ref::SharedOwning::SharedOwning  )  [inline]
 

virtual acdk::lang::ref::SharedOwning::~SharedOwning  )  [virtual]
 


Member Function Documentation

SharedOwned& acdk::lang::ref::SharedOwning::_getEmtpySharedOwned  )  [static, protected]
 

bool acdk::lang::ref::SharedOwning::canRelease Object obj  )  [protected]
 

void acdk::lang::ref::SharedOwning::dump const char *  msg =  )  [protected]
 

SharedOwned& acdk::lang::ref::SharedOwning::getElement Object obj  )  [protected]
 

SharedOwned& acdk::lang::ref::SharedOwning::getMaster  )  [protected]
 

bool acdk::lang::ref::SharedOwning::isNowMaster SharedOwned toDel,
SharedOwned el,
SharedOwned oldMaster
[protected]
 

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

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

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

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

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

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

Parameters:
tid ThreadID of the Thread, which owns the Heap
theheap 

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

virtual void acdk::lang::ref::SharedOwning::notifyBeforeConstruction Object obj  )  [inline, protected, virtual]
 

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

virtual bool acdk::lang::ref::SharedOwning::notifyBeforeDestruction Object obj  )  [inline, protected, virtual]
 

called if RefCount == 0.

Returns:
false if object should not be destroyd

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

virtual void acdk::lang::ref::SharedOwning::notifyWhileDestruction Object obj  )  [inline, protected, virtual]
 

called in destructor of given object.

Note virtual function will not work

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

void acdk::lang::ref::SharedOwning::registerSharedObject Object obj,
RObject refedBy,
bool  isMaster
 

void acdk::lang::ref::SharedOwning::registerSharedObjectRefs RObject masterRef,
RObject slaveRef
 

void acdk::lang::ref::SharedOwning::removeElement Object obj  )  [protected]
 

void acdk::lang::ref::SharedOwning::setMaster SharedOwned shown,
bool  isMaster
[protected]
 

void acdk::lang::ref::SharedOwning::unregisterAll  ) 
 

void acdk::lang::ref::SharedOwning::unregisterSharedObject Object obj,
RObject refedBy,
bool  onDelete
 

void acdk::lang::ref::SharedOwning::unregisterSharedObjectRefs RObject masterRef,
RObject slaveRef,
bool  onDelete = false
 


Member Data Documentation

SharedOwnedVec acdk::lang::ref::SharedOwning::_sharedElements