|
|
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: 4096 (0x1000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Tomato, seg_03a600
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Oo_Ada_Exception;
with Text_Io;
with Tomato;
with Unchecked_Conversion;
with Unchecked_Deallocation;
with Vegetable;
package body Tomato is
procedure Free is new Unchecked_Deallocation (State, State_Ptr);
function Tomato_View_Of is
new Unchecked_Conversion (Source => Root.Object, Target => State_Ptr);
function Root_View_Of is
new Unchecked_Conversion (Source => State_Ptr, Target => Root.Object);
function Create (Offspring : Natural) return Root.Object is
This_Object : Root.Object;
This_State_Ptr : State_Ptr;
Veget_State_Ptr : Vegetable.State_Ptr;
begin
This_State_Ptr := new State;
This_State_Ptr.Offspring := Offspring;
This_Object := Vegetable.Create (1);
Veget_State_Ptr := Vegetable.Part_Of (This_Object);
Vegetable.Set_Heir (Veget_State_Ptr, Root_View_Of (This_State_Ptr));
return This_Object;
end Create;
procedure Delete (This_Object : in out Root.Object) is
This_State_Ptr : State_Ptr := Part_Of (This_Object);
begin
case This_State_Ptr.Offspring is
when 0 =>
Free (This_State_Ptr);
Vegetable.Delete (This_Object);
when others =>
raise Oo_Ada_Exception.Offspring_Error;
end case;
end Delete;
procedure Set_Z (This_State : in out State; This_Z : Natural) is
begin
This_State.Z := This_Z;
end Set_Z;
function Get_Z (This_State : State) return Natural is
begin
return This_State.Z;
end Get_Z;
procedure Grow (This_Object : Root.Object; Marker : Boolean := False) is
begin
Text_Io.Put_Line ("Tomato is growing");
end Grow;
function Part_Of (This_Object : Root.Object) return State_Ptr is
This_State_Ptr : State_Ptr;
begin
This_State_Ptr := Tomato_View_Of
(S => Vegetable.Get_Heir
(Vegetable.Part_Of (This_Object)));
if This_State_Ptr = null then
raise Oo_Ada_Exception.Part_Of_Error;
end if;
return This_State_Ptr;
end Part_Of;
procedure Set_Heir (This_State_Ptr : in out State_Ptr;
Heir : Root.Object) is
begin
This_State_Ptr.Heir := Heir;
end Set_Heir;
function Get_Heir (This_State_Ptr : State_Ptr) return Root.Object is
begin
return This_State_Ptr.Heir;
end Get_Heir;
end Tomato;
nblk1=3
nid=0
hdr6=6
[0x00] rec0=24 rec1=00 rec2=01 rec3=01e
[0x01] rec0=29 rec1=00 rec2=03 rec3=028
[0x02] rec0=17 rec1=00 rec2=02 rec3=000
tail 0x21737db3c850779913785 0x42a00088462060003