3 -- Grant of Unlimited Rights
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
33 -- This test consists of the following files:
39 -- 06 Dec 94 SAIC ACVC 2.0
40 -- 15 May 96 SAIC ACVC 2.1: Modified prologue. Added pragma Elaborate
46 pragma Elaborate
(Ada
.Calendar
);
51 -- Declarations used by component Display_On and procedure Display.
53 type Device_Enum
is (Null_Device
, Teletype
, Console
, Big_Screen
);
54 type Display_Counters
is array (Device_Enum
) of Natural;
56 Display_Count_For
: Display_Counters
:= (others => 0);
59 -- Declarations required for component Arrival_Time.
61 Default_Time
: constant Ada
.Calendar
.Time
:=
62 Ada
.Calendar
.Time_Of
(1901, 1, 1);
63 Alert_Time
: constant Ada
.Calendar
.Time
:=
64 Ada
.Calendar
.Time_Of
(1991, 6, 15);
67 type Alert_Type
is tagged record -- Root tagged type.
68 Arrival_Time
: Ada
.Calendar
.Time
:= Default_Time
;
69 Display_On
: Device_Enum
:= Null_Device
;
73 procedure Display
(A
: in Alert_Type
); -- To be inherited by
76 procedure Handle
(A
: in out Alert_Type
); -- To be inherited by
81 type Low_Alert_Type
is new Alert_Type
with record -- Record extension of
82 Level
: Integer := 0; -- root tagged type.
85 -- Inherits procedure Display from Alert.
86 -- Inherits procedure Handle from Alert.
88 function Level_Of
(LA
: in Low_Alert_Type
) -- To be inherited by
89 return Integer; -- all derivatives.
93 -- Declarations required for component Action_Officer;
95 type Person_Enum
is (Nobody
, Duty_Officer
,
96 Watch_Commander
, Commanding_Officer
);
100 type Medium_Alert_Type
is new Low_Alert_Type
with record
101 Action_Officer
: Person_Enum
:= Nobody
; -- Record extension of
102 end record; -- record extension.
104 -- Inherits (inherited) procedure Display from Low_Alert_Type.
105 -- Inherits (inherited) procedure Handle from Low_Alert_Type.
107 -- Inherits function Level_Of from Low_Alert_Type.
109 procedure Assign_Officer
(MA
: in out Medium_Alert_Type
;
110 To
: in Person_Enum
);
116 --==================================================================--
119 package body C3900010
is
122 procedure Display
(A
: in Alert_Type
) is
124 Display_Count_For
(A
.Display_On
) := Display_Count_For
(A
.Display_On
) + 1;
128 procedure Handle
(A
: in out Alert_Type
) is
130 A
.Arrival_Time
:= Alert_Time
;
134 function Level_Of
(LA
: in Low_Alert_Type
) return Integer is
136 return (LA
.Level
+ 1);
140 procedure Assign_Officer
(MA
: in out Medium_Alert_Type
;
141 To
: in Person_Enum
) is
143 MA
.Action_Officer
:= To
;