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

⟦231ba588f⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bird_Of_Prey, seg_03a37f

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;
with Unchecked_Deallocation;

package body Bird_Of_Prey is

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

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

    procedure Free is new Unchecked_Deallocation (State, State_Ptr);


    function Create (Offspring_No : Sub_Class := It_Self) return Object is
        This_Bird : Bird.Object;
        This_State_Ptr : State_Ptr;
        Bird_State_Ptr : Bird.State_Ptr;
    begin
        This_State_Ptr := new State;
        This_State_Ptr.Offspring_No := Offspring_No;
        This_Bird := Bird.Create (Bird.Bird_Of_Prey_Class);
        Bird_State_Ptr := Bird.Part_Of (This_Bird);
        Bird.Set_Heir (Bird_State_Ptr, Application_View_Of (This_State_Ptr));

        return Object (This_Bird);
    end Create;


    procedure Delete (This_Bird_Of_Prey : in out Object) is
        This_State_Ptr : State_Ptr := Part_Of (This_Bird_Of_Prey);
    begin
        Free (This_State_Ptr);
        Bird.Delete (Bird.Object (This_Bird_Of_Prey));
    end Delete;


    -- procedure Image (This_Bird_Of_Prey : Object) is
    -- begin
    --     Text_Io.Put_Line ("bird of prey is:");
    --     Bird.Image (Bird.Object (This_Bird_Of_Prey));
    --
    -- end Image;


    function Part_Of (This_Bird_Of_Prey : Object) return State_Ptr is

    begin
        return Bird_Of_Prey_View_Of
                  (S => Bird.Get_Heir (Bird.Part_Of
                                          (Bird.Object (This_Bird_Of_Prey))));
    end Part_Of;


    procedure Set_Heir (This_State_Ptr : in out State_Ptr;
                        Heir : Animal.Application.Object) is
    begin
        This_State_Ptr.Heir := Heir;
    end Set_Heir;


    function Get_Heir (This_State_Ptr : State_Ptr)
                      return Animal.Application.Object is
    begin
        return This_State_Ptr.Heir;
    end Get_Heir;

end Bird_Of_Prey;

E3 Meta Data

    nblk1=4
    nid=4
    hdr6=6
        [0x00] rec0=1e rec1=00 rec2=01 rec3=008
        [0x01] rec0=23 rec1=00 rec2=03 rec3=000
        [0x02] rec0=09 rec1=00 rec2=02 rec3=000
        [0x03] rec0=1a rec1=00 rec2=02 rec3=000
    tail 0x2153314a6850168981c7d 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 00 90 80 2a 3a 20 53 74 61 74 65 5f 50 74  ┆     *: State_Pt┆