home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / common / rbcache.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-07  |  1.9 KB  |  62 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1997                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1998                    *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. *
  13. * File rbcache.cpp
  14. *
  15. * Modification History:
  16. *
  17. *   Date        Name        Description
  18. *   03/20/97    aliu        Creation.
  19. *   04/29/97    aliu        Convert to use new Hashtable protocol.
  20. *   04/15/99    damiba      plugged in C hash table.
  21. *****************************************************************************************
  22. */
  23.  
  24. #include "rbcache.h"
  25.  
  26. ResourceBundleCache::ResourceBundleCache()
  27. {
  28.   UErrorCode err = U_ZERO_ERROR;
  29.   hashTable = uhash_open((UHashFunction)uhash_hashUString, &err);
  30.   uhash_setValueDeleter(hashTable, deleteValue);
  31. }
  32.  
  33. void ResourceBundleCache::deleteValue(void* value)
  34. {
  35.   uhash_close((UHashtable*)value);
  36. }
  37.  
  38. //----------------------------------------------------------------------------------
  39.  
  40. VisitedFileCache::VisitedFileCache()
  41. {
  42.   UErrorCode err = U_ZERO_ERROR;
  43.   hashTable = uhash_open((UHashFunction)uhash_hashUString, &err);
  44. }
  45.  
  46. VisitedFileCache::~VisitedFileCache()
  47. {
  48.   uhash_close(hashTable);
  49. }
  50.  
  51. ResourceBundleCache::~ResourceBundleCache()
  52. {
  53.   uhash_close(hashTable);
  54. }
  55.  
  56.  
  57. //eof
  58.  
  59.  
  60.  
  61.  
  62.