DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦7c00843e4⟧ TextFile

    Length: 15541 (0x3cb5)
    Types: TextFile
    Names: »V«

Derivation

└─⟦bfaa708f6⟧ Bits:30000531 8mm tape, Rational 1000, INSIGHT 1_3_0
    └─ ⟦c51948655⟧ »DATA« 
        └─⟦c5f24cf34⟧ 
            └─⟦1b6f00508⟧ 
                └─⟦this⟧ 

TextFile

-- This package provides services to do 'windowless' insight operations.
-- Using the interfaces provided, one can create, print or delete diagrams
-- from the r1000 host. Programs created with this package can be run on
-- the r1000 in a batch mode without requiring user interaction to
-- control Insight from a workstation.

package Insight_Batch is

    -- Used to create and save a defining diagram.
    procedure Create_Defining_Diagram (Object_Naming_Expression : String := "";
                                       Diagram_Name : String := "<DEFAULT>";
                                       Caption : String := "";
                                       Diagram_Context : String := "$";
                                       Object_Context : String := "$";
                                       Overwrite : Boolean := True;
                                       Effort_Only : Boolean := False;
                                       Remote_Machine : String := "<DEFAULT>";
                                       Remote_Username : String := "<DEFAULT>";
                                       Response : String := "<PROFILE>");
--
-- Object_Naming_Expression
--                  This is a Rational environment object name. Wildcard
--                  naming is allowed however the name must resolve to a
--                  unique subsystem or object.
--
-- Diagram_Name     The simple name of the saved diagram.
--                  If "<DEFAULT>", the diagram will be saved as the
--                  Simple Ada name of the object unit with the suffix
--                  "_Diagram".
--
-- Caption          User supplied caption. The caption is saved with the
--                  diagram and can optionally be printed.
--
-- Diagram_Context  Environment context for storing and retrieving diagrams;
--                  defaults to the current directory.
--
-- Object_Context   Environment context for resolving Environment naming
--                  expressions; defaults to the current directory.
--
-- Overwrite        This switch controls the behavour of diagram generation
--                  If set to true and a there is a pre existing
--                  diagram with the diagram_context.diagram_name, it is
--                  deleted and a new diagram is generated and stored. If set
--                  false and there exists a pre existing diagram, a new
--                  diagram is not generated (essentially a  no op).
--
-- Effort_Only      This determines if the diagram is actually generated. If
--                  set to true, only the naming expressions for the object and
--                  diagram are verified.
--
-- Remote_Machine   Workstation for running layout. If "<DEFAULT>",
--                  it will be obtained from library switch Ftp.Remote_Machine
--                  then from session switch Session_Ftp.Remote_Machine.
--
-- Remote_Username  Username on the workstation. If "<DEFAULT>" is specified,
--                  it will be obtained from library switch Ftp.Username
--                  then from Rpc_Access_Utilities.Remote_Username the
--                  finally from the session username.
--
-- Response         Response profile for Environment messages, Activity,
--                  Remote_Passwords file, etc.
--
--                  Insight_Exceptions.Background_Error and
--                  Insight_Exceptiopns.Remote_Shell_Error
--                  can be raised by this procedure under control of the
--                  response profile.
--

    -- Used to create a non-defining diagram
    procedure Create_New_Diagram (Object_Naming_Expression : String := "@";
                                  Diagram_Name : String := ">>FILE NAME<<";
                                  Caption : String := "";
                                  Diagram_Context : String := "$";
                                  Object_Context : String := "$";
                                  Overwrite : Boolean := True;
                                  Effort_Only : Boolean := False;
                                  Remote_Machine : String := "<DEFAULT>";
                                  Remote_Username : String := "<DEFAULT>";
                                  Response : String := "<PROFILE>");
--
-- Like Create_Defining_Diagram but allows arbitrary objects to be
--                  encapsulated in a single diagram.
--
-- Object_Naming_Expression
--                  This is a Rational Environment object name. Wildcard
--                  naming is allowed.
--
-- Diagram_Name     The simple name of the saved diagram.
--                  This parameter must be supplied.
--
-- other parameters are as described in Create_Defining_Diagram.


    -- Used to delete diagram files. As in the interactive mode of INSIGHT,
    -- this ensures the file to be deleted appears to be a diagram file.
    -- Wildcards may be used in the diagram name and only diagram like files
    -- will be deleted.
    procedure Delete_Diagram (Diagram_Context : String := "$";
                              Diagram_Name : String := ">>FILE NAME<<";
                              Response : String := "<PROFILE>");

