|
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 - download
Length: 23552 (0x5c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Set_Method, package body T_Method, seg_05595e, seg_055961
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with String_Utilities; with Bounded_String; with Text_Manager; package body Set_Method is package body T_Method is procedure Initialize (This_Method : in out Method; Name : Com_Defs.V_String; Parameter : Com_Defs.V_String; Number : Com_Defs.V_String) is begin This_Method.Name := Name; This_Method.Parameter := Parameter; This_Method.Number := Number; end Initialize; --***************************************************************************** function Get_Name (Of_This_Method : Method) return Com_Defs.V_String is begin return Of_This_Method.Name; end Get_Name; --***************************************************************************** function Get_Parameter (Of_This_Method : Method) return Com_Defs.V_String is begin return Of_This_Method.Parameter; end Get_Parameter; --***************************************************************************** end T_Method; --***************************************************************************** function Create_A_Set_Of_Methods return Set_Of_Methods.Set is The_Set : Set_Of_Methods.Set; begin Set_Of_Methods.Initialize (S => The_Set); return The_Set; end Create_A_Set_Of_Methods; --***************************************************************************** procedure Add (This_Method : T_Method.Method; In_This_Set : in out Set_Of_Methods.Set) is begin Set_Of_Methods.Add (S => In_This_Set, X => This_Method); end Add; --***************************************************************************** procedure Delete (This_Method : T_Method.Method; From_This_Set : in out Set_Of_Methods.Set) is begin Set_Of_Methods.Delete (S => From_This_Set, X => This_Method); end Delete; --***************************************************************************** function Is_Empty (This_Set : in Set_Of_Methods.Set) return Boolean is begin return Set_Of_Methods.Is_Empty (S => This_Set); end Is_Empty; --***************************************************************************** function Find (This_Method : T_Method.Method; In_This_Set : in Set_Of_Methods.Set) return Boolean is My_Iterator : Set_Of_Methods.Iterator; Response, Out_While : Boolean := False; Temp_Method : T_Method.Method; begin Set_Of_Methods.Init (Iter => My_Iterator, S => In_This_Set); while ((not (Out_While)) and (not (Set_Of_Methods.Done (Iter => My_Iterator)))) loop Temp_Method := Set_Of_Methods.Value (Iter => My_Iterator); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp_Method.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp_Method.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp_Method.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then Response := True; Out_While := True; end if; Set_Of_Methods.Next (Iter => My_Iterator); end loop; return Response; -- begin -- if not Set_Of_Methods.Is_Empty (S => In_This_Set) then -- return Set_Of_Methods.Is_Member -- (S => In_This_Set, X => This_Method); -- else -- return False; -- end if; end Find; --***************************************************************************** function Find (This_Method_Name : Com_Defs.V_String; In_This_Set : Set_Of_Methods.Set) return Boolean is My_Iterator : Set_Of_Methods.Iterator; Response, Out_While : Boolean := False; Temp_Method : T_Method.Method; begin Set_Of_Methods.Init (Iter => My_Iterator, S => In_This_Set); while ((not (Out_While)) and (not (Set_Of_Methods.Done (Iter => My_Iterator)))) loop Temp_Method := Set_Of_Methods.Value (Iter => My_Iterator); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp_Method.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method_Name)), Ignore_Case => True))) then Response := True; Out_While := True; end if; Set_Of_Methods.Next (Iter => My_Iterator); end loop; return Response; end Find; --***************************************************************************** function Is_Marked_As_Lost (This_Method : T_Method.Method; In_This_Set : in Set_Of_Methods.Set) return Boolean is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then return Temp.Lost; end if; Set_Of_Methods.Next (I); end loop; end Is_Marked_As_Lost; --***************************************************************************** function Is_Marked_As_Used (This_Method : T_Method.Method; In_This_Set : in Set_Of_Methods.Set) return Boolean is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then return Temp.Used; end if; Set_Of_Methods.Next (I); end loop; end Is_Marked_As_Used; --***************************************************************************** procedure Mark_As_Used (This_Method : in out T_Method.Method; In_This_Set : in out Set_Of_Methods.Set) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then Set_Of_Methods.Delete (S => In_This_Set, X => Temp); Temp.Used := True; Set_Of_Methods.Add (In_This_Set, Temp); end if; Set_Of_Methods.Next (I); end loop; end Mark_As_Used; --***************************************************************************** procedure Unmark_As_Used (This_Method : in out T_Method.Method; In_This_Set : in out Set_Of_Methods.Set) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then Set_Of_Methods.Delete (S => In_This_Set, X => Temp); Temp.Used := False; Set_Of_Methods.Add (In_This_Set, Temp); end if; Set_Of_Methods.Next (I); end loop; end Unmark_As_Used; --***************************************************************************** procedure Mark_As_Lost (This_Method : in out T_Method.Method; In_This_Set : in out Set_Of_Methods.Set) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then Set_Of_Methods.Delete (S => In_This_Set, X => Temp); Temp.Lost := True; Set_Of_Methods.Add (In_This_Set, Temp); end if; Set_Of_Methods.Next (I); end loop; end Mark_As_Lost; --***************************************************************************** procedure Unmark_As_Lost (This_Method : in out T_Method.Method; In_This_Set : in out Set_Of_Methods.Set) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, In_This_Set); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); if ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Name)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Parameter)), Ignore_Case => True))) and then ((String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Number)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method.Number)), Ignore_Case => True))) then Set_Of_Methods.Delete (S => In_This_Set, X => Temp); Temp.Lost := False; Set_Of_Methods.Add (In_This_Set, Temp); end if; Set_Of_Methods.Next (I); end loop; end Unmark_As_Lost; --***************************************************************************** procedure Get_All_Method (This_Method_Name : Com_Defs.V_String; From_This_Set : Set_Of_Methods.Set; Tab : in out Method_Array) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; Index : Integer := Tab'First; Oust : Boolean := False; begin Set_Of_Methods.Init (Iter => I, S => From_This_Set); while (not (Oust) and not (Set_Of_Methods.Done (Iter => I))) loop Temp := Set_Of_Methods.Value (Iter => I); if not (Temp.Used) and then not (Temp.Lost) and then (String_Utilities.Equal (Str1 => Bounded_String.Image (Bounded_String.Variable_String (Temp.Name)), Str2 => Bounded_String.Image (Bounded_String.Variable_String (This_Method_Name)), Ignore_Case => True) and Index in Tab'Range) then Tab (Index) := Temp; if Index = Tab'Last then Oust := True; else Index := Index + 1; end if; end if; Set_Of_Methods.Next (Iter => I); end loop; end Get_All_Method; procedure Print (The_Method : in Set_Of_Methods.Set) is I : Set_Of_Methods.Iterator; Temp : T_Method.Method; begin Set_Of_Methods.Init (I, The_Method); while not Set_Of_Methods.Done (I) loop Temp := Set_Of_Methods.Value (I); Text_Manager.Text.Put_Line ("method : "); Text_Manager.Text.Put_Line (" name : " & Bounded_String.Image (Bounded_String.Variable_String (Temp.Name))); Text_Manager.Text.Put_Line (" parameter : " & Bounded_String.Image (Bounded_String.Variable_String (Temp.Parameter))); Text_Manager.Text.Put_Line (" number : " & Bounded_String.Image (Bounded_String.Variable_String (Temp.Number))); Text_Manager.Text.Put_Line (" used : " & Boolean'Image (Temp.Used)); Text_Manager.Text.Put_Line (" lost : " & Boolean'Image (Temp.Lost)); Set_Of_Methods.Next (I); end loop; end Print; end Set_Method;
nblk1=16 nid=0 hdr6=2c [0x00] rec0=1d rec1=00 rec2=01 rec3=072 [0x01] rec0=01 rec1=00 rec2=16 rec3=002 [0x02] rec0=1c rec1=00 rec2=02 rec3=06e [0x03] rec0=17 rec1=00 rec2=03 rec3=07e [0x04] rec0=13 rec1=00 rec2=04 rec3=05c [0x05] rec0=18 rec1=00 rec2=05 rec3=024 [0x06] rec0=13 rec1=00 rec2=06 rec3=044 [0x07] rec0=18 rec1=00 rec2=07 rec3=05e [0x08] rec0=15 rec1=00 rec2=08 rec3=000 [0x09] rec0=15 rec1=00 rec2=09 rec3=056 [0x0a] rec0=15 rec1=00 rec2=0a rec3=078 [0x0b] rec0=14 rec1=00 rec2=0b rec3=038 [0x0c] rec0=15 rec1=00 rec2=0c rec3=02e [0x0d] rec0=13 rec1=00 rec2=0d rec3=072 [0x0e] rec0=15 rec1=00 rec2=0e rec3=06a [0x0f] rec0=14 rec1=00 rec2=0f rec3=02e [0x10] rec0=15 rec1=00 rec2=10 rec3=014 [0x11] rec0=13 rec1=00 rec2=11 rec3=06c [0x12] rec0=15 rec1=00 rec2=12 rec3=05c [0x13] rec0=15 rec1=00 rec2=13 rec3=024 [0x14] rec0=19 rec1=00 rec2=14 rec3=03e [0x15] rec0=0a rec1=00 rec2=15 rec3=001 tail 0x217604c3687be6c91bf7e 0x42a00088462060003