1 ------------------------------------------------------------------------------
3 -- GNAT LIBRARY COMPONENTS --
5 -- ADA.CONTAINERS.HASH_TABLES.GENERIC_OPERATIONS --
9 -- Copyright (C) 2004 Free Software Foundation, Inc. --
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. --
16 ------------------------------------------------------------------------------
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;
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
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
46 procedure Free_Hash_Table (Buckets : in out Buckets_Access);
49 (Buckets : Buckets_Type;
50 Node : Node_Access) return Hash_Type;
51 pragma Inline (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);
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;
79 procedure Delete_Node_Sans_Free
80 (HT : in out Hash_Table_Type;
83 function First (HT : Hash_Table_Type) return Node_Access;
86 (HT : Hash_Table_Type;
87 Node : Node_Access) return Node_Access;
90 with procedure Process (Node : Node_Access);
91 procedure Generic_Iteration (HT : Hash_Table_Type);
96 (Stream : access Root_Stream_Type'Class;
98 procedure Generic_Write
99 (Stream : access Root_Stream_Type'Class;
100 HT : Hash_Table_Type);
104 with function New_Node (Stream : access Root_Stream_Type'Class)
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;