-- The Ada Structured Library - A set of container classes and general -- tools for use with Ada95. -- Copyright (C) 1998 Corey Minyard (minyard@acm.org) -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- -- You should have received a copy of the GNU Library General Public -- License along with this library; if not, write to the Free -- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -- MA 02111-1307, USA -- -- The hash table base. All hash tables implement the interface defined -- here. Actually, there is not much because hash tables only implement -- the standard functionality defined in Asgc. The do need a hash -- function, and the quality of the hash table has a direct correlation -- with the hash function chosen and the size of the hash table. Read -- your data structures book for more info. generic with function Do_Hash (Val : in Contained_Type) return Natural; package Asgc.Hash is ------------------------------------------------------------------------ -- This is the hash container. type Object is abstract new Asgc.Object with private; type Object_Class is access all Object'Class; function "=" (O1, O2 : in Object) return Boolean is abstract; ------------------------------------------------------------------------ -- An iterator for a hash container. type Iterator is abstract new Asgc.Iterator with private; type Iterator_Class is access all Iterator'Class; function "=" (Iter1, Iter2 : in Iterator) return Boolean is abstract; Internal_Hash_Error : exception; private type Object is abstract new Asgc.Object with null record; type Iterator is abstract new Asgc.Iterator with null record; end Asgc.Hash;