|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Element_Usage_Table, seg_004666
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
--| @SUMMARY Provides a table of elements allowing the user to mark
--| them as "used" or not. Typically the lists is initialized and elements
--| are marked as the satisfy some requirement.
--| @INDICES (MARKING, TABLE_PROCESSING)
--|
with Map_Generic;
generic
Size : Integer;
type Element is private;
with function Hash (Elem : Element) return Integer;
package Element_Usage_Table is
type Table is private;
procedure Initialize (The_Table : in out Table);
--| @DESCRIPTION Adds an element to the table. Elements are initially
--| set to be "unused".
procedure Add (The_Element : Element;
To : in out Table);
--| @DESCRIPTION Resets all elements in the table to "unused"
procedure Reset (The_Table : in out Table);
Element_Not_Found : exception;
--| @RAISES (Element_Not_Found)
procedure Mark_As_Used (An_Element : Element; In_Table : in out Table);
--| @RAISES (Element_Not_Found)
function Is_Used (An_Element : Element;
In_Table : Table) return Boolean;
--| @DESCRIPTION Checks to see of all elements in the table are used.
function All_Used (In_Table : Table) return Boolean;
type Iterator is private;
function Done (Iter : Iterator) return Boolean;
function Value (Iter : Iterator) return Element;
procedure Next (Iter : in out Iterator);
private
package Element_Map is new Map_Generic (Size, Element, Boolean, Hash);
type Table is new Element_Map.Map;
type Iterator is new Element_Map.Iterator;
end Element_Usage_Table;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=1f rec1=00 rec2=01 rec3=00e
[0x01] rec0=16 rec1=00 rec2=02 rec3=000
tail 0x21700272c815c665535fe 0x42a00088462061e03