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

⟦38fc02c93⟧ Ada Source

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

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 Nest is

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

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

    procedure Free is new Unchecked_Deallocation (State, State_Ptr);


    function Create (Offspring_No : Sub_Class) return Object is
        This_Application : Application.Object;
        This_State_Ptr : State_Ptr;
    begin
        This_State_Ptr := new State;
        This_State_Ptr.Offspring_No := Offspring_No;
        This_Application := Application.Create (Nest_Class);
        Application.Set_Heir (This_Application,
                              Application_View_Of (This_State_Ptr));
        Text_Io.Put_Line ("Building a new nest ...");

        return Object (This_Application);
    end Create;


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


    procedure Set_Place (This_Nest : Object; Number : Positive) is
    begin
        Part_Of (This_Nest).Number_Of_Place := Number;
    end Set_Place;


    function Get_Place (This_Nest : Object) return Positive is
    begin
        return Part_Of (This_Nest).Number_Of_Place;
    end Get_Place;


    procedure Image (This_Nest : Object) is
    begin
        Text_Io.Put_Line ("Nest is:");
        Text_Io.Put_Line ("   number of places: " &
                          Positive'Image (Part_Of (This_Nest).Number_Of_Place));
    end Image;


    function Part_Of (This_Nest : Object) return State_Ptr is

    begin
        return Nest_View_Of (S => Application.Get_Heir
                                     (Application.Object (This_Nest)));
    end Part_Of;


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


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

end Nest;

E3 Meta Data

    nblk1=4
    nid=3
    hdr6=6
        [0x00] rec0=1e rec1=00 rec2=01 rec3=03c
        [0x01] rec0=24 rec1=00 rec2=02 rec3=01c
        [0x02] rec0=12 rec1=00 rec2=04 rec3=000
        [0x03] rec0=0e rec1=00 rec2=04 rec3=000
    tail 0x215330cde8501550756aa 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 00 01 8c 80 01 3b 01 00 10 20 20 20 20 65 6e  ┆      ;       en┆