|
|
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: 3845 (0xf05)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
-- fichier : Etape.adb
-- body du package ETAPE
-- Auteur : Sebastien BROCHET
-- Date : 24 Novembre 1993
-- Etat : operationnel
with Text_Io;
package body Etape is
package Int_Io is new Text_Io.Integer_Io (Integer);
procedure Afficheruneetape (E : Etape) is
Untemps : Temps;
Uneaction : Action;
begin
if E /= Etapeinexistante then
Untemps := Letempsdeletape (E);
Uneaction := Lactiondeletape (E);
Text_Io.Put ("Temps : ");
Int_Io.Put (Untemps);
Text_Io.Put (" Action : ");
Int_Io.Put (Uneaction.Valeur1);
Text_Io.Put (" ");
Int_Io.Put (Uneaction.Valeur2);
Text_Io.New_Line;
else
Text_Io.Put_Line ("Pointeur NIL , erreur");
end if;
end Afficheruneetape;
-- testee
function Creeruneetape
(Untemps : Temps; Uneaction : Action; Uneetape : Etape)
return Etape is
Etapeaux : Etape;
begin
Etapeaux := new Celluleetape;
Etapeaux.Letemps := Untemps;
Etapeaux.Laction := Uneaction;
Etapeaux.Lasuite := Uneetape;
return Etapeaux;
end Creeruneetape;
-- testee
function Letempsdeletape (Uneetape : Etape) return Temps is
begin
return Uneetape.Letemps;
end Letempsdeletape;
-- Testee
function Lactiondeletape (Uneetape : Etape) return Action is
begin
return Uneetape.Laction;
end Lactiondeletape;
-- testee
function Lasuitedeletape (Uneetape : Etape) return Etape is
begin
return Uneetape.Lasuite;
end Lasuitedeletape;
-- testee
procedure Changerletempsdeletape
(Uneetape : in out Etape; Untemps : Temps) is
begin
Uneetape.Letemps := Untemps;
end Changerletempsdeletape;
-- testee
procedure Changerlactiondeletape
(Uneetape : in out Etape; Uneaction : Action) is
begin
Uneetape.Laction := Uneaction;
end Changerlactiondeletape;
-- testee
-- rmq : L'etape E qui est retournee est la meme que celle transmise
-- elle n'est pas modifiee mais doit etre passee par adresse pour que
-- des affectations ( insertions) puissent se faire pdt la recursion arriere
procedure Caseruneactiondanslesetapes
(T : Temps; A : Action; E : in out Etape) is
begin
if E = Etapeinexistante then -- OK
E := Creeruneetape (T, A, E);
else
if T = Letempsdeletape (E) then -- OK
Changerlactiondeletape (E, A);
else
if T > Letempsdeletape (E) then -- OK
Caseruneactiondanslesetapes (T, A, E.Lasuite);
else
E := Creeruneetape (T, A, E); -- OK
end if;
end if;
end if;
end Caseruneactiondanslesetapes;
-- testee
procedure Detruireletape (E : in out Etape) is
begin
-- DISPOSE(E); -- a modifier avec re-utilisations des blocs desalloues
E := Etapeinexistante;
end Detruireletape;
-- testee
procedure Exclureuneactiondesetapes (E : in out Etape; T : Temps) is
A_Jeter : Etape;
begin
if E /= Etapeinexistante then -- OK
if T = Letempsdeletape (E) then
begin
A_Jeter := E;
E := E.Lasuite;
Detruireletape (A_Jeter); -- OK
end;
else
if T > Letempsdeletape (E) then -- OK
Exclureuneactiondesetapes (E.Lasuite, T);
end if;
end if;
end if;
end Exclureuneactiondesetapes;
end Etape;
-- fichier : Etape.ads
-- specifications du package ETAPE
-- Auteur : Sebastien BROCHET
-- Date : 24 Novembre 1993
-- Etat : operationnel