add MappingCache

This commit is contained in:
ftang@netscape.com
1999-05-10 23:19:21 +00:00
parent c2600d7806
commit 6654bcfcf3
9 changed files with 166 additions and 154 deletions

View File

@@ -19,10 +19,12 @@
#include "pratom.h"
#include "unicpriv.h"
#include "nsIUnicodeDecoder.h"
#include "nsUConvDll.h"
#include "nsIMappingCache.h"
#include "nsMappingCache.h"
#include "nsIUnicodeDecodeHelper.h"
#include "nsUnicodeDecodeHelper.h"
#include "nsUConvDll.h"
#include "nsIUnicodeDecoder.h"
//----------------------------------------------------------------------
// Class nsUnicodeDecodeHelper [declaration]
@@ -68,6 +70,10 @@ public:
NS_IMETHOD CreateFastTable( uShiftTable * aShiftTable,
uMappingTable * aMappingTable, PRUnichar * aFastTable,
PRInt32 aTableSize);
NS_IMETHOD CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult);
NS_IMETHOD DestroyCache(nsIMappingCache aResult);
};
//----------------------------------------------------------------------
@@ -193,6 +199,16 @@ NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByMultiTable(
return res;
}
NS_IMETHODIMP nsUnicodeDecodeHelper::CreateCache(nsMappingCacheType aType, nsIMappingCache* aResult)
{
return nsMappingCache::CreateCache(aType, aResult);
}
NS_IMETHODIMP nsUnicodeDecodeHelper::DestroyCache(nsIMappingCache aCache)
{
return nsMappingCache::DestroyCache(aCache);
}
NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByFastTable(
const char * aSrc,
PRInt32 * aSrcLength,