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