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

⟦bd86295c6⟧ TextFile

    Length: 2070 (0x816)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Leaf;
with Vegetable;

separate (Plant)

procedure Delete (This_Object : in out Object; Marker : Boolean := False) is
    Parent_1 : Root.Object := Get_Origin (This_Object);
    Child_1 : Vegetable.Object;
    A_List_Of_Leaves : Ref_Of_Leaves := Get_Leaves (This_Object);
    A_Leaf : Leaf.Object;

begin
    case This_Object.Offspring is

        when 0 =>

            Log_Report.Trace
               ("plant delete :  prealable destruction of " &  
                Natural'Image (Arg_Number (A_List_Of_Leaves)) & "leaves");

            Init (A_List_Of_Leaves);
            while not Done (A_List_Of_Leaves) loop
                A_Leaf := Value (A_List_Of_Leaves);
                Leaf.Delete (A_Leaf);
                Next (A_List_Of_Leaves);
            end loop;  
            Free (A_List_Of_Leaves);

            Free (This_Object);

            Log_Report.Trace
               ("plant delete :  no sub-class, free state and root delete");
            Root.Delete (Parent_1, True);

        when 1 =>  
            if not Marker then
                Log_Report.Trace ("plant delete : call vegetable delete");
                Child_1 := Vegetable.Protected_Conv (Get_Heir (This_Object));
                Vegetable.Delete (Child_1);  
            else  
                Log_Report.Trace
                   ("plant delete :  prealable destruction of " &  
                    Natural'Image (Arg_Number (A_List_Of_Leaves)) & " leaves");

                Init (A_List_Of_Leaves);
                while not Done (A_List_Of_Leaves) loop
                    A_Leaf := Value (A_List_Of_Leaves);
                    Leaf.Delete (A_Leaf);  
                    Next (A_List_Of_Leaves);
                end loop;  
                Free (A_List_Of_Leaves);

                Free (This_Object);
                Log_Report.Trace
                   ("plant delete :  free state and call root delete");
                Root.Delete (Parent_1, True);
            end if;

        when others =>
            raise Oo_Ada_Exception.Offspring_Error;

    end case;

end Delete;