include/ChangeLog:
[official-gcc.git] / gcc / ada / prj-com.ads
blob98baa446bbda062d61dce42afb583777b6185669
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- P R J . C O M --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
10 -- --
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. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 -- The following package declares data types for GNAT project.
28 -- These data types are used in the bodies of the Prj hierarchy.
30 with GNAT.HTable;
31 with Table;
32 with Types; use Types;
34 package Prj.Com is
36 -- At one point, this package was private.
37 -- It cannot be private, because it is used outside of
38 -- the Prj hierarchy.
40 Tool_Name : Name_Id := No_Name;
42 Current_Verbosity : Verbosity := Default;
44 type Spec_Or_Body is
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;
52 end record;
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;
62 end record;
63 -- File and Path names of a unit, with a reference to its
64 -- GNAT Project File.
66 package Units is new Table.Table
67 (Table_Component_Type => Unit_Data,
68 Table_Index_Type => Unit_Id,
69 Table_Low_Bound => 1,
70 Table_Initial => 100,
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,
84 Element => Unit_Id,
85 No_Element => No_Unit,
86 Key => Name_Id,
87 Hash => Hash,
88 Equal => "=");
90 end Prj.Com;