|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Build_Interchange_Package_Spec, seg_020c17, separate Rpc_Io
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
separate (Rpc_Io)
procedure Build_Interchange_Package_Spec (From_Db : Analysis.Database;
Named_With_Root : String;
In_File : Io.File_Type) is
Types_Iter : Analysis.Unique_Type_Iterator;
Ref_Package_Iter : Analysis.Reference_Iterator;
Decl : Analysis.Type_Decl;
procedure Put (Line : String; Line_Feeds : Natural := 0) is
begin
Io.Put (In_File, Line);
if Line_Feeds > 0 then
Io.New_Line (File => In_File,
Spacing => Io.Positive_Count (Line_Feeds));
end if;
end Put;
use Rpc_Conventions;
begin
Put (Ada_Io.Make_With_Clause ("Transport_Stream"));
-- Add with clauses to units referenced by the package:
-- This may add redundant clauses
Analysis.Init (From_Db, Ref_Package_Iter);
while not Analysis.Done (Ref_Package_Iter) loop
Put (Ada_Io.Make_With_Clause (Analysis.Reference (Ref_Package_Iter)));
Analysis.Next (Ref_Package_Iter);
end loop;
Put (Ada_Io.Make_Package (Rpc_Names.Interchange_Package (Named_With_Root),
Ada_Io.Spec_Part), 1);
Analysis.Init (From_Db, Types_Iter);
-- add Interchange Put and Get subprogram for all unique, non-predefined
-- types
while not Analysis.Done (Types_Iter) loop
Decl := Analysis.Decl (Types_Iter);
if not Is_Predefined (Decl) then
Put (Ada_Io.Make_Procedure
(Name => "Put",
Kind => Ada_Io.Spec_Part,
Parameters_Image =>
"Into : Transport_Stream.Stream_Id; " & Ascii.Lf &
"Data : " & Analysis.Reference (Decl)), 1);
if Is_Constrained (Decl) then
Put (Ada_Io.Make_Procedure
(Name => "Get",
Kind => Ada_Io.Spec_Part,
Parameters_Image =>
"From : Transport_Stream.Stream_Id; " & Ascii.Lf &
"Data : out " & Analysis.Reference (Decl)), 1);
else
-- unconstrained types have a function call
Put (Ada_Io.Make_Function
(Name => "Get",
Kind => Ada_Io.Spec_Part,
Parameters_Image =>
"From : Transport_Stream.Stream_Id",
Return_Expression => Analysis.Reference (Decl)), 1);
end if;
end if;
Analysis.Next (Types_Iter);
end loop;
Put (Ada_Io.Make_End);
end Build_Interchange_Package_Spec;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=1c rec1=00 rec2=01 rec3=01e
[0x01] rec0=00 rec1=00 rec2=04 rec3=00c
[0x02] rec0=19 rec1=00 rec2=02 rec3=040
[0x03] rec0=17 rec1=00 rec2=03 rec3=000
tail 0x2151c826e838d45cad02f 0x42a00088462061e03