1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
27 ------------------------------------------------------------------------------
29 -- The following package declares data types for GNAT project.
30 -- These data types are used in the bodies of the Prj hierarchy.
34 with Types
; use Types
;
38 -- At one point, this package was private.
39 -- It cannot be private, because it is used outside of
42 Tool_Name
: Name_Id
:= No_Name
;
44 Current_Verbosity
: Verbosity
:= Default
;
47 (Specification
, Body_Part
);
49 type File_Name_Data
is record
50 Name
: Name_Id
:= No_Name
;
51 Path
: Name_Id
:= No_Name
;
52 Project
: Project_Id
:= No_Project
;
53 Needs_Pragma
: Boolean := False;
55 -- File and Path name of a spec or body.
57 type File_Names_Data
is array (Spec_Or_Body
) of File_Name_Data
;
59 type Unit_Id
is new Nat
;
60 No_Unit
: constant Unit_Id
:= 0;
61 type Unit_Data
is record
62 Name
: Name_Id
:= No_Name
;
63 File_Names
: File_Names_Data
;
65 -- File and Path names of a unit, with a reference to its
68 package Units
is new Table
.Table
69 (Table_Component_Type
=> Unit_Data
,
70 Table_Index_Type
=> Unit_Id
,
73 Table_Increment
=> 100,
74 Table_Name
=> "Prj.Com.Units");
76 type Header_Num
is range 0 .. 2047;
78 function Hash
is new GNAT
.HTable
.Hash
(Header_Num
=> Header_Num
);
80 function Hash
(Name
: Name_Id
) return Header_Num
;
82 function Hash
(Name
: String_Id
) return Header_Num
;
84 package Units_Htable
is new GNAT
.HTable
.Simple_HTable
85 (Header_Num
=> Header_Num
,
87 No_Element
=> No_Unit
,