1 ------------------------------------------------------------------------------
3 -- GNAT LIBRARY COMPONENTS --
5 -- A D A . C O N T A I N E R S . --
6 -- H A S H _ T A B L E S . G E N E R I C _ O P E R A T I O N S --
10 -- This specification is adapted from the Ada Reference Manual for use with --
11 -- GNAT. In accordance with the copyright of that document, you can freely --
12 -- copy and modify this specification, provided that if you redistribute a --
13 -- modified version, any changes that you have made are clearly indicated. --
15 ------------------------------------------------------------------------------
21 with package HT_Types
is
22 new Generic_Hash_Table_Types
(<>);
26 with function Hash_Node
(Node
: Node_Access
) return Hash_Type
;
28 with function Next
(Node
: Node_Access
) return Node_Access
;
30 with procedure Set_Next
34 with function Copy_Node
(Source
: Node_Access
) return Node_Access
;
36 with procedure Free
(X
: in out Node_Access
);
38 package Ada
.Containers
.Hash_Tables
.Generic_Operations
is
41 procedure Free_Hash_Table
(Buckets
: in out Buckets_Access
);
44 (Buckets
: Buckets_Type
;
45 Node
: Node_Access
) return Hash_Type
;
46 pragma Inline
(Index
);
49 (Hash_Table
: Hash_Table_Type
;
50 Node
: Node_Access
) return Hash_Type
;
51 pragma Inline
(Index
);
53 procedure Adjust
(HT
: in out Hash_Table_Type
);
55 procedure Finalize
(HT
: in out Hash_Table_Type
);
59 (HT
: Hash_Table_Type
;
60 Key
: Node_Access
) return Boolean;
61 function Generic_Equal
62 (L
, R
: Hash_Table_Type
) return Boolean;
64 procedure Clear
(HT
: in out Hash_Table_Type
);
66 procedure Move
(Target
, Source
: in out Hash_Table_Type
);
68 function Capacity
(HT
: Hash_Table_Type
) return Count_Type
;
70 procedure Reserve_Capacity
71 (HT
: in out Hash_Table_Type
;
74 procedure Delete_Node_Sans_Free
75 (HT
: in out Hash_Table_Type
;
78 function First
(HT
: Hash_Table_Type
) return Node_Access
;
81 (HT
: Hash_Table_Type
;
82 Node
: Node_Access
) return Node_Access
;
85 with procedure Process
(Node
: Node_Access
);
86 procedure Generic_Iteration
(HT
: Hash_Table_Type
);
91 (Stream
: access Root_Stream_Type
'Class;
93 procedure Generic_Write
94 (Stream
: access Root_Stream_Type
'Class;
95 HT
: Hash_Table_Type
);
99 with function New_Node
(Stream
: access Root_Stream_Type
'Class)
101 procedure Generic_Read
102 (Stream
: access Root_Stream_Type
'Class;
103 HT
: out Hash_Table_Type
);
105 end Ada
.Containers
.Hash_Tables
.Generic_Operations
;