DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦265960560⟧ TextFile

    Length: 2848 (0xb20)
    Types: TextFile
    Names: »B«

Derivation

└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;  
with Bounded_String;
package body Table is

    procedure Insert (The_Table : in out Symbol_Kind;
                      Name : Message.Tiny_String;
                      New_Reference : Object.Reference) is
    begin
        Symbol_Map.Define (The_Map => The_Table.Map,
                           D => Bounded_String.Image (V => Name),
                           R => New_Reference,
                           Trap_Multiples => False);
    end Insert;

    procedure Find (The_Table : Symbol_Kind;
                    Name : Message.Tiny_String;
                    New_Reference : in out Object.Reference;
                    Success : out Boolean) is

    begin
        Symbol_Map.Find (The_Map => The_Table.Map,
                         D => Bounded_String.Image (Name),
                         R => New_Reference,
                         Success => Success);
    end Find;

    procedure Remove (The_Table : in out Symbol_Kind;
                      Name : Message.Tiny_String) is
    begin
        Symbol_Map.Undefine (The_Map => The_Table.Map,
                             D => Bounded_String.Image (V => Name));

    end Remove;

    function Is_Empty (The_Table : Symbol_Kind) return Boolean is
    begin
        return Symbol_Map.Is_Empty (The_Map => The_Table.Map);
    end Is_Empty;

    procedure Initialize (The_Table : in out Symbol_Kind) is
    begin  
        Symbol_Map.Initialize (The_Map => The_Table.Map);
    end Initialize;

    function Eval (The_Table : Symbol_Kind; Name : Message.Tiny_String)
                  return Object.Reference is
    begin
        return Symbol_Map.Eval (The_Map => The_Table.Map,
                                D => Bounded_String.Image (Name));
    end Eval;


    procedure En_Texte (The_Table : Symbol_Kind) is
        Iterator : Symbol_Map.Iterator;
        The_Object : Object.Reference;
    begin
        Iterator := The_Table.Iter;
        Symbol_Map.Init (Iter => Iterator, The_Map => The_Table.Map);
        Text_Io.Put_Line ("TABLE DES SYMBOLES");
        Text_Io.Put_Line ("==================");
        Text_Io.New_Line;
        while not Symbol_Map.Done (Iter => Iterator) loop  
            Text_Io.Put ("I: ");  
            Text_Io.Put (Symbol_Map.Value (Iter => Iterator));
            Text_Io.Set_Col (25);
            Text_Io.Put (" Classe : ");  
            The_Object := Symbol_Map.Eval
                             (The_Table.Map, (Symbol_Map.Value
                                                 (Iter => Iterator)));
            Text_Io.Put (Object.Classe'Image (Object.Get_Classe (The_Object)));
            Text_Io.Set_Col (50);
            Text_Io.Put (" ID_Objet :==> ");
            Text_Io.Put_Line (Integer'Image (Object.Get_Value (The_Object)));
            Symbol_Map.Next (Iter => Iterator);
        end loop;
    end En_Texte;
end Table;