-- Diagram_Context  Environment context for deleting diagrams;
--                  defaults to the current directory.
--
-- Diagram_Name     The simple Ada name of the diagram to be deleted.
--                  Wildcard naming is provided to delete multiple diagrams,
--                  e.g. specifing a Diagram_Context of "!User.Fred" and a
--                  Diagram_Name of "@" will delete all diagrams
--                  in "!User.Fred".
--
-- Response         Response profile for Environment messages, Activity,
--                  Remote_Passwords file, etc.
--                  Background_Error can be raised by this procedure under
--                  control of the response profile.



    -- Used to generate printable Postscript files
    type Diagram_Orientation is (Best, Portrait, Landscape);

    type Measure is (Inches, Centimeters, Picas, Points);

    type Paper_Kind is
        record
            Units : Measure;
            Width : Float;
            Height : Float;
        end record;

    type Margin_Kind is
        record
            Units : Measure;
            Top : Float;
            Left : Float;
            Right : Float;
            Bottom : Float;
        end record;

    type Scale_Kind is
        record  
            Minimum : Integer;
            Maximum : Integer;
        end record;

    A0 : constant Paper_Kind := Paper_Kind'(Centimeters, 84.1, 118.9);
    A1 : constant Paper_Kind := Paper_Kind'(Centimeters, 59.4, 84.1);
    A2 : constant Paper_Kind := Paper_Kind'(Centimeters, 42.0, 59.4);
    A3 : constant Paper_Kind := Paper_Kind'(Centimeters, 29.7, 42.0);
    A4 : constant Paper_Kind := Paper_Kind'(Centimeters, 21.0, 29.7);
    A5 : constant Paper_Kind := Paper_Kind'(Centimeters, 14.8, 21.0);
    Us_Letter : constant Paper_Kind := Paper_Kind'(Inches, 8.5, 11.0);
    Us_Legal : constant Paper_Kind := Paper_Kind'(Inches, 8.5, 14.0);

    Us_Default_Margin : constant Margin_Kind :=
       Margin_Kind'(Inches, 1.0, 1.0, 1.0, 1.0);

    procedure Generate_Postscript
                 (Diagram_Context : String := "$";
                  Diagram_Name : String := ">>DIAGRAM NAME<<";
                  Ps_Name : String := "<DEFAULT>";
                  Remote_Machine : String := "<DEFAULT>";
                  Remote_Username : String := "<DEFAULT>";
                  Effort_Only : Boolean := False;
                  Orientation : Diagram_Orientation := Insight_Batch.Best;
                  Bitmap_Icons : Boolean := False;
                  Encapsulated_Postscript : Boolean := False;
                  Erase_Behind_Labels : Boolean := False;
                  Include_Description : Boolean := False;
                  Scale : Scale_Kind := Insight_Batch.Scale_Kind'
                                           (Minimum => 50, Maximum => 100);
                  Paper : Paper_Kind := Insight_Batch.Us_Letter;  
                  Margins : Margin_Kind := Insight_Batch.Us_Default_Margin;

                  Icon_Label_Font : String := "Helvetica";
                  Icon_Label_Size : Integer := 10;
                  Description_Label_Font : String := "Helvetica-Oblique";
                  Description_Label_Size : Integer := 10;
                  Caption_Font : String := "Helvetica";
                  Caption_Size : Integer := 14;
                  Page_Number_Font : String := "Helvetica";
                  Page_Number_Size : Integer := 6;

                  Response : String := "<PROFILE>");

