ICU-2080 deprecated, documented and added APIs

X-SVN-Rev: 13631
This commit is contained in:
Vladimir Weinstein 2003-11-07 08:58:19 +00:00
parent 877e86fcd8
commit f3fdcaaf02
2 changed files with 43 additions and 9 deletions
icu4c/source/common/unicode

View file

@ -184,6 +184,9 @@ public:
/**
* Returns the size of a resource. Size for scalar types is always 1, and for vector/table types is
* the number of child resources.
* @warning Integer array is treated as a scalar type. There are no
* APIs to access individual members of an integer array. It
* is always returned as a whole.
*
* @return number of resources in a given resource.
* @stable ICU 2.0
@ -400,7 +403,7 @@ public:
* @return A version number string as specified in the resource bundle or its parent.
* The caller does not own this string.
* @see getVersion
* @stable ICU 2.0
* @deprecated ICU 2.8 Use getVersion instead.
*/
const char*
getVersionNumber(void) const;
@ -419,11 +422,24 @@ public:
* Return the Locale associated with this ResourceBundle.
*
* @return a Locale object
* @stable ICU 2.0
* @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCode &status) overload instead.
*/
const Locale&
getLocale(void) const;
/**
* Return the Locale associated with this ResourceBundle.
* @param type You can choose between requested, valid and actual
* locale. For description see the definition of
* ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments
*
* @return a Locale object
* @draft ICU 2.8
*/
const Locale
getLocale(ULocDataLocaleType type, UErrorCode &status) const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*

View file

@ -222,7 +222,7 @@ ures_openU(const UChar* path,
* <STRONG>Tables</STRONG>: returns the number of resources in the table
* <STRONG>single string</STRONG>: returns 1
*@see ures_getSize
* @stable ICU 2.0
* @deprecated ICU 2.8 User ures_getSize instead
*/
U_CAPI int32_t U_EXPORT2
ures_countArrayItems(const UResourceBundle* resourceBundle,
@ -247,7 +247,7 @@ ures_close(UResourceBundle* resourceBundle);
* @return A version number string as specified in the resource bundle or its parent.
* The caller does not own this string.
* @see ures_getVersion
* @stable ICU 2.0
* @deprecated ICU 2.8 Use ures_getVersion instead.
*/
U_CAPI const char* U_EXPORT2
ures_getVersionNumber(const UResourceBundle* resourceBundle);
@ -275,12 +275,31 @@ ures_getVersion(const UResourceBundle* resB,
* @param resourceBundle resource bundle in question
* @param status just for catching illegal arguments
* @return A Locale name
* @stable ICU 2.0
* @deprecated ICU 2.8 Use ures_getLocaleByType instead.
*/
U_CAPI const char* U_EXPORT2
ures_getLocale(const UResourceBundle* resourceBundle,
UErrorCode* status);
/**
* Return the name of the Locale associated with this ResourceBundle.
* You can choose between requested, valid and real locale.
*
* @param resourceBundle resource bundle in question
* @param type You can choose between requested, valid and actual
* locale. For description see the definition of
* ULocDataLocaleType in uloc.h
* @param status just for catching illegal arguments
* @return A Locale name
* @draft ICU 2.8
*/
U_CAPI const char* U_EXPORT2
ures_getLocaleByType(const UResourceBundle* resourceBundle,
ULocDataLocaleType type,
UErrorCode* status);
/**
* Same as ures_open() but uses the fill-in parameter instead of allocating
* a bundle, if r!=NULL.
@ -409,10 +428,9 @@ ures_getInt(const UResourceBundle* resourceBundle,
/**
* Returns the size of a resource. Size for scalar types is always 1,
* and for vector/table types is the number of child resources.
* @warning Currently, this function works correctly for string, table and
* array resources. For other types of resources, the result is
* undefined. This is a bug and will be fixed.
*
* @warning Integer array is treated as a scalar type. There are no
* APIs to access individual members of an integer array. It
* is always returned as a whole.
* @param resourceBundle a resource
* @return number of resources in a given resource.
* @stable ICU 2.0