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

⟦5695d031d⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Animal, seg_0393d4

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 Text_Io;
with Unchecked_Conversion;
package body Animal is

    type P_Animal_State is access Animal.State;

    function Animal_View_Of is
       new Unchecked_Conversion
              (Source => Application.Object, Target => Animal.State);

    function Application_View_Of is
       new Unchecked_Conversion (Source => P_Animal_State,
                                 Target => Application.Object);


    function Part_Of (Object : Animal.Object) return State is
    begin
        return Animal_View_Of
                  (S => Application.Heir (Application.Object (Object)));
    end Part_Of;


    function Create (Offspring_No : Natural := 0) return Object is
        App : Application.Object;
        P : P_Animal_State;
    begin
        P := new Animal.State;
        P.Offspring_No := Offspring_No;
        P.Heir := null;
        App := Application.Create (1);
        Application.Set_Heir (App, Application_View_Of (P));
        return Animal.Object (App);
    end Create;


    procedure Sleep (Animal : Standard.Animal.Object; Time : Duration) is
    begin
        Text_Io.Put_Line ("animal sleeping ...");
        delay Time;
        Text_Io.Put_Line ("animal waking up");
    end Sleep;


    procedure Set_Mass
                 (Animal : in out Standard.Animal.Object; Kg : Positive) is
        A : Standard.Animal.State := Standard.Animal.Part_Of (Animal);
    begin
        A.Mass := Kg;
    end Set_Mass;


    function Mass (Animal : Standard.Animal.Object) return Positive is
    begin
        return Standard.Animal.Part_Of (Animal).Mass;
    end Mass;
    procedure Set_Heir (State : in out Animal.State;
                        Heir : Application.Object) is
    begin
        State.Heir := Heir;
    end Set_Heir;
end Animal;



E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=01e
        [0x01] rec0=20 rec1=00 rec2=02 rec3=001
    tail 0x21532406284ec7f076258 0x42a00088462060003