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 -- The following files comprise this test:
40 -- 06 Dec 94 SAIC ACVC 2.0
41 -- 26 Apr 96 SAIC ACVC 2.1: Modified prologue.
45 package CA110040
.CA110041
is -- Child Package Computer_System.Manager
47 type User_Account
is new Account
with private;
49 procedure Initialize_User_Account
(Acct
: out User_Account
);
53 -- The private portion of this spec demonstrates that components contained
54 -- in the visible part of the parent are directly visible in the private
55 -- part of a public child.
57 type Account_Access_Type
is (None
, Guest
, User
, System
);
59 type User_Account
is new Account
with -- Parent type.
61 Privilege
: Account_Access_Type
:= None
;
64 System_Account
: User_Account
:=
65 (User_ID
=> Administrator_Account
.User_ID
, -- Parent constant.
66 Privilege
=> System
); -- User_ID has been
68 Auditor_Account
: User_Account
:=
69 (User_ID
=> Next_Available_ID
, -- Parent function.
70 Privilege
=> System
); -- User_ID has been
72 Total_Authorized_Accounts
: System_Account_Capacity
73 renames Total_Accounts
; -- Parent object.
75 Unauthorized_Account
: exception
76 renames Illegal_Account
; -- Parent exception
78 end CA110040
.CA110041
; -- Child Package Computer_System.Manager
80 --=================================================================--
82 -- Child Package body Computer_System.Manager
83 package body CA110040
.CA110041
is
85 function Account_Limit_Reached
return Boolean is
87 if Total_Authorized_Accounts
= Maximum_System_Accounts
then
92 end Account_Limit_Reached
;
93 ---------------------------------------------------------------
94 function Valid_Account
(Acct
: User_Account
) return Boolean is
95 Result
: Boolean := False;
97 if (Acct
.User_ID
/= System_Account
.User_ID
) and
98 (Acct
.User_ID
/= Auditor_Account
.User_ID
)
104 ---------------------------------------------------------------
105 procedure Initialize_User_Account
(Acct
: out User_Account
) is
107 if Account_Limit_Reached
then
108 raise Account_Limit_Exceeded
;
110 Acct
.User_ID
:= Next_Available_ID
;
111 Acct
.Privilege
:= User
;
113 if not Valid_Account
(Acct
) then
114 raise Unauthorized_Account
;
116 end Initialize_User_Account
;
118 end CA110040
.CA110041
; -- Child Package body Computer_System.Manager