Object <- FixedList <- IntegerList <- HashTable <- CliqueTable |
|
Class CliqueTable defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| HashTable: | hashEntries: | FixedList |
| hashEntrySize: | Unsigned | |
| lgCount: | Unsigned | |
| entryCount: | Unsigned | |
| firstFreeEntry: | Unsigned | |
| minPercentFull: | UnsignedShort | |
| maxPercentFull: | UnsignedShort | |
| CliqueTable: | cliqueNameTable: | CliqueNameTable |
//------------------------------------------------------------------------------------------------- Define Class CliqueTable; abstract; inherits from HashTable; // Invariant: All identical names in a CliqueTable must be shared in its CliqueNameTable. field cliqueNameTable: CliqueNameTable; // The clique names operation AddCliqueEntry(kind: DynamicInterchangeKind; name: ReadOnlyPascalString; newEntry: CliqueTableEntryPointer): TrackedIndexHack; // Add the given clique entry with the given kind and name. // Read fields other than kind and name from newEntry; newEntry's kindAndName field may be altered. // Multiple entries can coexist with the same key. // Return the entry's index, suitable for ReadHashEntryAt, in the table. // The index becomes invalid as soon as memory is allocated when this hash table isn't fastened. operation EachMatchingCliqueEntry(kind: DynamicInterchangeKind; name: ReadOnlyPascalString; modify: Boolean; functionCanMoveMemory: Boolean; function: EachMatchingCliqueEntryFunction; parameters: Pointer): Boolean; // Call function with a pointer to each matching clique entry. If modify is true, the function // can modify the entry. If the function returns erStop or erRemoveStop, terminate the iteration // immediately and return false; otherwise return true after the iteration completes. // If the function returns erRemoveContinue or erRemoveStop, remove the entry that was just // passed to the function. // The function is not allowed to allocate memory unless functionCanMoveMemory is true. // The function is not allowed to make any clique table calls on this clique table that would modify the table. operation EachCliqueEntry(modify: Boolean; functionCanMoveMemory: Boolean; function: EachCliqueEntryFunction; parameters: Pointer): Boolean; // Call function with a pointer to each clique entry. If modify is true, the function // can modify the entry. If the function returns erStop or erRemoveStop, terminate the iteration // immediately and return false; otherwise return true after the iteration completes. // If the function returns erRemoveContinue or erRemoveStop, remove the entry that was just // passed to the function. // The function is not allowed to allocate memory unless functionCanMoveMemory is true. // The function is not allowed to make any clique table calls on this clique table that would modify the table. operation AddNameToTable(name: ReadOnlyPascalString): TrackedIndexHack; // Add the given name to the clique table's clique name table. Used by AddCliqueEntry and by the // volume import table when it's adding package names to the name table. // PROTECTED: operation CliqueNameMovingShell(iterator: AbstractIterator; iteratorParameters: Pointer): Unsigned, intrinsic; // Set up a context for calling CliqueNameMovingIteratee and then call iterator with two arguments: // the parameters to be passed to CliqueNameMovingIteratee and the iteratorParameters passed as an // argument to CliqueNameMovingShell. Return the result from iterator. iterator must not allocate memory. operation CliqueNameMovingIteratee(name: ReadOnlyPascalString; oldOffset: TrackedIndex; newOffset: TrackedIndex; iterateeParameters: Pointer): Boolean, intrinsic; // Private routine that informs the CliqueTable that the name that used to be at oldOffset in the // clique name table will now be either deleted or moved to newOffset. Return true if the name should be // moved to newOffset or false if it should be deleted. // This routine is not allowed to allocate memory. // CliqueNameMovingIteratee can only be called within the dynamic context of a call to CliqueNameMovingShell. // PUBLIC: overrides Init; overrides ComputeHashFromKey; overrides ComputeHashFromHashEntry; overrides FastHashEntryAccess; overrides KeyMatchesHashEntry; overrides Stabilize; #ifdef VALIDATE overrides KeyInHashEntry; #endif end class;