-- Diagram_Context  Environment context for storing and retrieving diagrams;
--                  defaults to the current directory.
--
-- Diagram_Name     The simple name of the diagram to be printed.
--                  The diagram must already exist.
--
-- Ps_Name          The name of the resultant Postscript file. If the
--                  "<DEFAULT>" name is chosen, the name will be the
--                  Diagram_Name with the suffix "_Ps" appended.
--
-- Remote_Machine   Workstation for running layout. If "<DEFAULT>",
--                  it will be obtained from library switch Ftp.Remote_Machine
--                  then from session switch Session_Ftp.Remote_Machine.
--
-- Remote_Username  Username on the workstation. If "<DEFAULT>" is specified,
--                  it will be obtained from library switch Ftp.Username
--                  then from Rpc_Access_Utilities.Remote_Username the
--                  finally from the session username.
--
-- Effort_Only      If true then the procedure just validates the names
--                  of the diagram and print files.
--
-- Orientation      Describes how the diagram is to be placed on the page.
--                  'Best' selects the orientation that requires the fewest
--                  number of pages.
--
-- Bitmap_Icons     Controls how icons will be represented in the diagram.
--                  When true, will use bitmaps that look more like the screen
--                  display but dont scale well. When false use drawn icons.
--
-- Encapsulated_Postscript
--                  Defines what type of Postscript is to be generated. When
--                  true, produces diagrams that can be displayed on a single
--                  page. These diagrams may be included in other
--                  Postscript documents.
--
-- Erase_Behind_Labels
--                  When true will generate extra white space behind labels of
--                  icons to allow for easier reading.
--
-- Include_Description
--                  Controls printing of extra descritpion information on the
--                  diagram.
--
-- Scale            Specifies approximately the scale (in percent)
--                  to be used to print the diagram. The scale chose will be
--                  between the minimum and maximum that results in the fewest
--                  pages to be printed. A Scale of 100 will result in icons
--                  being about one inch high when printed.
--
-- Paper            Used to determine the size of the paper the diagram is
--                  intended to be printed on.
--
-- Margins          Specifies margin size on the page. Is interpreted in units
--                  as specified in the Paper parameter.
--
-- Icon_Label_Font  Specifies the character set and size (in points) to use to
-- Icon_Label_Size  print labels.
--
-- Description_Label_Font
-- Description_Label_Size
--                  Specifies the character set and size (in points) to use to
--                  print the description field (if so included).
--
-- Caption          Specifies the character set and size (in points) to use to
-- Caption_Size     print the caption (if so included).
--
-- Page_Number_Font Specifies the character set and size (in points) to use to
-- Page_Number_Size print the page number.
--
-- Response         As in Create_Defining_Diagram.



    procedure Generate_Postscript_Us_Letter
                 (Diagram_Context : String := "$";
                  Diagram_Name : String := ">>DIAGRAM NAME<<";
                  Ps_Name : String := "<DEFAULT>";
                  Remote_Machine : String := "<DEFAULT>";
                  Remote_Username : String := "<DEFAULT>";
                  Effort_Only : Boolean := False;
                  Response : String := "<PROFILE>");

-- A variation of Generate_Postscript that has the popular default parameters
-- set as follows:
--  Orientation => Best
--  Bitmap_Icons => False;
--  Encapsulated_Postscript => False;
--  Erase_Behind_Labels => False;
--  Include_Description => False;
--  Scale => (Minimum => 50, Maximum => 100);
--  Paper => Insight_Batch.Us_Letter;
--  Margins => Insight_Batch.Us_Default_Margin;
--
--  Label_Font => "Helvetica";
--  Label_Size => 10;
--  Description_Field_Font => "Helvetica-Oblique";
--  Description_Field_Size => 10;
--  Caption_Font => "Helvetica";
--  Caption_Size => 14;
--  Page_Number_Font => "Helvetica";
--  Page_Number_Size => 6;



--  Used to generate Postscript then queue it to the print spooler. The
--  generated Postscript is NOT saved.
    procedure Queue_Postscript
                 (Diagram_Context : String := "$";
                  Diagram_Name : String := ">>DIAGRAM NAME<<";
                  Printer : String := "<DEFAULT>";
                  Remote_Machine : String := "<DEFAULT>";
                  Remote_Username : String := "<DEFAULT>";
                  Effort_Only : Boolean := False;
                  Orientation : Diagram_Orientation := Insight_Batch.Best;
                  Bitmap_Icons : Boolean := False;
                  Encapsulated_Postscript : Boolean := False;
                  Erase_Behind_Labels : Boolean := False;
                  Include_Description : Boolean := False;
                  Scale : Scale_Kind := Insight_Batch.Scale_Kind'
                                           (Minimum => 50, Maximum => 100);
                  Paper : Paper_Kind := Insight_Batch.Us_Letter;  
                  Margins : Margin_Kind := Insight_Batch.Us_Default_Margin;

                  Icon_Label_Font : String := "Helvetica";
                  Icon_Label_Size : Integer := 10;
                  Description_Label_Font : String := "Helvetica-Oblique";
                  Description_Label_Size : Integer := 10;
                  Caption_Font : String := "Helvetica";
                  Caption_Size : Integer := 14;
                  Page_Number_Font : String := "Helvetica";
                  Page_Number_Size : Integer := 6;

                  Response : String := "<PROFILE>");

-- Printer          Names a Queue or Device on which to spool the diagram.
--                  If <DEFAULT> is specified the printer is selected using
--                  the following.
--                  If the Environment is D_12_5_0 or higher and was
--                  initialized using standard procedures, the default name
--                  comes from
--                  !machine.initialization.local.user_printer_map       then
--                  !machine.initialization.site.printer_configuration   then
--                  !machine.initialization.local.printer_configuration  else
--                  queue.default
--                  If the Environment is lower than D_12_5_0 then the default
--                  comes from
--                  queue.default
--
-- Others           All other parameters are as described in
--                  Generate_Postscript above.


end Insight_Batch;