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

⟦5d40af0f9⟧ TextFile

    Length: 3049 (0xbe9)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Physicalobject;
package body Monkey is

    package Behaviour is new Classbehavior (Object, "MONKEY    ");

    procedure Make (Is_At : Coordinate;
                    On : Physical_Object := (others => ' ');
                    Holds : Physical_Object := (others => ' ')) is
        The_Monkey : Monkey.Object;
    begin
        The_Monkey.Is_At := Is_At;
        The_Monkey.On := On;
        The_Monkey.Holds := Holds;

        if The_Monkey.On /= Floor then
            declare
                Obj : Reference;

                function Same_At_Value (An_Object : Reference) return Boolean is
                begin
                    return Physicalobject.Name (An_Object) =
                              The_Monkey.On and then
                           Physicalobject.Is_At (An_Object) = The_Monkey.Is_At;
                end Same_At_Value;

                function Find_An_Object is
                   new Collection.Findone (Same_At_Value);
            begin
                Obj := Find_An_Object (Physicalobject.Instances);
                if Collection.Isnull (Obj) then
                    raise Illegal_Make;
                end if;
            end;
        end if;

        Behaviour.Allocate (The_Monkey);
    end Make;

    function Is_At (The_Reference : in Expertsystem.Reference)
                   return Coordinate is
    begin
        return Behaviour.Get (The_Reference).Is_At;
    end Is_At;

    function Is_On (The_Reference : in Expertsystem.Reference)
                   return Physical_Object is
    begin
        return Behaviour.Get (The_Reference).On;
    end Is_On;

    function Holds (The_Reference : in Expertsystem.Reference)
                   return Physical_Object is
    begin
        return Behaviour.Get (The_Reference).Holds;
    end Holds;

    procedure Modify_Coordinate (The_Reference : in Expertsystem.Reference;
                                 New_Coordinate : in Coordinate) is
        The_Object : Object;
    begin
        The_Object := Behaviour.Get (The_Reference);
        The_Object.Is_At := New_Coordinate;
        Behaviour.Set (The_Reference, The_Object);
    end Modify_Coordinate;

    procedure Modify_Is_On (The_Reference : in Expertsystem.Reference;
                            New_Object : in Physical_Object) is
        The_Object : Object;
    begin
        The_Object := Behaviour.Get (The_Reference);
        The_Object.On := New_Object;
        Behaviour.Set (The_Reference, The_Object);
    end Modify_Is_On;

    procedure Modify_Object_Held (The_Reference : in Expertsystem.Reference;
                                  New_Object : in Physical_Object) is
        The_Object : Object;
    begin
        The_Object := Behaviour.Get (The_Reference);
        The_Object.Holds := New_Object;
        Behaviour.Set (The_Reference, The_Object);
    end Modify_Object_Held;

    function Instances return Collection.Object is
    begin
        return Behaviour.Instances;
    end Instances;

    procedure Clear is
    begin
        Behaviour.Clear;
    end Clear;

end Monkey;