|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 2356 (0x934)
Types: TextFile
Names: »B«
└─⟦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⟧
with Expertsystem;
use Expertsystem;
package body Robot is
package Behavior is new Classbehavior (Object, "ROBOTS ", 10);
function Lesrobots return Collection.Object is
begin
return Behavior.Instances;
end Lesrobots;
function Peutprendre (R : Reference) return Boolean is
begin
return Behavior.Get (R).Tache = Prendre;
end Peutprendre;
function Peutdeposer (R : Reference) return Boolean is
begin
return Behavior.Get (R).Tache = Deposer;
end Peutdeposer;
function Tientbrique (R : Reference) return Boolean is
begin
return Behavior.Get (R).Pinceoccupee;
end Tientbrique;
function Nom (R : Reference) return Tnom is
begin
return Behavior.Get (R).Nom;
end Nom;
function Numeroboite (R : Reference) return Tcase is
begin
return Behavior.Get (R).Boite;
end Numeroboite;
function Derniereboite return Tcase is
begin
Numerocourant := Numerocourant + 1;
return Numerocourant - 1;
end Derniereboite;
procedure Creer is
begin
Behavior.Allocate (Object'("Robot No 1", 1, Prendre, False));
Behavior.Allocate (Object'("Robot No 2", 1, Prendre, False));
Put (" Nb robots : ");
Put (Behavior.Cardinality);
Put_Line (" ");
end Creer;
procedure Modifierpince (R : Reference; B : Boolean) is
Unrobot : Object;
begin
Unrobot := Behavior.Get (R);
Unrobot.Pinceoccupee := B;
Behavior.Set (R, Unrobot);
end Modifierpince;
procedure Modifiertache (R : Reference; A : Ttache) is
Unrobot : Object;
begin
Unrobot := Behavior.Get (R);
Unrobot.Tache := A;
Behavior.Set (R, Unrobot);
end Modifiertache;
procedure Modifierboite (R : Reference; C : Tcase) is
Unrobot : Object;
begin
Unrobot := Behavior.Get (R);
Unrobot.Boite := C;
Behavior.Set (R, Unrobot);
end Modifierboite;
procedure Sesuicide (R : Reference) is
begin
Behavior.Dispose (R);
end Sesuicide;
end Robot;
-------------------------------------------------------------------------------
-- DESCRIPTION DES REGLES --
-------------------------------------------------------------------------------