[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

DynamicObjectNameDictionary

inherits from ObjectNameDictionary
inherits from HasReinitialize
inherits from RenumberingSensitive

Object <- ObjectNameDictionary <- DynamicObjectNameDictionary



Operations

Get list of all operations

AdjustTableAndHeapSizes
Clear
Compact
EnterObjectName
FinishRenumbering
Init
LookUpObjectName
MakeRoomIfNeeded
Reinitialize
RemoveNameAt
RemoveNameIfFound
RemoveUnreferencedNames
Validate


Attributes

Get list of all attributes

Class DynamicObjectNameDictionary defines no new attributes.


Fields

Field Type
ObjectNameDictionary: hashTable: Object
textHeap: TextHeapWithoutGenerations


Instance template

instance DynamicObjectNameDictionary tag;
      hashTable: nilObject;
       textHeap: nilObject;
end instance;

Class definition

Define Class DynamicObjectNameDictionary;
    inherits from ObjectNameDictionary, HasReinitialize, RenumberingSensitive;

    // public interface
    overrides Init;

    overrides LookUpObjectName;
    operation EnterObjectName(object: Object; name: HasText);
        // add or change a name of object
    operation RemoveNameIfFound(object: Object), noFail;
        // when destroying an object, call to remove its name
        // may be called for objects that do not have an entry in the dictionary

    operation Clear(), noFail;
        // delete all the entries in all the dictionaries data structures
    
    overrides FinishRenumbering;
        // called by the system; rehashes the hash table after renumbering

    overrides Reinitialize;
        // Skip renumbering for cluster object name tables, since they are renumbered
        // explicitly by the object framework before reinitializing other objects.

    operation RemoveUnreferencedNames();
        // called at the end of garbage collection to flush out stale object names for
        // objects that have been freed
    
    // private calls
    operation RemoveNameAt(index: Signed);
        // removes the string from the string dictionary and the hash table entry
    operation AdjustTableAndHeapSizes(textHeapNeedsDeflating: Boolean);
        // The hash table is resized with AdjustTableSize, and if the text heap has
        // free space in it then the free space is squeezed out.  This call is done
        // in a reset-proof way, creating copies of the manipulated data structures
        // and only updating both at the same time using an atomic write operation.
    operation MakeRoomIfNeeded(): Boolean;
        // called prior to adding a new entry into the hash table. If the
        // hash table is full, or the text heap has too much free space in it, then
        // AdjustTableAndHeapSizes is used to make room in the hash table and/or
        // squeeze the air out of the text heap. In order to support this process, the caller
        // needs to re-read the hashTable and textHeap fields as well as recalculate any
        // hash table indices.

    // misc.
#ifdef VALIDATE
    overrides Validate;
#endif
    overrides Compact;
end class;