|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bird, package body Self, seg_03a3d1
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io; with Unchecked_Conversion; with Unchecked_Deallocation; package body Bird is function Bird_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 : Natural := 0) return Object is This_Animal : Animal.Object; This_State_Ptr : State_Ptr; Animal_State_Ptr : Animal.State_Ptr; begin This_State_Ptr := new State; This_State_Ptr.Offspring_No := Offspring_No; This_State_Ptr.My_Feet := Foot.Create (Foot.It_Self); Foot.Set_Length (This_Foot => This_State_Ptr.My_Feet, Cm => 10); This_Animal := Animal.Create (2); Animal_State_Ptr := Animal.Part_Of (This_Animal); Animal.Set_Heir (Animal_State_Ptr, Application_View_Of (This_State_Ptr)); Text_Io.Put_Line ("A bird is born ..."); return Object (This_Animal); end Create; procedure Delete (This_Bird : in out Object) is separate; procedure Set_Feather (This_Bird : Object; Number : Positive) is begin Part_Of (This_Bird).Feather_Number := Number; end Set_Feather; function Get_Feather (This_Bird : Object) return Positive is begin return Part_Of (This_Bird).Feather_Number; end Get_Feather; procedure Set_Nest (This_Bird : Object; This_Nest : Nest.Object) is begin Part_Of (This_Bird).My_Nest := This_Nest; end Set_Nest; function Get_Nest (This_Bird : Object) return Nest.Object is begin return Part_Of (This_Bird).My_Nest; end Get_Nest; function Get_Feet (This_Bird : Object) return Foot.Object is begin return Part_Of (This_Bird).My_Feet; end Get_Feet; package Self is procedure Sleep (This_Bird : Object); procedure Fly (This_Bird : Object); end Self; package body Self is separate; procedure Sleep (This_Bird : Object) is separate; procedure Fly (This_Bird : Object) is separate; procedure Imag (This_Bird : Object) is begin Text_Io.Put_Line ("bird is:"); Animal.Image (Animal.Object (This_Bird)); Text_Io.Put_Line ("bird state is:"); Text_Io.Put_Line (" nb plumes: " & Positive'Image (Part_Of (This_Bird).Feather_Number)); Foot.Image (Part_Of (This_Bird).My_Feet); Nest.Image (Part_Of (This_Bird).My_Nest); end Imag; function Part_Of (This_Bird : Object) return State_Ptr is This_State_Ptr : State_Ptr; begin This_State_Ptr := Bird_View_Of (S => Animal.Get_Heir (Animal.Part_Of (Animal.Object (This_Bird)))); if This_State_Ptr = null then raise Oo_Ada_Exception.Part_Of_Error; else return This_State_Ptr; end if; 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;
nblk1=6 nid=4 hdr6=8 [0x00] rec0=1d rec1=00 rec2=01 rec3=048 [0x01] rec0=19 rec1=00 rec2=05 rec3=004 [0x02] rec0=26 rec1=00 rec2=03 rec3=09e [0x03] rec0=24 rec1=00 rec2=02 rec3=000 [0x04] rec0=1f rec1=00 rec2=02 rec3=000 [0x05] rec0=07 rec1=00 rec2=02 rec3=001 tail 0x2153323f485025de1d40c 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 06 01 3f 80 2f 20 20 50 61 72 74 5f 4f 66 20 ┆ ? / Part_Of ┆ 0x6: 0000 00 00 00 68 80 0b 68 65 72 5f 4e 75 6d 62 65 72 ┆ h her_Number┆