From c268948bcbfaf022f8f906fec7b23de0fffaa7e6 Mon Sep 17 00:00:00 2001 From: Vladimir Weinstein Date: Fri, 10 Aug 2001 21:18:07 +0000 Subject: [PATCH] ICU-1078 C++ API for IntVector X-SVN-Rev: 5455 --- icu4c/source/common/resbund.cpp | 4 ++++ icu4c/source/common/unicode/resbund.h | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/icu4c/source/common/resbund.cpp b/icu4c/source/common/resbund.cpp index e9de1c41c16..403c2252e00 100644 --- a/icu4c/source/common/resbund.cpp +++ b/icu4c/source/common/resbund.cpp @@ -290,6 +290,10 @@ const uint8_t *ResourceBundle::getBinary(int32_t& len, UErrorCode& status) const return ures_getBinary(resource, &len, &status); } +const int32_t *ResourceBundle::getIntVector(int32_t& len, UErrorCode& status) const { + return ures_getIntVector(resource, &len, &status); +} + const char *ResourceBundle::getName(void) { return ures_getName(resource); } diff --git a/icu4c/source/common/unicode/resbund.h b/icu4c/source/common/unicode/resbund.h index 4ade23bd3fe..229e8270b4d 100644 --- a/icu4c/source/common/unicode/resbund.h +++ b/icu4c/source/common/unicode/resbund.h @@ -232,11 +232,26 @@ public: * could be U_MISSING_RESOURCE_ERROR if the key is not found * could be a non-failing error * e.g.: U_USING_FALLBACK_ERROR,U_USING_DEFAULT_ERROR - * @return a pointer to a chuck of unsigned bytes which live in a memory mapped/DLL file. + * @return a pointer to a chunk of unsigned bytes which live in a memory mapped/DLL file. * @stable */ const uint8_t *getBinary(int32_t& len, UErrorCode& status) const; + + /** + * returns an integer vector from a resource. + * + * @param resourceBundle: a string resource + * @param len: fills in the length of resulting integer vector + * @param status: fills in the outgoing error code + * could be U_MISSING_RESOURCE_ERROR if the key is not found + * could be a non-failing error + * e.g.: U_USING_FALLBACK_ERROR,U_USING_DEFAULT_ERROR + * @return a pointer to a vector of integers that lives in a memory mapped/DLL file. + * @stable + */ + const int32_t *getIntVector(int32_t& len, UErrorCode& status) const; + /** * Checks whether the resource has another element to iterate over. *