OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [support/] [f393b00.a] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- 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.
16
--
17
--                                    DISCLAIMER
18
--
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
--*
26
 --
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.
35
 --
36
-- CHANGE HISTORY:
37
--      06 Dec 94   SAIC    ACVC 2.0
38
--
39
 --!
40
 
41
 package F393B00 is
42
    type Alert is abstract tagged null record;  -- abstract type
43
                                                -- see procedure Handle below
44
 
45
    procedure Handle (A : in out Alert) is abstract;
46
                                                -- abstract procedure,
47
                                                -- explicitly declared
48
 
49
 
50
    type Private_Alert is abstract tagged private;
51
 
52
    procedure Handle (PA : in out Private_Alert) is abstract;
53
                                                -- ensures that Private_Alert
54
                                                -- is visibly abstract
55
 
56
 
57
    type Status_Kind is (Practice, Real, Dont_Care);
58
    type Urgency_Kind is (Low, Medium, High);
59
 
60
    type Practice_Alert is new Alert with record
61
      Status : Status_Kind := Dont_Care;
62
      Urgency : Urgency_Kind := Low;
63
    end record;
64
 
65
    procedure Handle (PA : in out Practice_Alert);
66
                                                -- overrides inherited Handle
67
 
68
 
69
 
70
    type Device is (Teletype, Console, Big_Screen);
71
 
72
    type Special_Alert (Age : Integer) is
73
      abstract new Practice_Alert with record
74
        Display : Device;
75
      end record;
76
 
77
    procedure Handle (SA : in out Special_Alert) is abstract;
78
                                                -- overrides inherited Handle
79
 
80
 private
81
    subtype Implementation_Detail is Integer range 1..10;
82
 
83
    type Private_Alert is abstract tagged record
84
      Private_Field : Implementation_Detail := 1;
85
    end record;
86
 
87
 
88
 end F393B00;
89
 
90
 --=======================================================================--
91
 
92
 package body F393B00 is
93
 
94
      procedure Handle (PA : in out Practice_Alert) is
95
        begin
96
          PA.Status := Real;
97
          PA.Urgency := Medium;
98
        end Handle;
99
 
100
 end F393B00;
101
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.