DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦7a47ed541⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Activity_Implementation, pragma Module_Name 4 2909, pragma Segmented_Heap Handle_Ref, pragma Subsystem Directory, seg_028454

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Action;
with Directory;

package Activity_Implementation is

    -- An Activity maps a subsystem to a spec view and a non-spec view of
    -- that subsystem.


    pragma Subsystem (Directory, Closed);
    pragma Module_Name (4, 2909);


    subtype Activity_Id  is Directory.Object;
    subtype Subsystem_Id is Directory.Object;
    subtype Spec_View_Id is Directory.Object;
    subtype Load_View_Id is Directory.Object;

    function Null_Activity  return Activity_Id  renames Directory.Nil;
    function Null_Subsystem return Subsystem_Id renames Directory.Nil;
    function Null_Spec_View return Spec_View_Id renames Directory.Nil;
    function Null_Load_View return Load_View_Id renames Directory.Nil;

    type Activity_Handle is limited private;



    function Current return Activity_Id;
    -- returns Activity currently associated with this job; if no Activity
    -- has been associated with this job, then returns Activity currently
    -- associated with this sesssion.

    procedure Set (Activity : Activity_Id);
    -- make Activity the current activity for this job only

    procedure Set_Default (Activity : Activity_Id);
    -- make Activity the current activity for this job and session



    function Nil return Activity_Handle;

    function Is_Nil (Handle : Activity_Handle) return Boolean;

    procedure Open (Activity       :        Activity_Id;
                    Handle         : in out Activity_Handle;
                    Status         : out    Directory.Error_Status;
                    Action_Id      :        Action.Id := Action.Null_Id;
                    For_Update     :        Boolean   := False;
                    Prevent_Create :        Boolean   := False);

    procedure Close (Handle : in out Activity_Handle;
                     Status : out    Directory.Error_Status);
    --
    -- An open/close protocol is used to deal with the problem of concurrent
    -- access to activities. A new version of the activity will be created
    -- when an Activity_Id is opened For_Update unless Prevent_Create is
    -- set to True


    pragma Consume_Offset (1);


    function Enclosing_View (Unit : Directory.Ada.Unit) return Directory.Object;
    --
    -- returns either a Spec_View_Id or a Load_View_Id.

    function Enclosing_Subsystem
                (View_Id : Directory.Object) return Subsystem_Id;
    --
    -- takes either a Spec_View_Id or a Load_View_Id



    procedure Create (New_Activity :     String;
                      Action_Id    :     Action.Id;
                      Status       : out Directory.Error_Status;
                      New_Id       : out Activity_Id);


    type Creation_Mode is (Differential, Exact_Copy, Value_Copy);

    procedure Create (New_Activity :     String;
                      From         :     Activity_Handle;
                      Status       : out Directory.Error_Status;
                      New_Id       : out Activity_Id;
                      Mode         :     Creation_Mode := Exact_Copy);
    --
    -- Create New_Activity based on the contents of From (and using Action_Id
    -- associated with From)

    procedure Add_Subsystem (Subsystem : Subsystem_Id;
                             Load_View : Load_View_Id := Null_Load_View;
                             Spec_View : Spec_View_Id := Null_Spec_View;
                             Handle    : Activity_Handle);
    -- Add a subsystem to the domain of an activity. If both a load view
    -- and a spec view are specified they must both have the same target
    -- key.

    procedure Remove_Subsystem
                 (Subsystem : Subsystem_Id; Handle : Activity_Handle);

    -- Remove a subsystem from the domain of an activity. This version of
    -- Remove_Subsystem removes all entries for the specified subsystem
    -- regardless of target key.

    function Has_Subsystem (Subsystem : Subsystem_Id; Handle : Activity_Handle)
                           return Boolean;

    -- Test subsystem's membership in domain of an activity. This version
    -- tests for the existence of any entry for the subsystem independent of
    -- target key.


    function Get_Spec_View (Subsystem : Subsystem_Id; Handle : Activity_Handle)
                           return Spec_View_Id;

    function Get_Load_View (Subsystem : Subsystem_Id; Handle : Activity_Handle)
                           return Load_View_Id;

    procedure Set_Spec_View (Spec_View : Spec_View_Id;
                             Handle    : Activity_Handle);

    procedure Set_Load_View (Load_View : Load_View_Id;
                             Handle    : Activity_Handle);


    function  Get_Spec_View_Source (Subsystem : Subsystem_Id;  
                                    Handle : Activity_Handle) return Activity_Id;
    function  Get_Load_View_Source (Subsystem : Subsystem_Id;  
                                    Handle : Activity_Handle) return Activity_Id;
    procedure Set_Spec_View_Source (Subsystem : Subsystem_Id;
                                    Source    : Activity_Id;
                                    Handle    : Activity_Handle);

    procedure Set_Load_View_Source (Subsystem : Subsystem_Id;
                                    Source    : Activity_Id;
                                    Handle    : Activity_Handle);

    procedure Get_Spec_Value (Subsystem :     Subsystem_Id;
                              Indirect  : out Boolean;
                              Value     : out Directory.Object;
                              Handle    :     Activity_Handle);

    procedure Get_Load_Value (Subsystem :     Subsystem_Id;
                              Indirect  : out Boolean;
                              Value     : out Directory.Object;
                              Handle    :     Activity_Handle);

    procedure Get_Values (Subsystem     :     Subsystem_Id;
                          Spec_Indirect : out Boolean;
                          Spec_Value    : out Directory.Object;
                          Load_Indirect : out Boolean;
                          Load_Value    : out Directory.Object;
                          Handle        :     Activity_Handle);

    procedure Set_Spec_Value (Subsystem : Subsystem_Id;
                              Indirect  : Boolean;
                              Value     : Directory.Object;
                              Handle    : Activity_Handle);

    procedure Set_Load_Value (Subsystem : Subsystem_Id;
                              Indirect  : Boolean;
                              Value     : Directory.Object;
                              Handle    : Activity_Handle);

    procedure Set_Values (Subsystem     : Subsystem_Id;
                          Spec_Indirect : Boolean;
                          Spec_Value    : Directory.Object;
                          Load_Indirect : Boolean;
                          Load_Value    : Directory.Object;
                          Handle        : Activity_Handle);

    Undefined : exception;



    type Handle_Ref is access Activity_Handle;
    pragma Segmented_Heap (Handle_Ref);

    type Iterator is limited private;
    procedure Init          (Iter : out Iterator; Handle : Handle_Ref);
    procedure Next          (Iter : in out Iterator);
    function  Done          (Iter : Iterator) return Boolean;
    function  Get_Subsystem (Iter : Iterator) return Subsystem_Id;


    function Is_Activity (File : Directory.Object) return Boolean;


    pragma Consume_Offset (3);


    function Is_Valid (Value    : Directory.Object;  
                       Activity : Activity_Id;
                       As_View  : Boolean := False;
                       As_Spec  : Boolean := False) return Boolean;

    -- Verifies that the given value satisfies all consistency conditions
    -- imposed on entries within the given activity.

    function Diagnose (Value    : Directory.Object;  
                       Activity : Activity_Id;
                       As_View  : Boolean := False;
                       As_Spec  : Boolean := False) return String;

    -- Verifies that the given value satisfies all consistency conditions
    -- imposed on entries within the given activity and composes a
    -- reason why it is invalid. Returns the null string if it is valid.


    function Get_Activity_Id (Handle : Activity_Handle) return Activity_Id;
    function Get_Activity_Id (Iter : Iterator)          return Activity_Id;

    -- Retrieve Activity id from open Handle or Iterator


end Activity_Implementation;

E3 Meta Data

    nblk1=b
    nid=0
    hdr6=16
        [0x00] rec0=20 rec1=00 rec2=01 rec3=006
        [0x01] rec0=00 rec1=00 rec2=0b rec3=006
        [0x02] rec0=19 rec1=00 rec2=02 rec3=018
        [0x03] rec0=1d rec1=00 rec2=03 rec3=080
        [0x04] rec0=16 rec1=00 rec2=04 rec3=042
        [0x05] rec0=18 rec1=00 rec2=05 rec3=00e
        [0x06] rec0=00 rec1=00 rec2=0a rec3=008
        [0x07] rec0=13 rec1=00 rec2=06 rec3=050
        [0x08] rec0=14 rec1=00 rec2=07 rec3=03e
        [0x09] rec0=1e rec1=00 rec2=08 rec3=00a
        [0x0a] rec0=13 rec1=00 rec2=09 rec3=000
    tail 0x21520f6dc83c172cb8358 0x42a00088462065003