]> granicus.if.org Git - icu/commitdiff
ICU-11986 use prefix Resource for C++ classes, prefix UResource for C types
authorMarkus Scherer <markus.icu@gmail.com>
Wed, 18 Nov 2015 00:18:28 +0000 (00:18 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Wed, 18 Nov 2015 00:18:28 +0000 (00:18 +0000)
X-SVN-Rev: 38087

icu4c/source/common/Makefile.in
icu4c/source/common/common.vcxproj
icu4c/source/common/common.vcxproj.filters
icu4c/source/common/resource.cpp [moved from icu4c/source/common/uresource.cpp with 53% similarity]
icu4c/source/common/resource.h [moved from icu4c/source/common/uresource.h with 78% similarity]
icu4c/source/common/uresbund.cpp
icu4c/source/common/uresdata.cpp
icu4c/source/common/uresdata.h
icu4c/source/common/uresimp.h
icu4c/source/i18n/measfmt.cpp

index 0d159731736319090d676d5470f87aba25c2fac9..a174a465bfa8987b1877509c649c759d821bd229 100644 (file)
@@ -84,7 +84,7 @@ uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o uvectr64.o \
 ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
 ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \
 ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o ucnv_ct.o \
-uresource.o uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
+resource.o uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
 messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o loclikely.o locresdata.o \
 bytestream.o stringpiece.o \
 stringtriebuilder.o bytestriebuilder.o \
index 2acb43f024e06e6361916994d9094beb7d04a597..cdcfcfb0f42f29a48b2ee883554b65769f3ce58e 100644 (file)
     <ClCompile Include="ures_cnv.c" />
     <ClCompile Include="uresbund.cpp" />
     <ClCompile Include="uresdata.cpp" />
-    <ClCompile Include="uresource.cpp" />
+    <ClCompile Include="resource.cpp" />
     <ClCompile Include="caniter.cpp">
     </ClCompile>
     <ClCompile Include="filterednormalizer2.cpp" />
     <ClInclude Include="uresdata.h" />
     <ClInclude Include="uresimp.h" />
     <ClInclude Include="ureslocs.h" />
-    <ClInclude Include="uresource.h" />
+    <ClInclude Include="resource.h" />
     <CustomBuild Include="unicode\caniter.h">
       <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
 </Command>
index fae609141ef26d52fedd54a8c7b304460711fca8..a0421723e41fb5333f9457515ab31bc9c452d82c 100644 (file)
     <ClCompile Include="uresdata.cpp">
       <Filter>locales &amp; resources</Filter>
     </ClCompile>
-    <ClCompile Include="uresource.cpp">
+    <ClCompile Include="resource.cpp">
       <Filter>locales &amp; resources</Filter>
     </ClCompile>
     <ClCompile Include="caniter.cpp">
     <ClInclude Include="uresdata.h">
       <Filter>locales &amp; resources</Filter>
     </ClInclude>
-    <ClInclude Include="uresource.h">
+    <ClInclude Include="resource.h">
       <Filter>locales &amp; resources</Filter>
     </ClInclude>
     <ClInclude Include="uresimp.h">
similarity index 53%
rename from icu4c/source/common/uresource.cpp
rename to icu4c/source/common/resource.cpp
index 8bcfe2b56152d24035ca758e76318ef631079fcf..2a61dbac65b4af25176e90e7a11b3894ebcd4420 100644 (file)
@@ -3,13 +3,13 @@
 * Copyright (C) 2015, International Business Machines
 * Corporation and others.  All Rights Reserved.
 *******************************************************************************
-* uresource.cpp
+* resource.cpp
 *
 * created on: 2015nov04
 * created by: Markus W. Scherer
 */
 
-#include "uresource.h"
+#include "resource.h"
 
 #include "unicode/utypes.h"
 #include "unicode/uobject.h"
 
 U_NAMESPACE_BEGIN
 
-UResourceValue::~UResourceValue() {}
+ResourceValue::~ResourceValue() {}
 
 
-UResourceArraySink::~UResourceArraySink() {}
+ResourceArraySink::~ResourceArraySink() {}
 
-void UResourceArraySink::put(
-        int32_t /*index*/, UResourceValue & /*value*/, UErrorCode & /*errorCode*/) {}
+void ResourceArraySink::put(
+        int32_t /*index*/, ResourceValue & /*value*/, UErrorCode & /*errorCode*/) {}
 
-UResourceArraySink *UResourceArraySink::getOrCreateArraySink(
+ResourceArraySink *ResourceArraySink::getOrCreateArraySink(
         int32_t /*index*/, int32_t /*size*/, UErrorCode & /*errorCode*/) {
     return NULL;
 }
 
-UResourceTableSink *UResourceArraySink::getOrCreateTableSink(
+ResourceTableSink *ResourceArraySink::getOrCreateTableSink(
         int32_t /*index*/, int32_t /*initialSize*/, UErrorCode & /*errorCode*/) {
     return NULL;
 }
 
 
-UResourceTableSink::~UResourceTableSink() {}
+ResourceTableSink::~ResourceTableSink() {}
 
-void UResourceTableSink::put(
-        const char * /*key*/, UResourceValue & /*value*/, UErrorCode & /*errorCode*/) {}
+void ResourceTableSink::put(
+        const char * /*key*/, ResourceValue & /*value*/, UErrorCode & /*errorCode*/) {}
 
-void UResourceTableSink::putNoFallback(const char * /*key*/, UErrorCode & /*errorCode*/) {}
+void ResourceTableSink::putNoFallback(const char * /*key*/, UErrorCode & /*errorCode*/) {}
 
-UResourceArraySink *UResourceTableSink::getOrCreateArraySink(
+ResourceArraySink *ResourceTableSink::getOrCreateArraySink(
         const char * /*key*/, int32_t /*size*/, UErrorCode & /*errorCode*/) {
     return NULL;
 }
 
-UResourceTableSink *UResourceTableSink::getOrCreateTableSink(
+ResourceTableSink *ResourceTableSink::getOrCreateTableSink(
         const char * /*key*/, int32_t /*initialSize*/, UErrorCode & /*errorCode*/) {
     return NULL;
 }
similarity index 78%
rename from icu4c/source/common/uresource.h
rename to icu4c/source/common/resource.h
index 5167b0ca4f50356fcd261a263730c1d764e442ea..58e03df6ff287fdd2faa30898a30de07171838b5 100644 (file)
@@ -3,7 +3,7 @@
 * Copyright (C) 2015, International Business Machines
 * Corporation and others.  All Rights Reserved.
 *******************************************************************************
-* uresource.h
+* resource.h
 *
 * created on: 2015nov04
 * created by: Markus W. Scherer
  * \brief ICU resource bundle key and value types.
  */
 
-// Note: Ported from ICU4J class ICUResource and its nested classes,
+// Note: Ported from ICU4J class UResource and its nested classes,
 // but the C++ classes are separate, not nested.
 
+// We use the Resource prefix for C++ classes, as usual.
+// The UResource prefix would be used for C types.
+
 #include "unicode/utypes.h"
 #include "unicode/unistr.h"
 #include "unicode/ures.h"
 
 U_NAMESPACE_BEGIN
 
-class UResourceTableSink;
+class ResourceTableSink;
 
 // Note: In C++, we use const char * pointers for keys,
-// rather than an abstraction like Java ICUResource.Key.
+// rather than an abstraction like Java UResource.Key.
 
 /**
  * Represents a resource bundle item's value.
  * Avoids object creations as much as possible.
  * Mutable, not thread-safe.
- *
- * If we add public API like this, we should use the UResource prefix for C types
- * and just a Resource prefix for the C++ versions, as usual.
  */
-class U_COMMON_API UResourceValue : public UObject {
+class U_COMMON_API ResourceValue : public UObject {
 public:
-    virtual ~UResourceValue();
+    virtual ~ResourceValue();
 
     /**
      * @return ICU resource type, for example, URES_STRING
@@ -101,11 +101,11 @@ public:
     virtual const uint8_t *getBinary(int32_t &length, UErrorCode &errorCode) const = 0;
 
 protected:
-    UResourceValue() {}
+    ResourceValue() {}
 
 private:
-    UResourceValue(const UResourceValue &);  // no copy constructor
-    UResourceValue &operator=(const UResourceValue &);  // no assignment operator
+    ResourceValue(const ResourceValue &);  // no copy constructor
+    ResourceValue &operator=(const ResourceValue &);  // no assignment operator
 };
 
 /**
@@ -113,12 +113,12 @@ private:
  * The base class does nothing.
  *
  * Nested arrays and tables are stored as nested sinks,
- * never put() as UResourceValue items.
+ * never put() as ResourceValue items.
  */
-class U_COMMON_API UResourceArraySink : public UObject {
+class U_COMMON_API ResourceArraySink : public UObject {
 public:
-    UResourceArraySink() {}
-    virtual ~UResourceArraySink();
+    ResourceArraySink() {}
+    virtual ~ResourceArraySink();
 
     /**
      * Adds a value from a resource array.
@@ -126,7 +126,7 @@ public:
      * @param index of the resource array item
      * @param value resource value
      */
-    virtual void put(int32_t index, UResourceValue &value, UErrorCode &errorCode);
+    virtual void put(int32_t index, ResourceValue &value, UErrorCode &errorCode);
 
     /**
      * Returns a nested resource array at the array index as another sink.
@@ -140,7 +140,7 @@ public:
      * @param size number of array items
      * @return nested-array sink, or NULL
      */
-    virtual UResourceArraySink *getOrCreateArraySink(
+    virtual ResourceArraySink *getOrCreateArraySink(
             int32_t index, int32_t size, UErrorCode &errorCode);
 
     /**
@@ -155,12 +155,12 @@ public:
      * @param initialSize size hint for creating the sink if necessary
      * @return nested-table sink, or NULL
      */
-    virtual UResourceTableSink *getOrCreateTableSink(
+    virtual ResourceTableSink *getOrCreateTableSink(
             int32_t index, int32_t initialSize, UErrorCode &errorCode);
 
 private:
-    UResourceArraySink(const UResourceArraySink &);  // no copy constructor
-    UResourceArraySink &operator=(const UResourceArraySink &);  // no assignment operator
+    ResourceArraySink(const ResourceArraySink &);  // no copy constructor
+    ResourceArraySink &operator=(const ResourceArraySink &);  // no assignment operator
 };
 
 /**
@@ -168,12 +168,12 @@ private:
  * The base class does nothing.
  *
  * Nested arrays and tables are stored as nested sinks,
- * never put() as UResourceValue items.
+ * never put() as ResourceValue items.
  */
-class U_COMMON_API UResourceTableSink : public UObject {
+class U_COMMON_API ResourceTableSink : public UObject {
 public:
-    UResourceTableSink() {}
-    virtual ~UResourceTableSink();
+    ResourceTableSink() {}
+    virtual ~ResourceTableSink();
 
     /**
      * Adds a key-value pair from a resource table.
@@ -181,7 +181,7 @@ public:
      * @param key resource key string
      * @param value resource value
      */
-    virtual void put(const char *key, UResourceValue &value, UErrorCode &errorCode);
+    virtual void put(const char *key, ResourceValue &value, UErrorCode &errorCode);
 
     /**
      * Adds a no-fallback/no-inheritance marker for this key.
@@ -206,7 +206,7 @@ public:
      * @param size number of array items
      * @return nested-array sink, or NULL
      */
-    virtual UResourceArraySink *getOrCreateArraySink(
+    virtual ResourceArraySink *getOrCreateArraySink(
             const char *key, int32_t size, UErrorCode &errorCode);
 
     /**
@@ -221,12 +221,12 @@ public:
      * @param initialSize size hint for creating the sink if necessary
      * @return nested-table sink, or NULL
      */
-    virtual UResourceTableSink *getOrCreateTableSink(
+    virtual ResourceTableSink *getOrCreateTableSink(
             const char *key, int32_t initialSize, UErrorCode &errorCode);
 
 private:
-    UResourceTableSink(const UResourceTableSink &);  // no copy constructor
-    UResourceTableSink &operator=(const UResourceTableSink &);  // no assignment operator
+    ResourceTableSink(const ResourceTableSink &);  // no copy constructor
+    ResourceTableSink &operator=(const ResourceTableSink &);  // no assignment operator
 };
 
 U_NAMESPACE_END
index 784869dbc18614275f397cdfecbad4a605229c27..b2d071a09f93835b9f5a3d0fd4ce69e738b53993 100644 (file)
@@ -1886,7 +1886,7 @@ namespace {
 
 void getAllContainerItemsWithFallback(
         const UResourceBundle *bundle, ResourceDataValue &value,
-        UResourceArraySink *arraySink, UResourceTableSink *tableSink,
+        ResourceArraySink *arraySink, ResourceTableSink *tableSink,
         UErrorCode &errorCode) {
     if (U_FAILURE(errorCode)) { return; }
     // We recursively enumerate child-first,
@@ -1952,7 +1952,7 @@ void getAllContainerItemsWithFallback(
 
 void getAllContainerItemsWithFallback(
         const UResourceBundle *bundle, const char *path,
-        UResourceArraySink *arraySink, UResourceTableSink *tableSink,
+        ResourceArraySink *arraySink, ResourceTableSink *tableSink,
         UErrorCode &errorCode) {
     if (U_FAILURE(errorCode)) { return; }
     if (path == NULL) {
@@ -1988,13 +1988,13 @@ void getAllContainerItemsWithFallback(
 
 U_CAPI void U_EXPORT2
 ures_getAllArrayItemsWithFallback(const UResourceBundle *bundle, const char *path,
-                                  UResourceArraySink &sink, UErrorCode &errorCode) {
+                                  ResourceArraySink &sink, UErrorCode &errorCode) {
     getAllContainerItemsWithFallback(bundle, path, &sink, NULL, errorCode);
 }
 
 U_CAPI void U_EXPORT2
 ures_getAllTableItemsWithFallback(const UResourceBundle *bundle, const char *path,
-                                  UResourceTableSink &sink, UErrorCode &errorCode) {
+                                  ResourceTableSink &sink, UErrorCode &errorCode) {
     getAllContainerItemsWithFallback(bundle, path, NULL, &sink, errorCode);
 }
 
index 3c555b624f78a1802302ab7eecbdd80e52f793f5..91edd7c1afc6620e00bb5829efde97e4badd7b01 100644 (file)
@@ -23,6 +23,7 @@
 #include "unicode/utf16.h"
 #include "cmemory.h"
 #include "cstring.h"
+#include "resource.h"
 #include "uarrsort.h"
 #include "uassert.h"
 #include "ucol_swp.h"
@@ -30,7 +31,6 @@
 #include "uinvchar.h"
 #include "uresdata.h"
 #include "uresimp.h"
-#include "uresource.h"
 
 /*
  * Resource access helpers
@@ -699,7 +699,7 @@ res_getResource(const ResourceData *pResData, const char *key) {
 // and doing the enumeration in the higher-level code on top of those accessors.
 U_CFUNC void
 ures_getAllTableItems(const ResourceData *pResData, Resource table,
-                      icu::ResourceDataValue &value, icu::UResourceTableSink &sink,
+                      icu::ResourceDataValue &value, icu::ResourceTableSink &sink,
                       UErrorCode &errorCode) {
     if(U_FAILURE(errorCode)) { return; }
     const uint16_t *keys16 = NULL;
@@ -752,13 +752,13 @@ ures_getAllTableItems(const ResourceData *pResData, Resource table,
         int32_t type = RES_GET_TYPE(res);
         if (URES_IS_ARRAY(type)) {
             int32_t numItems = getArrayLength(pResData, res);
-            icu::UResourceArraySink *subSink = sink.getOrCreateArraySink(key, numItems, errorCode);
+            icu::ResourceArraySink *subSink = sink.getOrCreateArraySink(key, numItems, errorCode);
             if (subSink != NULL) {
                 ures_getAllArrayItems(pResData, res, value, *subSink, errorCode);
             }
         } else if (URES_IS_TABLE(type)) {
             int32_t numItems = getTableLength(pResData, res);
-            icu::UResourceTableSink *subSink = sink.getOrCreateTableSink(key, numItems, errorCode);
+            icu::ResourceTableSink *subSink = sink.getOrCreateTableSink(key, numItems, errorCode);
             if (subSink != NULL) {
                 ures_getAllTableItems(pResData, res, value, *subSink, errorCode);
             }
@@ -806,7 +806,7 @@ res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexR) {
 
 U_CFUNC void
 ures_getAllArrayItems(const ResourceData *pResData, Resource array,
-                      icu::ResourceDataValue &value, icu::UResourceArraySink &sink,
+                      icu::ResourceDataValue &value, icu::ResourceArraySink &sink,
                       UErrorCode &errorCode) {
     if(U_FAILURE(errorCode)) { return; }
     const uint16_t *items16 = NULL;
@@ -841,13 +841,13 @@ ures_getAllArrayItems(const ResourceData *pResData, Resource array,
         int32_t type = RES_GET_TYPE(res);
         if (URES_IS_ARRAY(type)) {
             int32_t numItems = getArrayLength(pResData, res);
-            icu::UResourceArraySink *subSink = sink.getOrCreateArraySink(i, numItems, errorCode);
+            icu::ResourceArraySink *subSink = sink.getOrCreateArraySink(i, numItems, errorCode);
             if (subSink != NULL) {
                 ures_getAllArrayItems(pResData, res, value, *subSink, errorCode);
             }
         } else if (URES_IS_TABLE(type)) {
             int32_t numItems = getTableLength(pResData, res);
-            icu::UResourceTableSink *subSink = sink.getOrCreateTableSink(i, numItems, errorCode);
+            icu::ResourceTableSink *subSink = sink.getOrCreateTableSink(i, numItems, errorCode);
             if (subSink != NULL) {
                 ures_getAllTableItems(pResData, res, value, *subSink, errorCode);
             }
index 2ebf4dabc460890f9caada7ca6b09f4c7e20c1c0..1afa77c0748eb4a69a4528c02246633d6d2d775a 100644 (file)
@@ -467,11 +467,11 @@ U_CFUNC Resource res_findResource(const ResourceData *pResData, Resource r,
 
 #ifdef __cplusplus
 
-#include "uresource.h"
+#include "resource.h"
 
 U_NAMESPACE_BEGIN
 
-class ResourceDataValue : public UResourceValue {
+class ResourceDataValue : public ResourceValue {
 public:
     ResourceDataValue() : pResData(NULL), res(URES_NONE) {}
     virtual ~ResourceDataValue();
@@ -501,7 +501,7 @@ U_NAMESPACE_END
  */
 U_CFUNC void
 ures_getAllTableItems(const ResourceData *pResData, Resource table,
-                      icu::ResourceDataValue &value, icu::UResourceTableSink &sink,
+                      icu::ResourceDataValue &value, icu::ResourceTableSink &sink,
                       UErrorCode &errorCode);
 
 /**
@@ -510,7 +510,7 @@ ures_getAllTableItems(const ResourceData *pResData, Resource table,
  */
 U_CFUNC void
 ures_getAllArrayItems(const ResourceData *pResData, Resource array,
-                      icu::ResourceDataValue &value, icu::UResourceArraySink &sink,
+                      icu::ResourceDataValue &value, icu::ResourceArraySink &sink,
                       UErrorCode &errorCode);
 
 #endif  /* __cplusplus */
index 51d91b7a7249df84847c6cf464ddf2eb03fdbc62..6b264db39b46a605f3f3a85f7ca94ad72a04f521 100644 (file)
@@ -226,11 +226,11 @@ ures_getStringByKeyWithFallback(const UResourceBundle *resB,
 
 U_CAPI void U_EXPORT2
 ures_getAllArrayItemsWithFallback(const UResourceBundle *bundle, const char *path,
-                                  icu::UResourceArraySink &sink, UErrorCode &errorCode);
+                                  icu::ResourceArraySink &sink, UErrorCode &errorCode);
 
 U_CAPI void U_EXPORT2
 ures_getAllTableItemsWithFallback(const UResourceBundle *bundle, const char *path,
-                                  icu::UResourceTableSink &sink, UErrorCode &errorCode);
+                                  icu::ResourceTableSink &sink, UErrorCode &errorCode);
 
 #endif  /* __cplusplus */
 
index ceeaf9794c615d6d11e5521d84f281626035c861..623c272b7c2031ff0fbcb4c24faa38875b8d97c3 100644 (file)
@@ -17,6 +17,7 @@
 #include "unicode/numfmt.h"
 #include "currfmt.h"
 #include "unicode/localpointer.h"
+#include "resource.h"
 #include "simplepatternformatter.h"
 #include "quantityformatter.h"
 #include "unicode/plurrule.h"
@@ -32,7 +33,6 @@
 #include "unicode/putil.h"
 #include "unicode/smpdtfmt.h"
 #include "uassert.h"
-#include "uresource.h"
 
 #include "sharednumberformat.h"
 #include "sharedpluralrules.h"
@@ -128,7 +128,7 @@ public:
     const NumericDateFormatters *getNumericDateFormatters() const {
         return numericDateFormatters;
     }
-    void setPerUnitFormatterIfAbsent(int32_t unitIndex, int32_t width, UResourceValue &value,
+    void setPerUnitFormatterIfAbsent(int32_t unitIndex, int32_t width, ResourceValue &value,
                                      UErrorCode &errorCode) {
         if (perUnitFormatters[unitIndex][width] == NULL) {
             perUnitFormatters[unitIndex][width] =
@@ -221,15 +221,15 @@ static const UChar gNarrow[] = { 0x4E, 0x61, 0x72, 0x72, 0x6F, 0x77 };
  * C++: Each inner sink class has a reference to the main outer sink.
  * Java: Use non-static inner classes instead.
  */
-struct UnitDataSink : public UResourceTableSink {
+struct UnitDataSink : public ResourceTableSink {
     /**
      * Sink for a table of display patterns. For example,
      * unitsShort/duration/hour contains other{"{0} hrs"}.
      */
-    struct UnitPatternSink : public UResourceTableSink {
+    struct UnitPatternSink : public ResourceTableSink {
         UnitPatternSink(UnitDataSink &sink) : outer(sink) {}
         ~UnitPatternSink();
-        virtual void put(const char *key, UResourceValue &value, UErrorCode &errorCode) {
+        virtual void put(const char *key, ResourceValue &value, UErrorCode &errorCode) {
             if (U_FAILURE(errorCode)) { return; }
             if (uprv_strcmp(key, "dnam") == 0) {
                 // Skip the unit display name for now.
@@ -254,10 +254,10 @@ struct UnitDataSink : public UResourceTableSink {
      * Sink for a table of per-unit tables. For example,
      * unitsShort/duration contains tables for duration-unit subtypes day & hour.
      */
-    struct UnitSubtypeSink : public UResourceTableSink {
+    struct UnitSubtypeSink : public ResourceTableSink {
         UnitSubtypeSink(UnitDataSink &sink) : outer(sink) {}
         ~UnitSubtypeSink();
-        virtual UResourceTableSink *getOrCreateTableSink(
+        virtual ResourceTableSink *getOrCreateTableSink(
                 const char *key, int32_t /* initialSize */, UErrorCode &errorCode) {
             if (U_FAILURE(errorCode)) { return NULL; }
             outer.unitIndex = MeasureUnit::internalGetIndexForTypeAndSubtype(outer.type, key);
@@ -275,10 +275,10 @@ struct UnitDataSink : public UResourceTableSink {
      * Sink for compound x-per-y display pattern. For example,
      * unitsShort/compound/per may be "{0}/{1}".
      */
-    struct UnitCompoundSink : public UResourceTableSink {
+    struct UnitCompoundSink : public ResourceTableSink {
         UnitCompoundSink(UnitDataSink &sink) : outer(sink) {}
         ~UnitCompoundSink();
-        virtual void put(const char *key, UResourceValue &value, UErrorCode &errorCode) {
+        virtual void put(const char *key, ResourceValue &value, UErrorCode &errorCode) {
             if (U_SUCCESS(errorCode) && uprv_strcmp(key, "per") == 0) {
                 outer.cacheData.perFormatters[outer.width].
                         compile(value.getUnicodeString(errorCode), errorCode);
@@ -292,10 +292,10 @@ struct UnitDataSink : public UResourceTableSink {
      * unitsShort contains tables for area & duration.
      * It also contains a table for the compound/per pattern.
      */
-    struct UnitTypeSink : public UResourceTableSink {
+    struct UnitTypeSink : public ResourceTableSink {
         UnitTypeSink(UnitDataSink &sink) : outer(sink) {}
         ~UnitTypeSink();
-        virtual UResourceTableSink *getOrCreateTableSink(
+        virtual ResourceTableSink *getOrCreateTableSink(
                 const char *key, int32_t /* initialSize */, UErrorCode &errorCode) {
             if (U_FAILURE(errorCode)) { return NULL; }
             if (uprv_strcmp(key, "currency") == 0) {
@@ -318,7 +318,7 @@ struct UnitDataSink : public UResourceTableSink {
               cacheData(outputData),
               width(UMEASFMT_WIDTH_COUNT), type(NULL), unitIndex(0), hasPatterns(FALSE) {}
     ~UnitDataSink();
-    virtual void put(const char *key, UResourceValue &value, UErrorCode &errorCode) {
+    virtual void put(const char *key, ResourceValue &value, UErrorCode &errorCode) {
         // Handle aliases like
         // units:alias{"/LOCALE/unitsShort"}
         // which should only occur in the root bundle.
@@ -341,7 +341,7 @@ struct UnitDataSink : public UResourceTableSink {
         }
         cacheData.widthFallback[sourceWidth] = targetWidth;
     }
-    virtual UResourceTableSink *getOrCreateTableSink(
+    virtual ResourceTableSink *getOrCreateTableSink(
             const char *key, int32_t /* initialSize */, UErrorCode &errorCode) {
         if (U_SUCCESS(errorCode) && (width = widthFromKey(key)) != UMEASFMT_WIDTH_COUNT) {
             return &typeSink;
@@ -363,7 +363,7 @@ struct UnitDataSink : public UResourceTableSink {
         return UMEASFMT_WIDTH_COUNT;
     }
 
-    static UMeasureFormatWidth widthFromAlias(const UResourceValue &value, UErrorCode &errorCode) {
+    static UMeasureFormatWidth widthFromAlias(const ResourceValue &value, UErrorCode &errorCode) {
         int32_t length;
         const UChar *s = value.getAliasString(length, errorCode);
         // For example: "/LOCALE/unitsShort"