DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦6e6a003ce⟧ TextFile

    Length: 4740 (0x1284)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Log_Report;
with Oo_Ada_Exception;  
with Unchecked_Conversion;
with Unchecked_Deallocation;


package body Tomato is

    type State is
        record
            Z : Natural;
            Offspring : Natural := 0;
            Heir : Root.Object;  
            Origin : Root.Object;
            Multiple : Root.Object;
        end record;

    procedure Free is new Unchecked_Deallocation (State, Object);


    function Tomato_View_Of is new Unchecked_Conversion
                                      (Source => Root.Object, Target => Object);


    function Root_View_Of is new Unchecked_Conversion
                                    (Source => Object, Target => Root.Object);


    function Create (Offspring : Natural := 0) return Object is separate;

    procedure Delete (This_Object : in out Object;
                      Marker : Boolean := False) is separate;


    procedure Set_W (This_Object : Object; This_W : Natural) is
    begin
        Fruit.Set_W (Conv (This_Object), This_W);
    end Set_W;


    function Get_W (This_Object : Object) return Natural is
    begin
        return Fruit.Get_W (Conv (This_Object));
    end Get_W;


    procedure Set_X (This_Object : Object; This_X : Natural) is
    begin
        Vegetable.Set_X (Conv (This_Object), This_X);
    end Set_X;


    function Get_X (This_Object : Object) return Natural is
    begin
        return Vegetable.Get_X (Conv (This_Object));
    end Get_X;


    procedure Set_Y (This_Object : Object; This_Y : Natural) is
    begin
        Vegetable.Set_Y (Conv (This_Object), This_Y);
    end Set_Y;


    function Get_Y (This_Object : Object) return Natural is
    begin
        return Vegetable.Get_Y (Conv (This_Object));
    end Get_Y;


    procedure Set_Z (This_Object : Object; This_Z : Natural) is
    begin
        This_Object.Z := This_Z;
    end Set_Z;


    function Get_Z (This_Object : Object) return Natural is
    begin
        return This_Object.Z;
    end Get_Z;


    procedure Set_Leaves (This_Object : Object;
                          With_Leaves : Plant.Ref_Of_Leaves) is
    begin
        Plant.Set_Leaves (Conv (This_Object), With_Leaves);
    end Set_Leaves;


    function Get_Leaves (This_Object : Object) return Plant.Ref_Of_Leaves is  
    begin
        return Plant.Get_Leaves (Conv (This_Object));
    end Get_Leaves;


    package Self is
        procedure Grow (This_Object : Object; Marker : Boolean := False);  
    end Self;


    package body Self is separate;


    procedure Grow (This_Object : Object;
                    Marker : Boolean := False) is separate;


    procedure Image (This_Object : Object) is separate;


    procedure Ripen (This_Object : Object;
                     Use_1 : Sun.Object;
                     Marker : Boolean := False) is separate;


    function Conv (This_Object : Object) return Fruit.Object is  
    begin  
        return Fruit.Part_Of (Vegetable.Get_Multiple (Conv (This_Object)));
    end Conv;


    function Conv (This_Object : Object) return Plant.Object is
    begin
        return Plant.Part_Of (Get_Origin (This_Object));
    end Conv;


    function Conv (This_Object : Object) return Vegetable.Object is
    begin
        return Vegetable.Part_Of (Get_Origin (This_Object));
    end Conv;


    function Part_Of (This_Origin_Object : Root.Object) return Object is  
        This_Object : Object;
    begin
        This_Object := Tomato_View_Of
                          (S => Vegetable.Get_Heir
                                   (Vegetable.Part_Of (This_Origin_Object)));
        if This_Object = null then
            raise Oo_Ada_Exception.Null_Access_Error;
        end if;
        return This_Object;
    end Part_Of;


    function Protected_Conv (Source : Root.Object) return Object is  
    begin
        return Tomato_View_Of (Source);
    end Protected_Conv;


    procedure Set_Heir (This_Object : in out Object; Heir : Root.Object) is
    begin
        This_Object.Heir := Heir;
    end Set_Heir;


    function Get_Heir (This_Object : Object) return Root.Object is
    begin
        return This_Object.Heir;
    end Get_Heir;


    procedure Set_Origin (This_Object : in out Object; Origin : Root.Object) is
    begin
        This_Object.Origin := Origin;
    end Set_Origin;


    function Get_Origin (This_Object : Object) return Root.Object is
    begin
        return This_Object.Origin;
    end Get_Origin;


    procedure Set_Multiple (This_Object : in out Object;
                            Multiple : Root.Object) is
    begin
        This_Object.Multiple := Multiple;
    end Set_Multiple;


    function Get_Multiple (This_Object : Object) return Root.Object is
    begin
        return This_Object.Multiple;
    end Get_Multiple;

end Tomato;