[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]

DynamicInterchangeTable

inherits from CliqueTable

... <- FixedList <- IntegerList <- HashTable <- CliqueTable <- DynamicInterchangeTable



Operations

Get list of all operations

AddExport
AddImport
DeleteExport
DeleteImport
Finalize
FindClique
FindExport
FindExportedComponentNumber
FindImaginary
FindImport
FixInverseTable
HashEntryIndexChanged
Init
ReplaceExport


Attributes

Get list of all attributes

Class DynamicInterchangeTable 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
DynamicInterchangeTable: inverseTable: ComponentRangeScalarMapPointer


Instance template

instance DynamicInterchangeTable tag;
    hashEntries: nilObject;
  hashEntrySize: 0;
        lgCount: 0;
     entryCount: 0;
 firstFreeEntry: 0;
 minPercentFull: 0;
 maxPercentFull: 0;
cliqueNameTable: nilObject;
   inverseTable: 0;
end instance;

Class definition

 
Define Class DynamicInterchangeTable;
    inherits from CliqueTable;

    field inverseTable: ComponentRangeScalarMapPointer;

    // The self parameter will usually be mainDynamicInterchangeTable;
    // this will search the system and packages.
    operation FindExport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                var quantity: Unsigned; var component: ComponentNumber): DynamicInterchangeState;
        // Find the export or tentative export with the given name and kind.  If found,
        // return the state, quantity, and component number.  If not, return dsNone.
        // The component number of a tentative export is returned as zero.

    operation FindExportedComponentNumber(kind: DynamicInterchangeKind; name: ReadOnlyPascalString; externalIndex: Unsigned): ComponentNumber;
        // Find the export with the given name, kind, and index and return the actual ComponentNumber for it.
        // If no component was found, return nil.
        // Cast the returned ComponentNumber as needed (ClassNumber, OperationNumber, ClassOperationNumber, Intrinsic or Reference).

    operation AddExport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                quantity: Unsigned; component: ComponentNumber; state: DynamicInterchangeState): Boolean;
        // Add the export or tentative export to the table.  If there already is an export or tentative export
        // with the given kind and name, return false and leave the table unchanged;
        // if not, return true.  component is ignored if state is dsTentative.
        // It is an error if state is dsExport and any part of the given range of components is
        // already used for an existing export or import.

    operation DeleteExport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                quantity: Unsigned; component: ComponentNumber; state: DynamicInterchangeState): Boolean;
        // Delete the export or tentative export matching the given kind, name, quantity, component, and state.
        // Return true if successful, false if no export or tentative export matched.

    operation ReplaceExport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                oldQuantity: Unsigned; oldComponent: ComponentNumber; oldState: DynamicInterchangeState;
                newQuantity: Unsigned; newComponent: ComponentNumber; newState: DynamicInterchangeState): Boolean;
        // Replace the export or tentative export matching the given kind, name, oldQuantity, oldComponent, and oldState
        // with an export or tentative export having the same kind and name but the new quantity, component, and state.
        // It is an error if the new state is dsExport and any part of the new range of components is
        // already used for an existing export or import.

    operation FindImport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                index: Unsigned; quantity: Unsigned; var result: ComponentNumber): Boolean;
        // If there already exists an import range of the given kind and name that contains quantity elements
        // starting at the given index, then return true and store the component number of the element corresponding
        // to the given index in the range into result.  If not, return false.

    operation AddImport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                index: Unsigned; quantity: Unsigned; component: ComponentNumber);
        // Add a new import range of the given kind and name that contains quantity elements starting at the given index
        // and that maps element at index to the given component number.  This routine does not check whether the range
        // already exists, so it might add redundant ranges.

    operation DeleteImport(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                index: Unsigned; quantity: Unsigned; component: ComponentNumber): Boolean;
        // Delete the import matching the given kind, name, index, quantity, and component.
        // Return true if successful, false if no import matched.

    operation FindImaginary(kind: DynamicInterchangeKind; name: ReadOnlyPascalString;
                index: Unsigned; quantity: Unsigned): ComponentNumber;
        // Find a range of imaginary component numbers for the given kind, name, index, and quantity.
        // If some part of an existing range of imaginary component numbers matches, use it;
        // otherwise allocate a new range, add it to the table, and return it.

    operation FindClique(kind: DynamicInterchangeKind; component: ComponentNumber;
                name: PascalString; var quantity: Unsigned;
                var baseIndex: Unsigned; var base: ComponentNumber):
                DynamicInterchangeState;
        // Find the import, export, or tentative export, if any, whose range includes the given component number.
        // If found, return the state, name, quantity, base index, and base component number defined by the entry.
        // The entry defines components base, base+1, ..., base+(quantity-1) (where "+" means AddToComponentNumber),
        // and these have clique indices baseIndex, baseIndex+1, ... baseIndex+(quantity-1), respectively.
        // component will be one of the components in {base, base+1, ..., base+(quantity-1)}, so its index
        // will be (component-base)+baseIndex, where the "-" is SubtractComponentNumbers.
        // baseIndex will be zero for all exports and tentative exports, but may be nonzero for imports.
        // If not found, return dsNone.

    operation FixInverseTable();
        // Fix the inverse table. This needs to be done if the entries in the dynamic
        // interchange table have been fiddled with directly, instead of through AddImport,
        // ReplaceExport, etc. This should never be called, except for by the very
        // lowest levels of the system.

    overrides Init;
    overrides Finalize;
    overrides HashEntryIndexChanged;

end class;