This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / ada / a-chtgop.ads
blob232c719b04c69157b90685636dd592e09d2ad0aa
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT LIBRARY COMPONENTS --
4 -- --
5 -- ADA.CONTAINERS.HASH_TABLES.GENERIC_OPERATIONS --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2004 Free Software Foundation, Inc. --
10 -- --
11 -- This specification is adapted from the Ada Reference Manual for use with --
12 -- GNAT. In accordance with the copyright of that document, you can freely --
13 -- copy and modify this specification, provided that if you redistribute a --
14 -- modified version, any changes that you have made are clearly indicated. --
15 -- --
16 ------------------------------------------------------------------------------
18 with Ada.Streams;
20 generic
22 with package HT_Types is
23 new Generic_Hash_Table_Types (<>);
25 type Hash_Table_Type is new HT_Types.Hash_Table_Type with private;
27 use HT_Types;
29 Null_Node : in Node_Access;
31 with function Hash_Node (Node : Node_Access) return Hash_Type;
33 with function Next (Node : Node_Access) return Node_Access;
35 with procedure Set_Next
36 (Node : Node_Access;
37 Next : Node_Access);
39 with function Copy_Node (Source : Node_Access) return Node_Access;
41 with procedure Free (X : in out Node_Access);
43 package Ada.Containers.Hash_Tables.Generic_Operations is
44 pragma Preelaborate;
46 procedure Free_Hash_Table (Buckets : in out Buckets_Access);
48 function Index
49 (Buckets : Buckets_Type;
50 Node : Node_Access) return Hash_Type;
51 pragma Inline (Index);
53 function Index
54 (Hash_Table : Hash_Table_Type;
55 Node : Node_Access) return Hash_Type;
56 pragma Inline (Index);
58 procedure Adjust (HT : in out Hash_Table_Type);
60 procedure Finalize (HT : in out Hash_Table_Type);
62 generic
63 with function Find
64 (HT : Hash_Table_Type;
65 Key : Node_Access) return Boolean;
66 function Generic_Equal
67 (L, R : Hash_Table_Type) return Boolean;
69 procedure Clear (HT : in out Hash_Table_Type);
71 procedure Move (Target, Source : in out Hash_Table_Type);
73 function Capacity (HT : Hash_Table_Type) return Count_Type;
75 procedure Ensure_Capacity
76 (HT : in out Hash_Table_Type;
77 N : Count_Type);
79 procedure Delete_Node_Sans_Free
80 (HT : in out Hash_Table_Type;
81 X : Node_Access);
83 function First (HT : Hash_Table_Type) return Node_Access;
85 function Next
86 (HT : Hash_Table_Type;
87 Node : Node_Access) return Node_Access;
89 generic
90 with procedure Process (Node : Node_Access);
91 procedure Generic_Iteration (HT : Hash_Table_Type);
93 generic
94 use Ada.Streams;
95 with procedure Write
96 (Stream : access Root_Stream_Type'Class;
97 Node : Node_Access);
98 procedure Generic_Write
99 (Stream : access Root_Stream_Type'Class;
100 HT : Hash_Table_Type);
102 generic
103 use Ada.Streams;
104 with function New_Node (Stream : access Root_Stream_Type'Class)
105 return Node_Access;
106 procedure Generic_Read
107 (Stream : access Root_Stream_Type'Class;
108 HT : out Hash_Table_Type);
110 end Ada.Containers.Hash_Tables.Generic_Operations;