|
Public Types |
| typedef unsigned short | RefFlagField |
| enum | RefFlags {
IsStackRef = 0x0001,
IsStaticRef = 0x0002,
IsUserHeapRef = 0x0004,
IsMemLocked = 0x0008,
IsWeakRef = 0x0010,
IsUnsynchronized = 0x0020,
IsExternalRecorded = 0x0040,
ObjectHasLocalGc = 0x0080,
IsSoftReference = 0x0100,
Visited = 0x1000,
Marked = 0x2000,
FinalizeCalled = 0x4000,
NoRefCounting = 0x8000
} |
| | Some information about memory status. More...
|
Public Member Functions |
| virtual | ~ObjectBase () |
| void * | operator new (size_t size) |
| | the standard operator new
|
| void | operator delete (void *ptr) |
| | standard operator delete
|
| void * | operator new[] (size_t size) |
| | array allocator forwards to ACDK memory manager
|
| void | operator delete[] (void *ptr) |
| | array deallocator forwards to ACDK memory manager
|
| void * | operator new (size_t size, void *mem) |
| | used for other allocators, will handled as stack var!
|
| void * | operator new[] (size_t size, void *mem) |
| | used for other allocators, will handled as stack var!
|
| void | operator delete (void *ptr, void *mem) |
| | used for other allocators, will handled as stack var!
|
| void | operator delete[] (void *ptr, void *mem) |
| | used for other allocators, will handled as stack var!
|
| void * | operator new (size_t size,::acdk::lang::sys::Allocator *allocator) |
| | operator new, which uses the placement operator.
|
| void | operator delete (void *mem,::acdk::lang::sys::Allocator *allocator) |
| | this operator delete will only be called, in the case of an Exception in the of Object or derived
|
| inline::acdk::lang::sys::Allocator * | allocator () |
| | returns the Allocator of this Object.
|
| void * | allocate (size_t size, acdk::lang::sys::AllocatedType at=acdk::lang::sys::RawMem) |
| | If the object was allocated with an Allocator, this allocator can be used to allocate internal memory.
|
| void | deallocate (void *ptr, acdk::lang::sys::AllocatedType at=acdk::lang::sys::RawMem) |
| | If the object was allocated with an Allocator, this allocator can be used to deallocate internal memory.
|
| void | releaseRef (bool force=false) const |
| | release Reference.
|
| bool | _releaseRefCount () const |
| | decrement the Object refcounter and dispose this object
|
| virtual bool | _gc_releaseRef (bool force=false) const |
| | may be called by releaseRef() if ObjectHasLocalGc is set
|
| void | addRef (bool force=false) const |
| | increment reference counter
|
| void | disposeRef () const |
| | releases this object.
|
| void | testIntegrity () const |
| | test if object is still sane
|
| unsigned short | magic () const |
| | return the magic (_MagicObjectSig or _MagicDeletedSig) from this object instance
|
| void | _inititializeObjectAttrFlags (int flags) |
| | internal function to set flags before constructor
|
| void | _setObjectRefFlag (bool onoff, RefFlagField flag) const |
| | set or release internal flag
|
| bool | _isObjectRefFlag (RefFlagField theFlag) const |
| int | refCount () const |
| | returns the current reference counter
|
| void | setStackRef () const |
| | set Object as Stack Object.
|
| bool | isStackRef () const |
| | returns true if Object is allocated on Stack
|
| void | setStackRef (bool asstackref) const |
| | declares this object as stack object.
|
| bool | isStaticRef () const |
| | returns true if object is declared as static referenced
|
| void | setStaticRef (bool asstaticref) const |
| | returns set or remove reference as static
|
| bool | isWeakRef () const |
| | returns true if object is declared as weak referenced
|
| bool | isMemLocked () const |
| | returns true if object reference is locked
|
| void | lockMem (bool lockit) const |
| | lock or unlock the object reference.
|
| bool | isMarked () const |
| | used internally for garbage collecting
|
| void | setMarked () const |
| | used internally for garbage collecting
|
| void | unsetMarked () const |
| | used internally for garbage collecting
|
| bool | isUnsynchronized () const |
| | returns true if object is declared as unsychronizable, which means lock/unlock will have no effect
|
| void | setUnsynchronized (bool unsynced) const |
| | returns set or unset unsychronizable, which means lock/unlock will have no effect
|
| bool | hasLocalGc () const |
| void | setLocalGc (bool flag) const |
| bool | isExternalRecorded () const |
| | returns true if object external listener, which should be notified at deletion
|
| void | setExternalRecorded (bool flag) const |
| | see isExternalRecorded()
|
| bool | isSoftReference () const |
| | return true if this object is held by a soft reference
|
| void | setSoftReference (bool flag) const |
| | see isSoftReference()
|
| void | aquireLock () |
| | aquire MT-Lock from lock cache
|
| virtual void | lock () |
| | lock the object instance.
|
| virtual void | unlock () |
| | unlock the object instance Note: Will be overwritten by acdk::io::Reader and acdk::io::Writer Note: if Unsynchronized or isStack is set, this call will have no effect
|
| virtual void | finalize () |
| | Only for Java compatibility.
|
| void | _call_finalize () |
| | call finalize only if FinalizeCalled not set
|
| virtual dmi::ClazzInfo * | getClazzInfo () |
| | return the ClazzInfo for this class will be re-implemented for each class by methods generated by acdkmc
|
| virtual Object * | _cast (const acdk::lang::dmi::ClazzInfo *ci) |
| | for DMI implemented classes with multiple interface allow casts.
|
| virtual void | getCollectableFields (FieldReferences &fields) |
| | retrun the collectable fields of this object (all Objects fields) will be re-implemented for each class by methods generated by acdkmc If this is manually implemented, the flag ObjectHasLocalGc should be set.
|
Static Public Member Functions |
| dmi::ClazzInfo * | clazzInfo () |
| | return the ClazzInfo for this class will be re-implemented for each class by methods generated by acdkmc
|
| void | _throwException (const char *msg=) |
| void | _throwBadCastException (const char *msg=) |
| void | _throwNullPointerException (const char *msg=) |
| void | _throwNotImplementedYet (const char *msg=) |
| void | _throwArrayIndexOutOfBoundsException (size_t idx=0, size_t max=size_t(-1), const char *msg=) |
| void | _throwIndexOutOfBoundsException (size_t idx=0, size_t max=size_t(-1), const char *msg=) |
| void | _throwObjectInsane (const InterfaceBase *obj, int magicsic) |
Static Public Attributes |
| bool | singleThreaded |
| | global variable which is true if program is running in single thread mode
|
Protected Member Functions |
| | ObjectBase () |
Private Attributes |
| sys::core_atomicop | _refCount |
| | The Refernce Conter.
|
| RefFlagField | _objectRefFlags |
| | a set of internal Flags.
|
| unsigned short | _magic |
| | magic Number of Object, for sanity check
|