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

⟦598001a98⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package T_Tree, seg_03fde6

Derivation

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

E3 Source Code



with T_Stack;

generic

    type T is private;
    with function Compare (Left_Op, Right_Op : T) return Integer is <>;
    with procedure Affect (Dest : in out T; Source : T) is <>;
    with procedure Print (Item : T);

package T_Tree is

    Inf : constant Integer := -1;
    Equ : constant Integer := 0;
    Sup : constant Integer := 1;

    type Ttree is limited private;
    type Tree_Index is limited private;
    Error_Ttree_Allocation : exception;

--------------------------------------------------
-- Create : -> Ttree
--------------------------------------------------
    procedure Create (A : in out Ttree);

--------------------------------------------------
--  Empty : Ttree -> BOOLEAN
--------------------------------------------------
    function Empty (A : Ttree) return Boolean;

--------------------------------------------------
-- Left :  Ttree -> Ttree
--------------------------------------------------
    function Left (A : Ttree) return Ttree;

--------------------------------------------------
-- Right :  Ttree -> Ttree
--------------------------------------------------
    function Right (A : Ttree) return Ttree;

--------------------------------------------------
-- Build : T,Ttree,Ttree -> Ttree
    --------------------------------------------------
    procedure Build (X : T; Node : in out Ttree; Sad, Sag : Ttree);
--------------------------------------------------
-- Build : T             -> Ttree
    --------------------------------------------------
    procedure Build (X : T; Node : in out Ttree);

--------------------------------------------------
-- Get : Ttree->T
    --------------------------------------------------
    function Get (A : Ttree) return T;

--------------------------------------------------
-- Put : T,Ttree->Ttree
    --------------------------------------------------
    procedure Put (X : T; A : in out Ttree);


--------------------------------------------------
-- Create_Iterator : Ttree -> Tree_Index
    --------------------------------------------------
    procedure Create_Iterator (A : Ttree; I : in out Tree_Index);


--------------------------------------------------
-- Current_Iterator : Tree_Index-> Ttree
    --------------------------------------------------
    function Current_Iterator (I : Tree_Index) return Ttree;

--------------------------------------------------
-- End_Iterator : Tree_Index-> BOOLEAN
    --------------------------------------------------
    function End_Iterator (I : Tree_Index) return Boolean;

--------------------------------------------------
-- Next_Iterator : Tree_Index ->Tree_Index
    --------------------------------------------------
    procedure Next_Iterator (I : in out Tree_Index);

--------------------------------------------------
-- Dump        :   Ttree->
--------------------------------------------------
    procedure Dump (A : Ttree);



--------------------------------------------------
-- Insert        : T ,Ttree->Ttree
--------------------------------------------------
    procedure Insert (X : T; A : in out Ttree);

--------------------------------------------------
-- Search        : T ,Ttree,Tree->Boolean,Ttree
--------------------------------------------------
    procedure Search (X : T; A : Ttree; Found : in out Ttree);



private
    type Tree_Cell;

    type Ttree is access Tree_Cell;

    type Tree_Cell is
        record
            Element : T;
            Left, Right : Ttree;
        end record;


    package Stack_Node is new T_Stack (Ttree);

    type Tree_Index is
        record
            Ptr : Stack_Node.Tstack;
        end record;


end T_Tree;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=22 rec1=00 rec2=01 rec3=02c
        [0x01] rec0=1b rec1=00 rec2=02 rec3=032
        [0x02] rec0=18 rec1=00 rec2=03 rec3=03e
        [0x03] rec0=25 rec1=00 rec2=04 rec3=000
    tail 0x2173fddc8860c5891887b 0x42a00088462060003