1999-10-18 22:48:32 +00:00
|
|
|
/*
|
1999-12-09 23:27:55 +00:00
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 1999, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
1999-10-18 22:48:32 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* ucnv_imp.h:
|
|
|
|
* Contains all internal and external data structure definitions
|
|
|
|
* Created & Maitained by Bertrand A. Damiba
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* ATTENTION:
|
|
|
|
* ---------
|
|
|
|
* Although the data structures in this file are open and stack allocatable
|
|
|
|
* we reserve the right to hide them in further releases.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UCNV_IMP_H
|
|
|
|
#define UCNV_IMP_H
|
|
|
|
|
1999-12-28 23:39:02 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-10-22 21:27:33 +00:00
|
|
|
|
|
|
|
#ifndef UHASH_H
|
|
|
|
typedef struct _UHashtable UHashtable;
|
|
|
|
#endif
|
1999-10-18 22:48:32 +00:00
|
|
|
|
|
|
|
/*Hashtable used to store UConverterSharedData objects supporting
|
|
|
|
*the Caching mechanism
|
|
|
|
*/
|
|
|
|
extern UHashtable *SHARED_DATA_HASHTABLE;
|
|
|
|
|
|
|
|
/*Hashtable generated (lazy eval) by algorithmicConverterNames for fast lookup
|
|
|
|
*Behaviour is completely different for the Algorithmic conversions.
|
|
|
|
*we use this table to as a litmus test.
|
|
|
|
*/
|
|
|
|
extern UHashtable *ALGORITHMIC_CONVERTERS_HASHTABLE;
|
|
|
|
|
|
|
|
|
|
|
|
/* figures out if we need to go to file to read in the data tables.
|
|
|
|
*/
|
|
|
|
UConverter *createConverter (const char *converterName, UErrorCode * err);
|
|
|
|
|
|
|
|
/* Stores the shared data in the SHARED_DATA_HASHTABLE
|
|
|
|
*/
|
|
|
|
void shareConverterData (UConverterSharedData * data);
|
|
|
|
|
|
|
|
/* gets the shared data from the SHARED_DATA_HASHTABLE (might return NULL if it isn't there)
|
|
|
|
*/
|
|
|
|
UConverterSharedData *getSharedConverterData (const char *name);
|
|
|
|
|
|
|
|
/* Deletes (frees) the Shared data it's passed. first it checks the referenceCounter to
|
|
|
|
* see if anyone is using it, if not it frees all the memory stemming from sharedConverterData and
|
|
|
|
* returns TRUE,
|
|
|
|
* otherwise returns FALSE
|
|
|
|
*/
|
|
|
|
bool_t deleteSharedConverterData (UConverterSharedData * sharedConverterData);
|
|
|
|
|
|
|
|
/* returns true if "name" is in algorithmicConverterNames
|
|
|
|
*/
|
|
|
|
bool_t isDataBasedConverter (const char *name);
|
|
|
|
|
|
|
|
void copyPlatformString (char *platformString, UConverterPlatform pltfrm);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _UCNV_IMP */
|