ICU-4296 Reduce the number of exported functions

X-SVN-Rev: 17102
This commit is contained in:
George Rhoten 2005-01-09 05:18:02 +00:00
parent 1e448b76b2
commit aa10d84499
6 changed files with 33 additions and 49 deletions

View File

@ -300,7 +300,7 @@ Transliterator* AnyTransliterator::getTransliterator(UScriptCode source) const {
/**
* Return the script code for a given name, or -1 if not found.
*/
UScriptCode AnyTransliterator::scriptNameToCode(const UnicodeString& name) {
static UScriptCode scriptNameToCode(const UnicodeString& name) {
char buf[128];
UScriptCode code;
UErrorCode ec = U_ZERO_ERROR;

View File

@ -124,12 +124,6 @@ private:
static void registerIDs();
friend class Transliterator; // for registerIDs()
/**
* Return the script code for a given name, or
* USCRIPT_INVALID_CODE if not found.
*/
static UScriptCode scriptNameToCode(const UnicodeString& name);
};
U_NAMESPACE_END

View File

@ -111,6 +111,24 @@ static const UChar gLastResortZoneStrings[5][4] =
{0x0047, 0x004D, 0x0054, 0x0000} /* "GMT" */
};
/* Sizes for the last resort string arrays */
typedef enum LastResortSize {
kMonthNum = 13,
kMonthLen = 3,
kDayNum = 8,
kDayLen = 2,
kAmPmNum = 2,
kAmPmLen = 3,
kEraNum = 2,
kEraLen = 3,
kZoneNum = 5,
kZoneLen = 4
} LastResortSize;
U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateFormatSymbols)
@ -509,8 +527,8 @@ DateFormatSymbols::setLocalPatternChars(const UnicodeString& newLocalPatternChar
//------------------------------------------------------
void
DateFormatSymbols::initField(UnicodeString **field, int32_t& length, const UResourceBundle *data, UErrorCode &status) {
static void
initField(UnicodeString **field, int32_t& length, const UResourceBundle *data, UErrorCode &status) {
if (U_SUCCESS(status)) {
int32_t strLen = 0;
length = ures_getSize(data);
@ -529,8 +547,8 @@ DateFormatSymbols::initField(UnicodeString **field, int32_t& length, const UReso
}
}
void
DateFormatSymbols::initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status) {
static void
initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status) {
if (U_SUCCESS(status)) {
length = numStr;
*field = newUnicodeStringArray((size_t)numStr);

View File

@ -20,26 +20,26 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RemoveTransliterator)
/**
* Factory method
*/
static Transliterator* RemoveTransliterator_create(const UnicodeString& /*ID*/,
Transliterator::Token /*context*/) {
/* We don't need the ID or context. We just remove data */
return new RemoveTransliterator();
}
/**
* System registration hook.
*/
void RemoveTransliterator::registerIDs() {
Transliterator::_registerFactory(::ID, _create, integerToken(0));
Transliterator::_registerFactory(::ID, RemoveTransliterator_create, integerToken(0));
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"),
UNICODE_STRING_SIMPLE("Null"), FALSE);
}
/**
* Factory method
*/
Transliterator* RemoveTransliterator::_create(const UnicodeString& /*ID*/,
Token /*context*/) {
/* We don't need the ID or context. We just remove data */
return new RemoveTransliterator();
}
RemoveTransliterator::RemoveTransliterator() : Transliterator(::ID, 0) {}
RemoveTransliterator::~RemoveTransliterator() {}

View File

@ -73,12 +73,6 @@ public:
*/
static UClassID U_EXPORT2 getStaticClassID();
private:
/**
* Factory method
*/
static Transliterator* _create(const UnicodeString& ID, Token context);
};
U_NAMESPACE_END

View File

@ -391,30 +391,8 @@ private:
char validLocale[ULOC_FULLNAME_CAPACITY];
char actualLocale[ULOC_FULLNAME_CAPACITY];
/* Sizes for the last resort string arrays */
typedef enum LastResortSize {
kMonthNum = 13,
kMonthLen = 3,
kDayNum = 8,
kDayLen = 2,
kAmPmNum = 2,
kAmPmLen = 3,
kEraNum = 2,
kEraLen = 3,
kZoneNum = 5,
kZoneLen = 4
} LastResortSize;
DateFormatSymbols(); // default constructor not implemented
void initField(UnicodeString **field, int32_t& length, const UResourceBundle *data, UErrorCode &status);
void initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status);
/**
* Called by the constructors to actually load data from the resources
*