Hosted by
|
with Limited_Hash_Tables;
generic
type Key_Type is private;
type Item_Type is private;
with function Hash
(Key : in Key_Type;
Max : in Positive)
return Positive
is <>;
with function Equal
(Left, Right : in Key_Type)
return Boolean
is <>;
package Hash_Tables is
package Inner_Tables is new Limited_Hash_Tables(Key_Type, Item_Type);
subtype Hash_Table is Inner_Tables.Hash_Table;
subtype Hash_Table_Access is Inner_Tables.Hash_Table_Access;
function Create
(Size : in Positive := Inner_Tables.Default_Start_Size)
return Hash_Table_Access
renames Inner_Tables.Create;
procedure Put
(This : in out Hash_Table_Access;
Key : in Key_Type;
Item : in Item_Type);
function Get
(This : access Hash_Table;
Key : in Key_Type)
return Item_Type;
function Get_Index
(This : access Hash_Table;
Key : in Key_Type)
return Positive
renames Inner_Tables.Get_Index;
function Get_Key
(This : access Hash_Table;
Index : in Positive)
return Key_Type
renames Inner_Tables.Get_Key;
function Get_Item
(This : access Hash_Table;
Index : in Positive)
return Item_Type
renames Inner_Tables.Get_Item;
procedure Next
(This : access Hash_Table;
Index : in out Natural)
renames Inner_Tables.Next;
procedure Get_Next
(This : access Hash_Table;
Index : in out Natural;
Key : out Key_Type;
Item : out Item_Type);
procedure Print_Usage
(This : access Hash_Table)
renames Inner_Tables.Print_Usage;
end Hash_Tables;
|