Hosted by
|
with Limited_Hash_Tables;
with Strings; use Strings;
generic
type Item_Type is private;
package String_Hash_Tables is
package Inner_Tables is new Limited_Hash_Tables(String_Access, 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 String;
Item : in Item_Type);
procedure Get
(This : access Hash_Table;
Key : in String;
Item : out Item_Type;
Found : out Boolean);
function Get
(This : access Hash_Table;
Key : in String)
return Item_Type;
procedure Get_Index
(This : access Hash_Table;
Key : in String;
Index : out Positive;
Found : out Boolean);
function Get_Index
(This : access Hash_Table;
Key : in String)
return Positive;
function Get_Key
(This : access Hash_Table;
Index : in Positive)
return String;
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 Print_Usage
(This : access Hash_Table)
renames Inner_Tables.Print_Usage;
end String_Hash_Tables;
|