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.
26 -- FOUNDATION DESCRIPTION:
27 -- This file simulates a generic linked list abstraction for use in tests
28 -- covering tagged types and type extensions.
31 -- This foundation consists of the following files:
37 -- 06 Dec 94 SAIC ACVC 2.0
38 -- 12 Jun 96 SAIC ACVC 2.1: Modified prologue. Added pragma
43 generic -- Singly-linked list abstraction.
44 type Parent_Type
is tagged private; -- Actual is parent
45 package F340A000
is -- tagged type.
47 pragma Elaborate_Body
;
50 -- Declarations for visible linked list nodes:
54 type Node_Ptr
is access Node_Type
;
56 type Node_Type
is new Parent_Type
with record -- Record extension
57 Next
: Node_Ptr
:= null; -- of parent type.
61 -- Inherits primitive operations of actual type corresponding
64 -- Add node at head of list.
65 procedure Add
(Item
: in Node_Ptr
;
66 Head
: in out Node_Ptr
);
68 -- Remove node from head of list and return it.
69 procedure Remove
(Head
: in out Node_Ptr
;
74 -- Declarations for private linked list nodes:
76 type Priv_Node_Type
is new Parent_Type
with private; -- Private extension
79 -- Inherits primitive operations of actual parameter corresponding
83 type Priv_Node_Ptr
is access Priv_Node_Type
;
86 -- Add node at head of list.
87 procedure Add
(Item
: in Priv_Node_Ptr
;
88 Head
: in out Priv_Node_Ptr
);
90 -- Remove node from head of list and return it.
91 procedure Remove
(Head
: in out Priv_Node_Ptr
;
92 Item
: out Priv_Node_Ptr
);
97 type Priv_Node_Type
is new Parent_Type
with record
98 Next
: Priv_Node_Ptr
:= null;
104 --==================================================================--
107 package body F340A000
is -- Singly-linked list abstraction.
109 procedure Add
(Item
: in Node_Ptr
;
110 Head
: in out Node_Ptr
) is
119 procedure Remove
(Head
: in out Node_Ptr
;
120 Item
: out Node_Ptr
) is
129 procedure Add
(Item
: in Priv_Node_Ptr
;
130 Head
: in out Priv_Node_Ptr
) is
139 procedure Remove
(Head
: in out Priv_Node_Ptr
;
140 Item
: out Priv_Node_Ptr
) is