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