1999-08-16 21:50:52 +00:00
|
|
|
/*
|
1999-12-09 23:27:55 +00:00
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 1997-1999, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*
|
|
|
|
* File rbcache.cpp
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
*
|
|
|
|
* Date Name Description
|
|
|
|
* 03/20/97 aliu Creation.
|
|
|
|
* 04/29/97 aliu Convert to use new Hashtable protocol.
|
|
|
|
* 04/15/99 damiba plugged in C hash table.
|
|
|
|
*****************************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "rbcache.h"
|
|
|
|
|
|
|
|
ResourceBundleCache::ResourceBundleCache()
|
|
|
|
{
|
1999-10-07 00:07:53 +00:00
|
|
|
UErrorCode err = U_ZERO_ERROR;
|
2000-03-28 22:04:39 +00:00
|
|
|
hashTable = uhash_open((UHashFunction)uhash_OLD_hashUString,
|
|
|
|
uhash_OLD_pointerComparator, &err);
|
1999-08-16 21:50:52 +00:00
|
|
|
uhash_setValueDeleter(hashTable, deleteValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ResourceBundleCache::deleteValue(void* value)
|
|
|
|
{
|
|
|
|
uhash_close((UHashtable*)value);
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
VisitedFileCache::VisitedFileCache()
|
|
|
|
{
|
1999-10-07 00:07:53 +00:00
|
|
|
UErrorCode err = U_ZERO_ERROR;
|
2000-03-28 22:04:39 +00:00
|
|
|
hashTable = uhash_open((UHashFunction)uhash_OLD_hashUString,
|
|
|
|
uhash_OLD_pointerComparator, &err);
|
1999-08-16 21:50:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VisitedFileCache::~VisitedFileCache()
|
|
|
|
{
|
|
|
|
uhash_close(hashTable);
|
|
|
|
}
|
|
|
|
|
|
|
|
ResourceBundleCache::~ResourceBundleCache()
|
|
|
|
{
|
|
|
|
uhash_close(hashTable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//eof
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|