|
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: 12288 (0x3000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Analyze_Views, seg_00448f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Log; with Profile; with Common; with Add_Object_Hyper_Table; with Create_Null_Document; with Directory_Renames; use Directory_Renames; with Errors; with Simple_Status; with Directory_Miscellaneous; with Object_Info; package body Analyze_Views is package Cmvc_Info renames Object_Info.Cmvc; procedure Add (Views_Within : String := ""; Expand_Imports_And_Referencers : Boolean := False; To_Document : in out Abstract_Document.Handle; Response : String := "<PROFILE>") is Units_Iter : Object.Iterator := Naming.Resolution (Views_Within); type Columns is (Subsystem, S_Kind, View, Imp, Ref, Model, V_Kind); Parent_Subsystem : Object.Handle; The_Model : Object.Handle; The_Imports : Object.Iterator; The_Referencers : Object.Iterator; function Is_Integer_Column (C : Columns) return Boolean is begin case C is when Subsystem | View | Model | V_Kind | S_Kind => return False; when Imp | Ref => return True; end case; end Is_Integer_Column; function Is_Included (Obj : Object.Handle) return Boolean is begin if Object_Info.Any.Is_View (Obj) then Parent_Subsystem := Traversal.Enclosing_World (Obj); The_Model := Cmvc_Info.Model_For (Obj); The_Imports := Cmvc_Info.Imports_For (Obj, False); if Object_Info.Any.Is_Spec_View (Obj) then The_Referencers := Cmvc_Info.Referencers_Of (Obj, False); else The_Referencers := Object.Create; end if; return True; else return False; end if; end Is_Included; function Continue_Traversal (Obj : Object.Handle) return Boolean is Parent : Object.Handle := Traversal.Parent (Obj); begin -- don't look inside views. Views cannot be nested. if Object_Info.Any.Is_Subsystem (Parent) or else Object_Info.Any.Is_View (Parent) then return False; else return True; end if; end Continue_Traversal; function Column_Image (C : Columns; Obj : Object.Handle) return String is begin case C is when Subsystem => return Naming.Simple_Name (Parent_Subsystem); when S_Kind => if Cmvc_Info.Is_Primary (Parent_Subsystem) then return "Primry"; else return "Second"; end if; when View => return Naming.Simple_Name (Obj); when V_Kind => if Object_Info.Any.Is_Working_Load_View (Obj) then return "WORKING"; elsif Object_Info.Any.Is_Released_Load_View (Obj) then return "RELEASED"; elsif Object_Info.Any.Is_Code_Only_Load_View (Obj) then return "CODE"; elsif Object_Info.Any.Is_Spec_View (Obj) then return "SPEC"; elsif Object_Info.Any.Is_Combined_View (Obj) then return "COMBINED"; else return "UNKNOWN"; end if; when Model => return Naming.Simple_Name (The_Model); when Imp => return Integer'Image (Directory_Miscellaneous.Count (The_Imports)); when Ref => return Integer'Image (Directory_Miscellaneous.Count (The_Referencers)); end case; end Column_Image; function Explanation (C : Columns; Obj : Object.Handle) return String is begin case C is when Subsystem => return "Susystem Name"; when S_Kind => return "Kind of subsystem; Primary or Secondary"; when View => return "View Name"; when V_Kind => return "The Kind of view"; when Model => return "Name of the view's model"; when Imp => return "Number of imported subsystems"; when Ref => if Object_Info.Any.Is_Spec_View (Obj) then return "Number of other views referencing this view"; else return "Only spec views have referencers"; end if; end case; end Explanation; procedure Linkage (C : Columns; Obj : Object.Handle; Linkage_Object : out Object.Handle; Linkage_Objects : out Object.Iterator) is begin -- default values changed within the case statement as necessary Linkage_Object := Object.Nil; Linkage_Objects := Object.Create; case C is when Subsystem => Linkage_Object := Parent_Subsystem; when S_Kind => Linkage_Object := Parent_Subsystem; when View => Linkage_Object := Obj; when V_Kind => Linkage_Object := Obj; when Model => Linkage_Oject := The_Model; when Imp => Linkage_Objects := The_Imports; when Ref => Linkage_Objects := The_Referencers; end case; end Linkage; procedure Add_Hyper_Table_To_Doc is new Add_Object_Hyper_Table (Is_Included, Continue_Traversal, Columns, Is_Integer_Column, Column_Image, Explanation, Linkage, Table_Title => "Subsystem Information"); begin if Object.Is_Bad (Units_Iter) then Log.Put_Line (Views_Within & " is not a valid pathname", Profile.Error_Msg); else Add_Hyper_Table_To_Doc (Units_Iter, To_Document, Response); end if; end Add; procedure Display (Views_Within : String := ""; Expand_Imports_And_Referencers : Boolean := False; To_Preview_Object : String := "View_Info"; Response : String := "<PROFILE>") is Document : Abstract_Document.Handle; Condition : Errors.Condition; begin Create_Null_Document (Named => To_Preview_Object, Error_Info => Condition, Document_Handle => Document); case Errors.Severity (Condition) is when Simple_Status.Problem | Simple_Status.Fatal => Log.Put_Line ("Problem creating object " & To_Preview_Object & ". " & Errors.Info (Condition), Profile.Error_Msg); when others => Add (Views_Within, Expand_Imports_And_Referencers, Document, Response); Abstract_Document.Close (Document); Common.Definition (To_Preview_Object); end case; end Display; end Analyze_Views;
nblk1=b nid=0 hdr6=16 [0x00] rec0=22 rec1=00 rec2=01 rec3=002 [0x01] rec0=19 rec1=00 rec2=0a rec3=03a [0x02] rec0=00 rec1=00 rec2=02 rec3=032 [0x03] rec0=1b rec1=00 rec2=03 rec3=004 [0x04] rec0=14 rec1=00 rec2=04 rec3=034 [0x05] rec0=18 rec1=00 rec2=05 rec3=01c [0x06] rec0=18 rec1=00 rec2=06 rec3=03a [0x07] rec0=00 rec1=00 rec2=0b rec3=002 [0x08] rec0=16 rec1=00 rec2=07 rec3=072 [0x09] rec0=16 rec1=00 rec2=08 rec3=082 [0x0a] rec0=09 rec1=00 rec2=09 rec3=000 tail 0x215003804815c64382518 0x42a00088462061e03