annotate gcc/testsuite/ada/acats/support/f393b00.a @ 111:04ced10e8804

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