home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / libg++ / gperf / src / hash-table.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-12  |  1.4 KB  |  41 lines

  1. /* This may look like C code, but it is really -*- C++ -*- */
  2.  
  3. /* Hash table used to check for duplicate keyword entries.
  4.  
  5.    Copyright (C) 1989 Free Software Foundation, Inc.
  6.    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
  7.  
  8. This file is part of GNU GPERF.
  9.  
  10. GNU GPERF is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 1, or (at your option)
  13. any later version.
  14.  
  15. GNU GPERF is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with GNU GPERF; see the file COPYING.  If not, write to
  22. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  23.  
  24. #ifndef hash_table_h
  25. #define hash_table_h 1
  26. #include "list-node.h"
  27.  
  28. class Hash_Table 
  29. {
  30. private:
  31.   List_Node     **table;      /* Vector of pointers to linked lists of List_Node's. */
  32.   int             size;       /* Size of the vector. */
  33.   int             collisions; /* Find out how well our double hashing is working! */
  34.  
  35. public:
  36.                   Hash_Table (List_Node **t, int s);
  37.                  ~Hash_Table (void);
  38.   List_Node      *operator () (List_Node *item, int ignore_length);
  39. };
  40. #endif
  41.