|
|
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: 11264 (0x2c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Request, seg_0267ed, seg_0267ef, seg_026d1d
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
-------------------------------------------------------------------------------
with Umps_Defs;
with Wild_String;
with Slot;
with Set;
with Text_Io;
-- toot
package body Request is
Tabulation : constant String (1 .. 15) := (others => ' ');
---------------------------------------------------------------------------
procedure Add_Sender (Behavior : Umps_Defs.Behavior_Number;
Into : in out Element) is
begin
Into.Sender := Behavior;
end Add_Sender;
---------------------------------------------------------------------------
procedure Add_Handler (Behavior : Umps_Defs.Behavior_Number;
Into : in out Element) is
begin
Into.Handler := Behavior;
end Add_Handler;
---------------------------------------------------------------------------
procedure Add_Method (Method : String; Into : in out Element) is
begin
if (not Set.Is_Empty (Into.Params)) then
Set.Free (Into.Params);
end if;
Into.Method := Umps_Defs.Normalize (The_Name => Method);
end Add_Method;
---------------------------------------------------------------------------
procedure Add_Params (Params : Set.Object; Into : in out Element) is
function Is_Name_Less is new Slot.Is_Less (Field => Slot.On_Name);
procedure Sort_All is new Set.Sort ("<" => Is_Name_Less);
begin
Into.Params := Params;
Sort_All (Into.Params);
end Add_Params;
---------------------------------------------------------------------------
procedure Add_Param (Param : Slot.Element; Into : in out Element) is
function Is_Name_Less is new Slot.Is_Less (Field => Slot.On_Name);
procedure Sort_All is new Set.Sort ("<" => Is_Name_Less);
begin
Into.Params := Set.Add (Param, Into => Into.Params);
Sort_All (Into.Params);
end Add_Param;
---------------------------------------------------------------------------
function Sender (Of_The_Element : Element)
return Umps_Defs.Behavior_Number is
begin
return Of_The_Element.Sender;
end Sender;
---------------------------------------------------------------------------
function Handler (Of_The_Element : Element)
return Umps_Defs.Behavior_Number is
begin
return Of_The_Element.Handler;
end Handler;
---------------------------------------------------------------------------
function Method (Of_The_Element : Element) return String is
begin
return Umps_Defs.Denormalize (Of_The_Element.Method);
end Method;
---------------------------------------------------------------------------
function Params (Of_The_Element : Element) return Set.Object is
begin
return Of_The_Element.Params;
end Params;
---------------------------------------------------------------------------
function Param (Of_The_Element : Element; With_Name : String)
return Slot.Element is
The_Element : Slot.Element;
Iter : Set.Iterator;
begin
Set.Init (Iter, Of_The_Element.Params);
while (not Set.Done (Iter, Of_The_Element.Params)) loop
The_Element := Set.Value (Iter, Of_The_Element.Params);
if (Slot.Name_Of (The_Element) = With_Name) then
return The_Element;
end if;
Set.Next (Iter, Of_The_Element.Params);
end loop;
return Slot.Make ("", Slot.Void);
end Param;
---------------------------------------------------------------------------
function Image (The_Element : Element) return String is
function Image_Of is new Set.Image (Separator, Image => Slot.Image);
begin
return Umps_Defs.Behavior_Number'Image (Sender (The_Element)) &
Separator &
Umps_Defs.Behavior_Number'Image (Handler (The_Element)) &
Separator &
Method (The_Element) &
Separator &
Image_Of (Params (The_Element));
end Image;
---------------------------------------------------------------------------
procedure Display (The_Element : Element; String_Before : String := "") is
procedure Display_All is new Set.Display (Display => Slot.Display);
begin
Text_Io.Put_Line (String_Before & "Class => " &
Umps_Defs.Class_Request);
Text_Io.Put_Line (String_Before & " Sender => " &
Umps_Defs.Behavior_Number'Image
(Sender (The_Element)));
Text_Io.Put_Line (String_Before & " Handler => " &
Umps_Defs.Behavior_Number'Image
(Handler (The_Element)));
Text_Io.Put_Line (String_Before & " Method => " &
Method (The_Element));
Text_Io.Put_Line (String_Before & " Parameters => ");
Display_All (Params (The_Element), String_Before & Tabulation);
end Display;
---------------------------------------------------------------------------
function Is_Equal (Left, Right : Element) return Boolean is
The_Same : Boolean;
begin
The_Same := Sender (Left) = Sender (Right) and then
Handler (Left) = Handler (Right) and then
Wild_String.Is_Equal (Method (Left), Method (Right));
if (not The_Same) then
return False;
elsif (Slot."=" (Field, Slot.On_None)) then
return True;
else
Compare_Parameters:
declare
function Is_Field_Equal is
new Slot.Is_Equal (Field => Field);
function Is_Object_Equal is
new Set.Is_Equal (Is_Equal => Is_Field_Equal);
begin
return Is_Object_Equal (Params (Right), Params (Left));
end Compare_Parameters;
end if;
end Is_Equal;
end Request;
-------------------------------------------------------------------------------
nblk1=a
nid=0
hdr6=14
[0x00] rec0=22 rec1=00 rec2=01 rec3=004
[0x01] rec0=00 rec1=00 rec2=0a rec3=00e
[0x02] rec0=18 rec1=00 rec2=09 rec3=010
[0x03] rec0=03 rec1=00 rec2=08 rec3=072
[0x04] rec0=1e rec1=00 rec2=02 rec3=080
[0x05] rec0=19 rec1=00 rec2=06 rec3=006
[0x06] rec0=00 rec1=00 rec2=05 rec3=01a
[0x07] rec0=14 rec1=00 rec2=07 rec3=060
[0x08] rec0=17 rec1=00 rec2=04 rec3=05a
[0x09] rec0=0b rec1=00 rec2=03 rec3=001
tail 0x215204f9e83ab3d097744 0x42a00088462063c03