DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦30492243c⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Sequential_Reference, seg_0046cb

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



--| @SUMMARY This package maps elements to a unique integer.  It can be used
--| to create references to a long names that will not fit conveniently
--| in a table.
--| @INDICES (References, Table_Processing)
--|
with Io;
with Bounded_String;
with Map_Generic;

generic
    type Element is private;
    with function Hash  (E : Element) return Integer;
    with function Image (E : Element) return String;
package Sequential_Reference is

    type Map is private;

    procedure Initialize (M : in out Map);

    procedure Add (Elem : Element; To : in out Map);

    --| @DESCRIPTION Returns the sequential reference assigned to the
    --| element.
    --| @RAISES (Undefined)
    function Index (Elem : Element; In_Map : Map) return Integer;

    --| @DESCRIPTION Returns the element that corresponds to the index
    --| reference.
    --| @RAISES (Undefined)
    function Lookup (Index : Integer; In_Map : Map) return Element;

    Undefined : exception;

    --| @DESCRIPTION Creates a table display of all elements and their
    --| reference.
    --|
    procedure Display (M : Map; To : Io.File_Type := Io.Standard_Output);

private

    Size : constant := 5000;

    package Element_Map is new Map_Generic (Size, Element, Integer, Hash);

    type Element_Array is array (1 .. 5000) of Element;

    type Map is
        record
            Elements : Element_Array;
            Map      : Element_Map.Map;
        end record;

end Sequential_Reference;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=028
        [0x01] rec0=16 rec1=00 rec2=02 rec3=000
    tail 0x215004ae0815c670bbd0c 0x42a00088462061e03