OSDN Git Service

* a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb, a-crbtgk.ads,
[pf3gnuchains/gcc-fork.git] / gcc / ada / a-chtgke.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT LIBRARY COMPONENTS                          --
4 --                                                                          --
5 --                 ADA.CONTAINERS.HASH_TABLES.GENERIC_KEYS                  --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 -- This specification is adapted from the Ada Reference Manual for use with --
10 -- GNAT.  In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification,  provided that if you redistribute a --
12 -- modified version,  any changes that you have made are clearly indicated. --
13 --                                                                          --
14 ------------------------------------------------------------------------------
15
16 generic
17    with package HT_Types is
18      new Generic_Hash_Table_Types (<>);
19
20    type HT_Type is new HT_Types.Hash_Table_Type with private;
21
22    use HT_Types;
23
24    Null_Node : Node_Access;
25
26    with function Next (Node : Node_Access) return Node_Access;
27
28    with procedure Set_Next
29      (Node : Node_Access;
30       Next : Node_Access);
31
32    type Key_Type (<>) is limited private;
33
34    with function Hash (Key : Key_Type) return Hash_Type;
35
36    with function Equivalent_Keys
37      (Key  : Key_Type;
38       Node : Node_Access) return Boolean;
39
40 package Ada.Containers.Hash_Tables.Generic_Keys is
41    pragma Preelaborate;
42
43    function Index
44      (HT  : HT_Type;
45       Key : Key_Type) return Hash_Type;
46    pragma Inline (Index);
47
48    procedure Delete_Key_Sans_Free
49      (HT   : in out HT_Type;
50       Key  : Key_Type;
51       X    : out Node_Access);
52
53    function Find (HT  : HT_Type; Key : Key_Type) return Node_Access;
54
55    generic
56       with function New_Node
57         (Next : Node_Access) return Node_Access;
58    procedure Generic_Conditional_Insert
59      (HT      : in out HT_Type;
60       Key     : Key_Type;
61       Node    : out Node_Access;
62       Success : out Boolean);
63
64 end Ada.Containers.Hash_Tables.Generic_Keys;