ICU-610 Described replacement functions for the deprecated functions and put in a removeal date.

X-SVN-Rev: 2495
This commit is contained in:
George Rhoten 2000-09-22 23:03:40 +00:00
parent 2cf8109556
commit 3d38863a50
7 changed files with 68 additions and 72 deletions

View File

@ -39,7 +39,7 @@
* Reworked to use new binary format.
* Cleaned up.
* 06/14/99 stephen Removed methods taking a filename suffix.
* 11/09/99 weiv Added getLocale(), fRealLocale, removed fRealLocaleID
* 11/09/99 weiv Added getLocale(), fRealLocale, removed fRealLocaleID
*******************************************************************************
*/
@ -180,13 +180,13 @@ public:
UErrorCode& err);
ResourceBundle( const UnicodeString& path,
UErrorCode& err);
ResourceBundle(UErrorCode &err);
ResourceBundle(UErrorCode &err);
ResourceBundle( const wchar_t* path,
const Locale& locale,
UErrorCode& err);
ResourceBundle( const char* path,
const Locale& locale,
UErrorCode& err);
ResourceBundle( const char* path,
const Locale& locale,
UErrorCode& err);
ResourceBundle(const ResourceBundle &original);
ResourceBundle(UResourceBundle *res, UErrorCode &status);
@ -329,7 +329,7 @@ public:
* specified tag couldn't be found.
* @return A pointer to the string from the resource bundle, or NULL if there was
* an error.(its lifetime is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use getStringEx() instead.
*/
const UnicodeString* getString( const char *resourceTag,
UErrorCode& err) const;
@ -351,7 +351,7 @@ public:
* @return The resource requested, as a pointer to an array of
* UnicodeStrings. The caller does not own the storage and
* must not delete it. (its lifetime is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use getStringEx() instead.
*/
const UnicodeString* getStringArray( const char *resourceTag,
int32_t& numArrayItems,
@ -371,7 +371,7 @@ public:
* specified tag couldn't be found, or if the index was out of range.
* @return A pointer to the text of the array item, or NULL is there was an error.
* (its lifetime is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use getStringEx() instead.
*/
const UnicodeString* getArrayItem( const char *resourceTag,
int32_t index,
@ -394,7 +394,7 @@ public:
* @return The resource requested, as a UnicodeStrings**. The caller
* does not own the storage and must not delete it. (its lifetime
* is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use ures_getBinary instead.
*/
const UnicodeString** get2dArray(const char *resourceTag,
int32_t& rowCount,
@ -418,7 +418,7 @@ public:
* the wrong format, or if either index is out of bounds.
* @return A pointer to the text of the array item, or NULL is there was an error.
* (its lifetime is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use ures_getBinary instead.
*/
const UnicodeString* get2dArrayItem( const char *resourceTag,
int32_t rowIndex,
@ -440,7 +440,7 @@ public:
* with the specified item tag coldn't be found in the resource.
* @return A pointer to the text of the array item, or NULL is there was an error.
* (its lifetime is that of the resource bundle.)
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use getStringEx() instead.
*/
const UnicodeString* getTaggedArrayItem( const char *resourceTag,
const UnicodeString& itemTag,
@ -467,7 +467,7 @@ public:
* items and itemTags.
* @param err Set to U_MISSING_RESOURCE_ERROR if a resource with the
* specified tag couldn't be found.
* @deprecated to be removed in first release in 2001
* @deprecated to be removed in first release in 2001. Use getStringEx() instead.
*/
void getTaggedArray( const char *resourceTag,
UnicodeString*& itemTags,
@ -498,13 +498,13 @@ public:
void getVersion(UVersionInfo versionInfo) const;
/**
* Return the Locale associated with this ResourceBundle.
*
* @return a Locale object
/**
* Return the Locale associated with this ResourceBundle.
*
* @return a Locale object
* @draft
*/
const Locale &getLocale(void) const ;
*/
const Locale &getLocale(void) const ;
private:
UResourceBundle *resource;
@ -525,9 +525,9 @@ private:
private:
static void U_CALLCONV deleteValue(void* value);
Locale fRealLocale;
Locale fRealLocale;
UHashtable* fItemCache;
UHashtable* fItemCache;
static const char* kDefaultSuffix;
static const int32_t kDefaultSuffixLen;
static const char* kDefaultFilename;

View File

@ -18,11 +18,11 @@
// C++ Wrappers for Unicode
// CHANGES BY
// Madhu Katragadda
// 5/20/99 Madhu Added the function getVersion()
// 5/20/99 Madhu Added the function getVersion()
// 11/22/99 aliu Added MIN_RADIX, MAX_RADIX, digit, forDigit
//********************************************************************************************
#ifndef UNICODE_H
#define UNICODE_H
@ -124,14 +124,14 @@ public:
DASH_PUNCTUATION = 19,
START_PUNCTUATION = 20,
END_PUNCTUATION = 21,
CONNECTOR_PUNCTUATION = 22,
CONNECTOR_PUNCTUATION = 22,
OTHER_PUNCTUATION = 23,
MATH_SYMBOL = 24,
CURRENCY_SYMBOL = 25,
MODIFIER_SYMBOL = 26,
OTHER_SYMBOL = 27,
INITIAL_PUNCTUATION = 28,
FINAL_PUNCTUATION = 29,
INITIAL_PUNCTUATION = 28,
FINAL_PUNCTUATION = 29,
GENERAL_TYPES_COUNT = 30
};
@ -213,26 +213,26 @@ public:
*/
enum EDirectionProperty {
LEFT_TO_RIGHT = 0,
RIGHT_TO_LEFT = 1,
EUROPEAN_NUMBER = 2,
EUROPEAN_NUMBER_SEPARATOR = 3,
EUROPEAN_NUMBER_TERMINATOR = 4,
ARABIC_NUMBER = 5,
COMMON_NUMBER_SEPARATOR = 6,
BLOCK_SEPARATOR = 7,
SEGMENT_SEPARATOR = 8,
WHITE_SPACE_NEUTRAL = 9,
OTHER_NEUTRAL = 10,
LEFT_TO_RIGHT_EMBEDDING = 11,
LEFT_TO_RIGHT_OVERRIDE = 12,
RIGHT_TO_LEFT_ARABIC = 13,
RIGHT_TO_LEFT_EMBEDDING = 14,
RIGHT_TO_LEFT_OVERRIDE = 15,
POP_DIRECTIONAL_FORMAT = 16,
DIR_NON_SPACING_MARK = 17,
BOUNDARY_NEUTRAL = 18
RIGHT_TO_LEFT = 1,
EUROPEAN_NUMBER = 2,
EUROPEAN_NUMBER_SEPARATOR = 3,
EUROPEAN_NUMBER_TERMINATOR = 4,
ARABIC_NUMBER = 5,
COMMON_NUMBER_SEPARATOR = 6,
BLOCK_SEPARATOR = 7,
SEGMENT_SEPARATOR = 8,
WHITE_SPACE_NEUTRAL = 9,
OTHER_NEUTRAL = 10,
LEFT_TO_RIGHT_EMBEDDING = 11,
LEFT_TO_RIGHT_OVERRIDE = 12,
RIGHT_TO_LEFT_ARABIC = 13,
RIGHT_TO_LEFT_EMBEDDING = 14,
RIGHT_TO_LEFT_OVERRIDE = 15,
POP_DIRECTIONAL_FORMAT = 16,
DIR_NON_SPACING_MARK = 17,
BOUNDARY_NEUTRAL = 18
};
/**
* Values returned by the getCellWidth() function.
* @see Unicode#getCellWidth
@ -702,7 +702,7 @@ public:
* Note: This method corresponds to the Java method
* <tt>java.lang.Character.isWhitespace()</tt>.
*
* @param ch the character to be tested.
* @param ch the character to be tested.
* @return true if the character is an ICU whitespace character;
* false otherwise.
* @see #isSpaceChar
@ -885,7 +885,7 @@ public:
* @see Unicode#digit
* @see Unicode#forDigit
* @see Unicode#isDigit
* @deprecated HSYS: use Unicode::digit instead.
* @deprecated HSYS: use Unicode::digit instead. Remove after 2000-dec-31
*/
static inline int32_t digitValue(UChar32 ch);
@ -927,7 +927,7 @@ public:
* @draft
*/
static inline int8_t digit(UChar32 ch, int8_t radix);
/**
* Determines the character representation for a specific digit in
* the specified radix. If the value of <code>radix</code> is not a
@ -962,7 +962,7 @@ public:
* @param info the version # information, the result will be filled in
* @draft
*/
static void getUnicodeVersion(UVersionInfo info);
static void getUnicodeVersion(UVersionInfo info);
protected:
// These constructors, destructor, and assignment operator must
@ -1230,7 +1230,7 @@ Unicode::forDigit(int32_t digit, int8_t radix) {
inline void
Unicode::getUnicodeVersion(UVersionInfo versionArray) {
u_getUnicodeVersion(versionArray);
u_getUnicodeVersion(versionArray);
}
#endif

View File

@ -2086,27 +2086,27 @@ public:
//========================================
/* size() -> length()
* @deprecated */
* @deprecated Remove after 2000-dec-31. Use length() instead. */
inline int32_t size(void) const;
// parameters reordered for consistency
/* @deprecated */
/* @deprecated To be removed in first release in 2001. Use the other versions of this function */
inline UnicodeString& findAndReplace(const UnicodeString& oldText,
const UnicodeString& newText,
UTextOffset start,
int32_t length);
/* @deprecated */
/* @deprecated Remove after 2000-dec-31. There is no replacement. */
inline void* operator new(size_t size);
/* @deprecated */
/* @deprecated Remove after 2000-dec-31. There is no replacement. */
inline void* operator new(size_t size, void *location);
/* @deprecated */
/* @deprecated Remove after 2000-dec-31. There is no replacement. */
inline void operator delete(void *location);
//========================================
// Non-public API - will be removed!
//========================================
/* @deprecated */
/* @deprecated Remove after 2000-dec-31. There is no public replacement. */
const UChar* getUChars() const;
};

View File

@ -15,7 +15,7 @@
* 04/15/99 Madhu Updated Javadoc
* 06/14/99 stephen Removed functions taking a filename suffix.
* 07/20/99 stephen Language-independent ypedef to void*
* 11/09/99 weiv Added ures_getLocale()
* 11/09/99 weiv Added ures_getLocale()
*******************************************************************************
*/
@ -193,8 +193,8 @@ typedef enum {
* @draft
*/
U_CAPI UResourceBundle* U_EXPORT2 ures_open(const char* path, /* NULL if none */
const char* locale, /* NULL if none */
UErrorCode* status);
const char* locale, /* NULL if none */
UErrorCode* status);
/**
@ -238,7 +238,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_openU(const UChar* path,
* @see ures_getArrayItem
* @see ures_get2dArrayItem
* @see ures_getTaggedItem
* @deprecated
* @deprecated Remove after 2000-dec-31. Use ures_getStringByKey instead.
*/
U_CAPI const UChar* U_EXPORT2 ures_get(const UResourceBundle* resourceBundle,
const char* resourceTag,
@ -261,7 +261,7 @@ U_CAPI const UChar* U_EXPORT2 ures_get(const UResourceBundle* resourceBundle,
* @see ures_get
* @see ures_get2dArrayItem
* @see ures_getTaggedItem
* @deprecated
* @deprecated Remove after 2000-dec-31. Use ures_getByKey and ures_getByIndex instead.
*/
U_CAPI const UChar* U_EXPORT2 ures_getArrayItem(const UResourceBundle* resourceBundle,
const char* resourceTag,
@ -286,9 +286,8 @@ U_CAPI const UChar* U_EXPORT2 ures_getArrayItem(const UResourceBundle* resou
* @see ures_get
* @see ures_getArrayItem
* @see ures_getTaggedItem
* @deprecated
* @deprecated Remove after 2000-dec-31. Use ures_getBinary instead.
*/
U_CAPI const UChar* U_EXPORT2 ures_get2dArrayItem(const UResourceBundle* resourceBundle,
const char* resourceTag,
int32_t rowIndex,
@ -311,9 +310,8 @@ U_CAPI const UChar* U_EXPORT2 ures_get2dArrayItem(const UResourceBundle* resou
* @see ures_get
* @see ures_getArrayItem
* @see ures_get2dItem
* @deprecated
* @deprecated Remove after 2000-dec-31. Use ures_getByKey and ures_getByIndex instead.
*/
U_CAPI const UChar* U_EXPORT2 ures_getTaggedArrayItem(const UResourceBundle* resourceBundle,
const char* resourceTag,
const char* itemTag,
@ -339,7 +337,6 @@ U_CAPI const UChar* U_EXPORT2 ures_getTaggedArrayItem(const UResourceBundle* r
*@see ures_get2dArrayItem
*@draft
*/
U_CAPI int32_t U_EXPORT2 ures_countArrayItems(const UResourceBundle* resourceBundle,
const char* resourceKey,
UErrorCode* err);
@ -376,7 +373,6 @@ U_CAPI void U_EXPORT2 ures_close(UResourceBundle* resourceBundle);
* string.
* @draft
*/
U_CAPI const char* U_EXPORT2 ures_getVersionNumber(const UResourceBundle* resourceBundle);
U_CAPI void U_EXPORT2 ures_getVersion(const UResourceBundle* resB, UVersionInfo versionInfo);

View File

@ -210,14 +210,14 @@ public:
/**
* Get the text for which this object is finding the boundaries.
* @deprecated This will be removed after 2000-Dec-31.
* @deprecated This will be removed after 2000-Dec-31. Use getText() instead.
*/
virtual CharacterIterator* createText(void) const = 0;
/**
* Change the text over which this operates. The text boundary is
* reset to the start.
* @deprecated This function should be modified to take a const UnicodeString& argument.
* @deprecated Use setText(const UnicodeString&) instead.
*/
virtual void setText(const UnicodeString* it) = 0;

View File

@ -299,7 +299,7 @@ RuleBasedBreakIterator(UDataMemory* image);
* @deprecated This will be removed after 2000-Dec-31.
* THIS FUNCTION SHOULD NOT BE HERE. IT'S HERE BECAUSE BreakIterator DEFINES
* IT AS PURE VIRTUAL, FORCING RBBI TO IMPLEMENT IT. IT SHOULD BE REMOVED
* FROM *BOTH* CLASSES.
* FROM *BOTH* CLASSES. Use getText() instead.
*/
virtual CharacterIterator* createText(void) const;
@ -325,7 +325,7 @@ RuleBasedBreakIterator(UDataMemory* image);
* @deprecated
* THIS FUNCTION SHOULD NOT BE HERE. IT'S HERE BECAUSE BreakIterator DEFINES
* IT AS PURE VIRTUAL, FORCING RBBI TO IMPLEMENT IT. IT SHOULD BE REMOVED
* FROM *BOTH* CLASSES.
* FROM *BOTH* CLASSES. Use the other setText() instead.
*/
virtual void setText(const UnicodeString* newText);

View File

@ -418,7 +418,7 @@ public:
void setDSTSavings(int32_t millisSavedDuringDST, UErrorCode& status);
/**
* @deprecated
* @deprecated This will be removed after 2000-Dec-31. Use the other setDSTSavings().
*/
void setDSTSavings(int32_t millisSavedDuringDST);