|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 2964 (0xb94)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Text_Io;
with Bounded_String;
with Bug;
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));
exception
when Symbol_Map.Undefined =>
raise Bug.Undefined_Name_In_Symbol_Table;
end Eval;
procedure In_Text (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.Class'Image (Object.Get_Class (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 In_Text;
end Table;