Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / ada / acats / support / f393b00.a
blobafabdd72fb5265a101452b1cec46ed0bd6fa1cf1
1 -- F393B00.A
2 -- Alert_Foundation
3 --
4 -- Grant of Unlimited Rights
5 --
6 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
7 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
8 -- unlimited rights in the software and documentation contained herein.
9 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
10 -- this public release, the Government intends to confer upon all
11 -- recipients unlimited rights equal to those held by the Government.
12 -- These rights include rights to use, duplicate, release or disclose the
13 -- released technical data and computer software in whole or in part, in
14 -- any manner and for any purpose whatsoever, and to have or permit others
15 -- to do so.
17 -- DISCLAIMER
19 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
20 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
21 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
22 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
23 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
24 -- PARTICULAR PURPOSE OF SAID MATERIAL.
25 --*
27 -- FOUNDATION DESCRIPTION:
28 -- This package declares three abstract types for use in C660 series
29 -- tests, Alert, Special_Alert, and Private_Alert.
30 -- It models (in miniature) an application situation in which an
31 -- abstraction is defined in terms of structure (record and operations
32 -- on the record) but not in terms of content (record is null). It
33 -- also models a situation in which an abstraction includes some
34 -- specific, implementation dependent, information.
36 -- CHANGE HISTORY:
37 -- 06 Dec 94 SAIC ACVC 2.0
39 --!
41 package F393B00 is
42 type Alert is abstract tagged null record; -- abstract type
43 -- see procedure Handle below
45 procedure Handle (A : in out Alert) is abstract;
46 -- abstract procedure,
47 -- explicitly declared
50 type Private_Alert is abstract tagged private;
52 procedure Handle (PA : in out Private_Alert) is abstract;
53 -- ensures that Private_Alert
54 -- is visibly abstract
57 type Status_Kind is (Practice, Real, Dont_Care);
58 type Urgency_Kind is (Low, Medium, High);
60 type Practice_Alert is new Alert with record
61 Status : Status_Kind := Dont_Care;
62 Urgency : Urgency_Kind := Low;
63 end record;
65 procedure Handle (PA : in out Practice_Alert);
66 -- overrides inherited Handle
70 type Device is (Teletype, Console, Big_Screen);
72 type Special_Alert (Age : Integer) is
73 abstract new Practice_Alert with record
74 Display : Device;
75 end record;
77 procedure Handle (SA : in out Special_Alert) is abstract;
78 -- overrides inherited Handle
80 private
81 subtype Implementation_Detail is Integer range 1..10;
83 type Private_Alert is abstract tagged record
84 Private_Field : Implementation_Detail := 1;
85 end record;
88 end F393B00;
90 --=======================================================================--
92 package body F393B00 is
94 procedure Handle (PA : in out Practice_Alert) is
95 begin
96 PA.Status := Real;
97 PA.Urgency := Medium;
98 end Handle;
100 end F393B00;