pango 2.2.5-x64-mingw32 → 3.0.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +19 -3
  3. data/ext/pango/depend +0 -1
  4. data/ext/pango/extconf.rb +0 -2
  5. data/ext/pango/rbpango.c +44 -6
  6. data/ext/pango/rbpango.h +0 -1
  7. data/ext/pango/rbpangoattribute.c +2 -2
  8. data/ext/pango/rbpangocairo.c +4 -4
  9. data/ext/pango/rbpangocontext.c +2 -2
  10. data/ext/pango/rbpangofontdescription.c +2 -2
  11. data/ext/pango/rbpangogravity.c +2 -2
  12. data/ext/pango/rbpangolanguage.c +8 -0
  13. data/ext/pango/rbpangolayout.c +15 -4
  14. data/ext/pango/rbpangomatrix.c +2 -2
  15. data/ext/pango/rbpangoscript.c +3 -3
  16. data/lib/2.0/pango.so +0 -0
  17. data/lib/2.1/pango.so +0 -0
  18. data/lib/2.2/pango.so +0 -0
  19. data/test/test-language.rb +5 -0
  20. data/test/test-layout.rb +7 -1
  21. data/vendor/local/bin/derb.exe +0 -0
  22. data/vendor/local/bin/genbrk.exe +0 -0
  23. data/vendor/local/bin/genccode.exe +0 -0
  24. data/vendor/local/bin/gencfu.exe +0 -0
  25. data/vendor/local/bin/gencmn.exe +0 -0
  26. data/vendor/local/bin/gencnval.exe +0 -0
  27. data/vendor/local/bin/gendict.exe +0 -0
  28. data/vendor/local/bin/gennorm2.exe +0 -0
  29. data/vendor/local/bin/genrb.exe +0 -0
  30. data/vendor/local/bin/gensprep.exe +0 -0
  31. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  32. data/vendor/local/bin/hb-shape.exe +0 -0
  33. data/vendor/local/bin/hb-view.exe +0 -0
  34. data/vendor/local/bin/icu-config +6 -6
  35. data/vendor/local/bin/icuinfo.exe +0 -0
  36. data/vendor/local/bin/icupkg.exe +0 -0
  37. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  38. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  39. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  40. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  41. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  42. data/vendor/local/bin/makeconv.exe +0 -0
  43. data/vendor/local/bin/pango-querymodules.exe +0 -0
  44. data/vendor/local/bin/pango-view.exe +0 -0
  45. data/vendor/local/bin/pkgdata.exe +0 -0
  46. data/vendor/local/bin/uconv.exe +0 -0
  47. data/vendor/local/etc/pango/pango.modules +1 -1
  48. data/vendor/local/include/harfbuzz/hb-buffer.h +26 -1
  49. data/vendor/local/include/harfbuzz/hb-common.h +7 -0
  50. data/vendor/local/include/harfbuzz/hb-font.h +7 -6
  51. data/vendor/local/include/harfbuzz/hb-ft.h +58 -1
  52. data/vendor/local/include/harfbuzz/hb-glib.h +3 -0
  53. data/vendor/local/include/harfbuzz/hb-ot-font.h +4 -0
  54. data/vendor/local/include/harfbuzz/hb-shape.h +0 -3
  55. data/vendor/local/include/harfbuzz/hb-unicode.h +28 -3
  56. data/vendor/local/include/harfbuzz/hb-version.h +4 -4
  57. data/vendor/local/include/layout/LEFontInstance.h +2 -28
  58. data/vendor/local/include/layout/LETableReference.h +7 -2
  59. data/vendor/local/include/unicode/calendar.h +32 -2
  60. data/vendor/local/include/unicode/coll.h +9 -7
  61. data/vendor/local/include/unicode/datefmt.h +102 -13
  62. data/vendor/local/include/unicode/dcfmtsym.h +4 -2
  63. data/vendor/local/include/unicode/decimfmt.h +4 -5
  64. data/vendor/local/include/unicode/dtfmtsym.h +60 -1
  65. data/vendor/local/include/unicode/dtptngen.h +21 -7
  66. data/vendor/local/include/unicode/localpointer.h +49 -1
  67. data/vendor/local/include/unicode/locid.h +2 -3
  68. data/vendor/local/include/unicode/measfmt.h +30 -37
  69. data/vendor/local/include/unicode/measunit.h +65 -152
  70. data/vendor/local/include/unicode/measure.h +3 -3
  71. data/vendor/local/include/unicode/numfmt.h +3 -5
  72. data/vendor/local/include/unicode/platform.h +12 -2
  73. data/vendor/local/include/unicode/plurrule.h +18 -14
  74. data/vendor/local/include/unicode/rbnf.h +3 -4
  75. data/vendor/local/include/unicode/regex.h +42 -26
  76. data/vendor/local/include/unicode/region.h +9 -9
  77. data/vendor/local/include/unicode/reldatefmt.h +50 -45
  78. data/vendor/local/include/unicode/scientificnumberformatter.h +222 -0
  79. data/vendor/local/include/unicode/smpdtfmt.h +30 -24
  80. data/vendor/local/include/unicode/tblcoll.h +5 -4
  81. data/vendor/local/include/unicode/timezone.h +18 -1
  82. data/vendor/local/include/unicode/ucal.h +2 -2
  83. data/vendor/local/include/unicode/ucol.h +22 -18
  84. data/vendor/local/include/unicode/uconfig.h +17 -2
  85. data/vendor/local/include/unicode/udat.h +164 -56
  86. data/vendor/local/include/unicode/udatpg.h +9 -7
  87. data/vendor/local/include/unicode/ufieldpositer.h +121 -0
  88. data/vendor/local/include/unicode/uidna.h +21 -13
  89. data/vendor/local/include/unicode/ulistformatter.h +130 -0
  90. data/vendor/local/include/unicode/ulocdata.h +4 -3
  91. data/vendor/local/include/unicode/unistr.h +101 -53
  92. data/vendor/local/include/unicode/unum.h +7 -10
  93. data/vendor/local/include/unicode/uregex.h +52 -29
  94. data/vendor/local/include/unicode/urename.h +14 -3
  95. data/vendor/local/include/unicode/uscript.h +30 -16
  96. data/vendor/local/include/unicode/uspoof.h +13 -9
  97. data/vendor/local/include/unicode/utrans.h +5 -7
  98. data/vendor/local/include/unicode/utypes.h +9 -3
  99. data/vendor/local/include/unicode/uvernum.h +8 -8
  100. data/vendor/local/lib/icu/{54.1 → 55.1}/Makefile.inc +5 -5
  101. data/vendor/local/lib/icu/{54.1 → 55.1}/pkgdata.inc +1 -1
  102. data/vendor/local/lib/icu/Makefile.inc +5 -5
  103. data/vendor/local/lib/icu/pkgdata.inc +1 -1
  104. data/vendor/local/lib/icudt.dll +0 -0
  105. data/vendor/local/lib/{icudt54.dll → icudt55.dll} +0 -0
  106. data/vendor/local/lib/icuin.dll +0 -0
  107. data/vendor/local/lib/icuin55.dll +0 -0
  108. data/vendor/local/lib/icuio.dll +0 -0
  109. data/vendor/local/lib/icuio55.dll +0 -0
  110. data/vendor/local/lib/icule.dll +0 -0
  111. data/vendor/local/lib/icule55.dll +0 -0
  112. data/vendor/local/lib/iculx.dll +0 -0
  113. data/vendor/local/lib/iculx55.dll +0 -0
  114. data/vendor/local/lib/icutest.dll +0 -0
  115. data/vendor/local/lib/icutest55.dll +0 -0
  116. data/vendor/local/lib/icutu.dll +0 -0
  117. data/vendor/local/lib/icutu55.dll +0 -0
  118. data/vendor/local/lib/icuuc.dll +0 -0
  119. data/vendor/local/lib/icuuc55.dll +0 -0
  120. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  121. data/vendor/local/lib/libharfbuzz-icu.la +7 -7
  122. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  123. data/vendor/local/lib/libharfbuzz.la +7 -7
  124. data/vendor/local/lib/libicudt.dll.a +0 -0
  125. data/vendor/local/lib/libicuin.dll.a +0 -0
  126. data/vendor/local/lib/libicuio.dll.a +0 -0
  127. data/vendor/local/lib/libicule.dll.a +0 -0
  128. data/vendor/local/lib/libiculx.dll.a +0 -0
  129. data/vendor/local/lib/libicutest.dll.a +0 -0
  130. data/vendor/local/lib/libicutu.dll.a +0 -0
  131. data/vendor/local/lib/libicuuc.dll.a +0 -0
  132. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  133. data/vendor/local/lib/libpango-1.0.la +2 -2
  134. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  135. data/vendor/local/lib/libpangocairo-1.0.la +1 -1
  136. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  137. data/vendor/local/lib/libpangoft2-1.0.la +2 -2
  138. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  139. data/vendor/local/lib/libpangowin32-1.0.la +2 -2
  140. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  141. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  142. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +2 -2
  143. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  144. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  145. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +2 -2
  146. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  147. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  148. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +2 -2
  149. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  150. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  151. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +2 -2
  152. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
  153. data/vendor/local/lib/pkgconfig/harfbuzz.pc +3 -1
  154. data/vendor/local/lib/pkgconfig/icu-i18n.pc +5 -5
  155. data/vendor/local/lib/pkgconfig/icu-io.pc +5 -5
  156. data/vendor/local/lib/pkgconfig/icu-le.pc +5 -5
  157. data/vendor/local/lib/pkgconfig/icu-lx.pc +5 -5
  158. data/vendor/local/lib/pkgconfig/icu-uc.pc +5 -5
  159. data/vendor/local/share/gtk-doc/html/harfbuzz/adding-text-to-the-buffer.html +35 -0
  160. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -35
  161. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +158 -27
  162. data/vendor/local/share/gtk-doc/html/harfbuzz/buffers-language-script-and-direction.html +87 -0
  163. data/vendor/local/share/gtk-doc/html/harfbuzz/{ch01.html → ch06.html} +12 -13
  164. data/vendor/local/share/gtk-doc/html/harfbuzz/customizing-unicode-functions.html +31 -0
  165. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +7 -8
  166. data/vendor/local/share/gtk-doc/html/harfbuzz/fonts-and-faces.html +40 -0
  167. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +352 -0
  168. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +88 -47
  169. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +128 -204
  170. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +290 -304
  171. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +14 -23
  172. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +14 -17
  173. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +40 -51
  174. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +126 -190
  175. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +19 -24
  176. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +14 -29
  177. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +438 -11
  178. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +14 -25
  179. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +14 -29
  180. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +19 -160
  181. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +21 -36
  182. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +14 -11
  183. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +70 -81
  184. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +33 -44
  185. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +290 -323
  186. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +14 -23
  187. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +59 -27
  188. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +16 -13
  189. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +415 -104
  190. data/vendor/local/share/gtk-doc/html/harfbuzz/hello-harfbuzz.html +181 -0
  191. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +43 -12
  192. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +11 -13
  193. data/vendor/local/share/gtk-doc/html/harfbuzz/plans-and-caching.html +31 -0
  194. data/vendor/local/share/gtk-doc/html/harfbuzz/pt01.html +70 -0
  195. data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +107 -0
  196. data/vendor/local/share/gtk-doc/html/harfbuzz/setting-buffer-properties.html +31 -0
  197. data/vendor/local/share/gtk-doc/html/harfbuzz/shaping-and-shape-plans.html +39 -0
  198. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +9 -6
  199. data/vendor/local/share/gtk-doc/html/harfbuzz/using-harfbuzzs-native-opentype-implementation.html +31 -0
  200. data/vendor/local/share/gtk-doc/html/harfbuzz/using-your-own-font-functions.html +31 -0
  201. data/vendor/local/share/gtk-doc/html/harfbuzz/what-about-the-other-scripts.html +31 -0
  202. data/vendor/local/share/gtk-doc/html/harfbuzz/what-is-harfbuzz.html +124 -0
  203. data/vendor/local/share/gtk-doc/html/harfbuzz/why-is-it-called-harfbuzz.html +38 -0
  204. data/vendor/local/share/icu/{54.1 → 55.1}/config/mh-mingw64 +0 -0
  205. data/vendor/local/share/icu/{54.1 → 55.1}/install-sh +0 -0
  206. data/vendor/local/share/icu/{54.1 → 55.1}/license.html +3 -4
  207. data/vendor/local/share/icu/{54.1 → 55.1}/mkinstalldirs +0 -0
  208. data/vendor/local/share/man/man1/derb.1 +2 -2
  209. data/vendor/local/share/man/man1/genbrk.1 +2 -2
  210. data/vendor/local/share/man/man1/gencfu.1 +1 -1
  211. data/vendor/local/share/man/man1/gencnval.1 +3 -3
  212. data/vendor/local/share/man/man1/gendict.1 +2 -2
  213. data/vendor/local/share/man/man1/genrb.1 +3 -3
  214. data/vendor/local/share/man/man1/icu-config.1 +2 -2
  215. data/vendor/local/share/man/man1/makeconv.1 +3 -3
  216. data/vendor/local/share/man/man1/pkgdata.1 +2 -2
  217. data/vendor/local/share/man/man1/uconv.1 +2 -2
  218. data/vendor/local/share/man/man8/genccode.8 +2 -2
  219. data/vendor/local/share/man/man8/gencmn.8 +3 -3
  220. data/vendor/local/share/man/man8/gensprep.8 +3 -3
  221. data/vendor/local/share/man/man8/icupkg.8 +1 -1
  222. metadata +38 -22
  223. data/vendor/local/include/unicode/scientificformathelper.h +0 -139
  224. data/vendor/local/lib/icuin54.dll +0 -0
  225. data/vendor/local/lib/icuio54.dll +0 -0
  226. data/vendor/local/lib/icule54.dll +0 -0
  227. data/vendor/local/lib/iculx54.dll +0 -0
  228. data/vendor/local/lib/icutest54.dll +0 -0
  229. data/vendor/local/lib/icutu54.dll +0 -0
  230. data/vendor/local/lib/icuuc54.dll +0 -0
  231. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +0 -286
  232. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +0 -496
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *******************************************************************************
3
- * Copyright (C) 2007-2013, International Business Machines Corporation and
3
+ * Copyright (C) 2007-2015, International Business Machines Corporation and
4
4
  * others. All Rights Reserved.
5
5
  *******************************************************************************
6
6
  *
@@ -31,6 +31,7 @@ class DateTimeMatcher;
31
31
  class DistanceInfo;
32
32
  class PatternMap;
33
33
  class PtnSkeleton;
34
+ class SharedDateTimePatternGenerator;
34
35
 
35
36
  /**
36
37
  * This class provides flexible generation of date format patterns, like "yy-MM-dd".
@@ -65,6 +66,17 @@ public:
65
66
  */
66
67
  static DateTimePatternGenerator* U_EXPORT2 createInstance(const Locale& uLocale, UErrorCode& status);
67
68
 
69
+ #ifndef U_HIDE_INTERNAL_API
70
+
71
+ /**
72
+ * For ICU use only
73
+ *
74
+ * @internal
75
+ */
76
+ static DateTimePatternGenerator* U_EXPORT2 internalMakeInstance(const Locale& uLocale, UErrorCode& status);
77
+
78
+ #endif /* U_HIDE_INTERNAL_API */
79
+
68
80
  /**
69
81
  * Create an empty generator, to be constructed with addPattern(...) etc.
70
82
  * @param status Output param set to success/failure code on exit,
@@ -215,22 +227,24 @@ public:
215
227
  const UnicodeString& getAppendItemName(UDateTimePatternField field) const;
216
228
 
217
229
  /**
218
- * The date time format is a message format pattern used to compose date and
219
- * time patterns. The default value is "{0} {1}", where {0} will be replaced
220
- * by the date pattern and {1} will be replaced by the time pattern.
230
+ * The DateTimeFormat is a message format pattern used to compose date and
231
+ * time patterns. The default pattern in the root locale is "{1} {0}", where
232
+ * {1} will be replaced by the date pattern and {0} will be replaced by the
233
+ * time pattern; however, other locales may specify patterns such as
234
+ * "{1}, {0}" or "{1} 'at' {0}", etc.
221
235
  * <p>
222
236
  * This is used when the input skeleton contains both date and time fields,
223
237
  * but there is not a close match among the added patterns. For example,
224
238
  * suppose that this object was created by adding "dd-MMM" and "hh:mm", and
225
- * its datetimeFormat is the default "{0} {1}". Then if the input skeleton
239
+ * its datetimeFormat is the default "{1} {0}". Then if the input skeleton
226
240
  * is "MMMdhmm", there is not an exact match, so the input skeleton is
227
241
  * broken up into two components "MMMd" and "hmm". There are close matches
228
242
  * for those two skeletons, so the result is put together with this pattern,
229
243
  * resulting in "d-MMM h:mm".
230
244
  *
231
245
  * @param dateTimeFormat
232
- * message format pattern, here {0} will be replaced by the date
233
- * pattern and {1} will be replaced by the time pattern.
246
+ * message format pattern, here {1} will be replaced by the date
247
+ * pattern and {0} will be replaced by the time pattern.
234
248
  * @stable ICU 3.8
235
249
  */
236
250
  void setDateTimeFormat(const UnicodeString& dateTimeFormat);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  *******************************************************************************
3
3
  *
4
- * Copyright (C) 2009-2012, International Business Machines
4
+ * Copyright (C) 2009-2014, International Business Machines
5
5
  * Corporation and others. All Rights Reserved.
6
6
  *
7
7
  *******************************************************************************
@@ -191,6 +191,26 @@ public:
191
191
  * @stable ICU 4.4
192
192
  */
193
193
  explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {}
194
+ #ifndef U_HIDE_DRAFT_API
195
+ /**
196
+ * Constructor takes ownership and reports an error if NULL.
197
+ *
198
+ * This constructor is intended to be used with other-class constructors
199
+ * that may report a failure UErrorCode,
200
+ * so that callers need to check only for U_FAILURE(errorCode)
201
+ * and not also separately for isNull().
202
+ *
203
+ * @param p simple pointer to an object that is adopted
204
+ * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
205
+ * if p==NULL and no other failure code had been set
206
+ * @draft ICU 55
207
+ */
208
+ LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
209
+ if(p==NULL && U_SUCCESS(errorCode)) {
210
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
211
+ }
212
+ }
213
+ #endif /* U_HIDE_DRAFT_API */
194
214
  /**
195
215
  * Destructor deletes the object it owns.
196
216
  * @stable ICU 4.4
@@ -208,6 +228,34 @@ public:
208
228
  delete LocalPointerBase<T>::ptr;
209
229
  LocalPointerBase<T>::ptr=p;
210
230
  }
231
+ #ifndef U_HIDE_DRAFT_API
232
+ /**
233
+ * Deletes the object it owns,
234
+ * and adopts (takes ownership of) the one passed in.
235
+ *
236
+ * If U_FAILURE(errorCode), then the current object is retained and the new one deleted.
237
+ *
238
+ * If U_SUCCESS(errorCode) but the input pointer is NULL,
239
+ * then U_MEMORY_ALLOCATION_ERROR is set,
240
+ * the current object is deleted, and NULL is set.
241
+ *
242
+ * @param p simple pointer to an object that is adopted
243
+ * @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
244
+ * if p==NULL and no other failure code had been set
245
+ * @draft ICU 55
246
+ */
247
+ void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
248
+ if(U_SUCCESS(errorCode)) {
249
+ delete LocalPointerBase<T>::ptr;
250
+ LocalPointerBase<T>::ptr=p;
251
+ if(p==NULL) {
252
+ errorCode=U_MEMORY_ALLOCATION_ERROR;
253
+ }
254
+ } else {
255
+ delete p;
256
+ }
257
+ }
258
+ #endif /* U_HIDE_DRAFT_API */
211
259
  };
212
260
 
213
261
  /**
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  ******************************************************************************
3
3
  *
4
- * Copyright (C) 1996-2014, International Business Machines
4
+ * Copyright (C) 1996-2015, International Business Machines
5
5
  * Corporation and others. All Rights Reserved.
6
6
  *
7
7
  ******************************************************************************
@@ -750,7 +750,7 @@ private:
750
750
  char fullNameBuffer[ULOC_FULLNAME_CAPACITY];
751
751
  // name without keywords
752
752
  char* baseName;
753
- char baseNameBuffer[ULOC_FULLNAME_CAPACITY];
753
+ void initBaseName(UErrorCode& status);
754
754
 
755
755
  UBool fIsBogus;
756
756
 
@@ -795,7 +795,6 @@ Locale::getScript() const
795
795
  inline const char *
796
796
  Locale::getVariant() const
797
797
  {
798
- getBaseName(); // lazy init
799
798
  return &baseName[variantBegin];
800
799
  }
801
800
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  **********************************************************************
3
- * Copyright (c) 2004-2014, International Business Machines
3
+ * Copyright (c) 2004-2015, International Business Machines
4
4
  * Corporation and others. All Rights Reserved.
5
5
  **********************************************************************
6
6
  * Author: Alan Liu
@@ -29,45 +29,43 @@
29
29
  * For example, for English, when formatting "3 hours"
30
30
  * Wide is "3 hours"; short is "3 hrs"; narrow is "3h";
31
31
  * formatting "3 hours 17 minutes" as numeric give "3:17"
32
- * @draft ICU 53
32
+ * @stable ICU 53
33
33
  */
34
34
  enum UMeasureFormatWidth {
35
35
 
36
- #ifndef U_HIDE_DRAFT_API
37
36
  // Wide, short, and narrow must be first and in this order.
38
37
  /**
39
38
  * Spell out measure units.
40
- * @draft ICU 53
39
+ * @stable ICU 53
41
40
  */
42
41
  UMEASFMT_WIDTH_WIDE,
43
42
 
44
43
  /**
45
44
  * Abbreviate measure units.
46
- * @draft ICU 53
45
+ * @stable ICU 53
47
46
  */
48
47
  UMEASFMT_WIDTH_SHORT,
49
48
 
50
49
  /**
51
50
  * Use symbols for measure units when possible.
52
- * @draft ICU 53
51
+ * @stable ICU 53
53
52
  */
54
53
  UMEASFMT_WIDTH_NARROW,
55
54
 
56
55
  /**
57
56
  * Completely omit measure units when possible. For example, format
58
57
  * '5 hours, 37 minutes' as '5:37'
59
- * @draft ICU 53
58
+ * @stable ICU 53
60
59
  */
61
60
  UMEASFMT_WIDTH_NUMERIC,
62
- #endif /* U_HIDE_DRAFT_API */
63
61
 
64
62
  /**
65
63
  * Count of values in this enum.
66
- * @draft ICU 53
64
+ * @stable ICU 53
67
65
  */
68
66
  UMEASFMT_WIDTH_COUNT = 4
69
67
  };
70
- /** @draft ICU 53 */
68
+ /** @stable ICU 53 */
71
69
  typedef enum UMeasureFormatWidth UMeasureFormatWidth;
72
70
 
73
71
  U_NAMESPACE_BEGIN
@@ -97,34 +95,32 @@ class U_I18N_API MeasureFormat : public Format {
97
95
  using Format::parseObject;
98
96
  using Format::format;
99
97
 
100
- #ifndef U_HIDE_DRAFT_API
101
98
  /**
102
99
  * Constructor.
103
- * @draft ICU 53
100
+ * @stable ICU 53
104
101
  */
105
102
  MeasureFormat(
106
103
  const Locale &locale, UMeasureFormatWidth width, UErrorCode &status);
107
104
 
108
105
  /**
109
106
  * Constructor.
110
- * @draft ICU 53
107
+ * @stable ICU 53
111
108
  */
112
109
  MeasureFormat(
113
110
  const Locale &locale,
114
111
  UMeasureFormatWidth width,
115
112
  NumberFormat *nfToAdopt,
116
113
  UErrorCode &status);
117
- #endif /* U_HIDE_DRAFT_API */
118
114
 
119
115
  /**
120
116
  * Copy constructor.
121
- * @draft ICU 53
117
+ * @stable ICU 3.0
122
118
  */
123
119
  MeasureFormat(const MeasureFormat &other);
124
120
 
125
121
  /**
126
122
  * Assignment operator.
127
- * @draft ICU 53
123
+ * @stable ICU 3.0
128
124
  */
129
125
  MeasureFormat &operator=(const MeasureFormat &rhs);
130
126
 
@@ -136,19 +132,19 @@ class U_I18N_API MeasureFormat : public Format {
136
132
 
137
133
  /**
138
134
  * Return true if given Format objects are semantically equal.
139
- * @draft ICU 53
135
+ * @stable ICU 53
140
136
  */
141
137
  virtual UBool operator==(const Format &other) const;
142
138
 
143
139
  /**
144
140
  * Clones this object polymorphically.
145
- * @draft ICU 53
141
+ * @stable ICU 53
146
142
  */
147
143
  virtual Format *clone() const;
148
144
 
149
145
  /**
150
146
  * Formats object to produce a string.
151
- * @draft ICU 53
147
+ * @stable ICU 53
152
148
  */
153
149
  virtual UnicodeString &format(
154
150
  const Formattable &obj,
@@ -167,7 +163,6 @@ class U_I18N_API MeasureFormat : public Format {
167
163
  Formattable &reslt,
168
164
  ParsePosition &pos) const;
169
165
 
170
- #ifndef U_HIDE_DRAFT_API
171
166
  /**
172
167
  * Formats measure objects to produce a string. An example of such a
173
168
  * formatted string is 3 meters, 3.5 centimeters. Measure objects appear
@@ -182,7 +177,7 @@ class U_I18N_API MeasureFormat : public Format {
182
177
  * @param status the error.
183
178
  * @return appendTo reference
184
179
  *
185
- * @draft ICU 53
180
+ * @stable ICU 53
186
181
  */
187
182
  UnicodeString &formatMeasures(
188
183
  const Measure *measures,
@@ -190,31 +185,29 @@ class U_I18N_API MeasureFormat : public Format {
190
185
  UnicodeString &appendTo,
191
186
  FieldPosition &pos,
192
187
  UErrorCode &status) const;
193
- #endif /* U_HIDE_DRAFT_API */
194
188
 
195
- #ifndef U_HIDE_INTERNAL_API
189
+ #ifndef U_HIDE_DRAFT_API
196
190
  /**
197
- * Works like formatMeasures but adds a per unit. An example of such a
198
- * formatted string is 3 meters, 3.5 centimeters per second.
199
- * @param measures array of measure objects.
200
- * @param measureCount the number of measure objects.
201
- * @param perUnit The per unit. In the example formatted string,
202
- * it is *MeasureUnit::createSecond(status).
191
+ * Formats a single measure per unit. An example of such a
192
+ * formatted string is 3.5 meters per second.
193
+ * @param measure The measure object. In above example, 3.5 meters.
194
+ * @param perUnit The per unit. In above example, it is
195
+ * *MeasureUnit::createSecond(status).
203
196
  * @param appendTo formatted string appended here.
204
197
  * @param pos the field position.
205
198
  * @param status the error.
206
199
  * @return appendTo reference
207
200
  *
208
- * @internal Technology preview
201
+ * @draft ICU 55
209
202
  */
210
- UnicodeString &formatMeasuresPer(
211
- const Measure *measures,
212
- int32_t measureCount,
203
+ UnicodeString &formatMeasurePerUnit(
204
+ const Measure &measure,
213
205
  const MeasureUnit &perUnit,
214
206
  UnicodeString &appendTo,
215
207
  FieldPosition &pos,
216
208
  UErrorCode &status) const;
217
- #endif /* U_HIDE_INTERNAL_API */
209
+
210
+ #endif /* U_HIDE_DRAFT_API */
218
211
 
219
212
  /**
220
213
  * Return a formatter for CurrencyAmount objects in the given
@@ -245,7 +238,7 @@ class U_I18N_API MeasureFormat : public Format {
245
238
  * . erived::getStaticClassID()) ...
246
239
  * </pre>
247
240
  * @return The class ID for all objects of this class.
248
- * @draft ICU 53
241
+ * @stable ICU 53
249
242
  */
250
243
  static UClassID U_EXPORT2 getStaticClassID(void);
251
244
 
@@ -258,7 +251,7 @@ class U_I18N_API MeasureFormat : public Format {
258
251
  * @return The class ID for this object. All objects of a
259
252
  * given class have the same class ID. Objects of
260
253
  * other classes have different class IDs.
261
- * @draft ICU 53
254
+ * @stable ICU 53
262
255
  */
263
256
  virtual UClassID getDynamicClassID(void) const;
264
257
 
@@ -347,7 +340,7 @@ class U_I18N_API MeasureFormat : public Format {
347
340
  int32_t widthIndex,
348
341
  UErrorCode &status) const;
349
342
 
350
- int32_t withPerUnit(
343
+ int32_t withPerUnitAndAppend(
351
344
  const UnicodeString &formatted,
352
345
  const MeasureUnit &perUnit,
353
346
  UnicodeString &appendTo,
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  **********************************************************************
3
- * Copyright (c) 2004-2014, International Business Machines
3
+ * Copyright (c) 2004-2015, International Business Machines
4
4
  * Corporation and others. All Rights Reserved.
5
5
  **********************************************************************
6
6
  * Author: Alan Liu
@@ -46,13 +46,13 @@ class U_I18N_API MeasureUnit: public UObject {
46
46
 
47
47
  /**
48
48
  * Copy constructor.
49
- * @draft ICU 53
49
+ * @stable ICU 3.0
50
50
  */
51
51
  MeasureUnit(const MeasureUnit &other);
52
52
 
53
53
  /**
54
54
  * Assignment operator.
55
- * @draft ICU 53
55
+ * @stable ICU 3.0
56
56
  */
57
57
  MeasureUnit &operator=(const MeasureUnit &other);
58
58
 
@@ -76,11 +76,10 @@ class U_I18N_API MeasureUnit: public UObject {
76
76
  */
77
77
  virtual UBool operator==(const UObject& other) const;
78
78
 
79
- #ifndef U_HIDE_DRAFT_API
80
79
  /**
81
80
  * Inequality operator. Return true if this object is not equal
82
81
  * to the given object.
83
- * @draft ICU 53
82
+ * @stable ICU 53
84
83
  */
85
84
  UBool operator!=(const UObject& other) const {
86
85
  return !(*this == other);
@@ -88,13 +87,13 @@ class U_I18N_API MeasureUnit: public UObject {
88
87
 
89
88
  /**
90
89
  * Get the type.
91
- * @draft ICU 53
90
+ * @stable ICU 53
92
91
  */
93
92
  const char *getType() const;
94
93
 
95
94
  /**
96
95
  * Get the sub type.
97
- * @draft ICU 53
96
+ * @stable ICU 53
98
97
  */
99
98
  const char *getSubtype() const;
100
99
 
@@ -107,7 +106,7 @@ class U_I18N_API MeasureUnit: public UObject {
107
106
  * @param destCapacity number of MeasureUnit instances available at dest.
108
107
  * @param errorCode ICU error code.
109
108
  * @return number of available units.
110
- * @draft ICU 53
109
+ * @stable ICU 53
111
110
  */
112
111
  static int32_t getAvailable(
113
112
  MeasureUnit *destArray,
@@ -124,7 +123,7 @@ class U_I18N_API MeasureUnit: public UObject {
124
123
  * @param destCapacity number of MeasureUnit instances available at dest.
125
124
  * @param errorCode ICU error code.
126
125
  * @return number of available units for type.
127
- * @draft ICU 53
126
+ * @stable ICU 53
128
127
  */
129
128
  static int32_t getAvailable(
130
129
  const char *type,
@@ -138,10 +137,9 @@ class U_I18N_API MeasureUnit: public UObject {
138
137
  *
139
138
  * @param errorCode ICU error code.
140
139
  * @return the types.
141
- * @draft ICU 53
140
+ * @stable ICU 53
142
141
  */
143
142
  static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
144
- #endif /* U_HIDE_DRAFT_API */
145
143
 
146
144
  /**
147
145
  * Return the class ID for this class. This is useful only for comparing to
@@ -152,7 +150,7 @@ class U_I18N_API MeasureUnit: public UObject {
152
150
  * . erived::getStaticClassID()) ...
153
151
  * </pre>
154
152
  * @return The class ID for all objects of this class.
155
- * @draft ICU 53
153
+ * @stable ICU 53
156
154
  */
157
155
  static UClassID U_EXPORT2 getStaticClassID(void);
158
156
 
@@ -165,7 +163,7 @@ class U_I18N_API MeasureUnit: public UObject {
165
163
  * @return The class ID for this object. All objects of a
166
164
  * given class have the same class ID. Objects of
167
165
  * other classes have different class IDs.
168
- * @draft ICU 53
166
+ * @stable ICU 53
169
167
  */
170
168
  virtual UClassID getDynamicClassID(void) const;
171
169
 
@@ -184,26 +182,31 @@ class U_I18N_API MeasureUnit: public UObject {
184
182
  * @internal
185
183
  */
186
184
  static int32_t getIndexCount();
185
+
186
+ /**
187
+ * ICU use only.
188
+ * @internal
189
+ */
190
+ static MeasureUnit *resolveUnitPerUnit(
191
+ const MeasureUnit &unit, const MeasureUnit &perUnit);
187
192
  #endif /* U_HIDE_INTERNAL_API */
188
193
 
189
194
  // All code between the "Start generated createXXX methods" comment and
190
195
  // the "End generated createXXX methods" comment is auto generated code
191
196
  // and must not be edited manually. For instructions on how to correctly
192
197
  // update this code, refer to:
193
- // https://sites.google.com/site/icusite/design/formatting/measureformat/updating-measure-unit
198
+ // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
194
199
  //
195
200
  // Start generated createXXX methods
196
201
 
197
- #ifndef U_HIDE_DRAFT_API
198
202
  /**
199
203
  * Returns unit of acceleration: g-force.
200
204
  * Caller owns returned value and must free it.
201
205
  * @param status ICU error code.
202
- * @draft ICU 53
206
+ * @stable ICU 53
203
207
  */
204
208
  static MeasureUnit *createGForce(UErrorCode &status);
205
209
 
206
- #endif /* U_HIDE_DRAFT_API */
207
210
  #ifndef U_HIDE_DRAFT_API
208
211
  /**
209
212
  * Returns unit of acceleration: meter-per-second-squared.
@@ -214,36 +217,30 @@ class U_I18N_API MeasureUnit: public UObject {
214
217
  static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
215
218
 
216
219
  #endif /* U_HIDE_DRAFT_API */
217
- #ifndef U_HIDE_DRAFT_API
218
220
  /**
219
221
  * Returns unit of angle: arc-minute.
220
222
  * Caller owns returned value and must free it.
221
223
  * @param status ICU error code.
222
- * @draft ICU 53
224
+ * @stable ICU 53
223
225
  */
224
226
  static MeasureUnit *createArcMinute(UErrorCode &status);
225
227
 
226
- #endif /* U_HIDE_DRAFT_API */
227
- #ifndef U_HIDE_DRAFT_API
228
228
  /**
229
229
  * Returns unit of angle: arc-second.
230
230
  * Caller owns returned value and must free it.
231
231
  * @param status ICU error code.
232
- * @draft ICU 53
232
+ * @stable ICU 53
233
233
  */
234
234
  static MeasureUnit *createArcSecond(UErrorCode &status);
235
235
 
236
- #endif /* U_HIDE_DRAFT_API */
237
- #ifndef U_HIDE_DRAFT_API
238
236
  /**
239
237
  * Returns unit of angle: degree.
240
238
  * Caller owns returned value and must free it.
241
239
  * @param status ICU error code.
242
- * @draft ICU 53
240
+ * @stable ICU 53
243
241
  */
244
242
  static MeasureUnit *createDegree(UErrorCode &status);
245
243
 
246
- #endif /* U_HIDE_DRAFT_API */
247
244
  #ifndef U_HIDE_DRAFT_API
248
245
  /**
249
246
  * Returns unit of angle: radian.
@@ -254,26 +251,22 @@ class U_I18N_API MeasureUnit: public UObject {
254
251
  static MeasureUnit *createRadian(UErrorCode &status);
255
252
 
256
253
  #endif /* U_HIDE_DRAFT_API */
257
- #ifndef U_HIDE_DRAFT_API
258
254
  /**
259
255
  * Returns unit of area: acre.
260
256
  * Caller owns returned value and must free it.
261
257
  * @param status ICU error code.
262
- * @draft ICU 53
258
+ * @stable ICU 53
263
259
  */
264
260
  static MeasureUnit *createAcre(UErrorCode &status);
265
261
 
266
- #endif /* U_HIDE_DRAFT_API */
267
- #ifndef U_HIDE_DRAFT_API
268
262
  /**
269
263
  * Returns unit of area: hectare.
270
264
  * Caller owns returned value and must free it.
271
265
  * @param status ICU error code.
272
- * @draft ICU 53
266
+ * @stable ICU 53
273
267
  */
274
268
  static MeasureUnit *createHectare(UErrorCode &status);
275
269
 
276
- #endif /* U_HIDE_DRAFT_API */
277
270
  #ifndef U_HIDE_DRAFT_API
278
271
  /**
279
272
  * Returns unit of area: square-centimeter.
@@ -284,16 +277,14 @@ class U_I18N_API MeasureUnit: public UObject {
284
277
  static MeasureUnit *createSquareCentimeter(UErrorCode &status);
285
278
 
286
279
  #endif /* U_HIDE_DRAFT_API */
287
- #ifndef U_HIDE_DRAFT_API
288
280
  /**
289
281
  * Returns unit of area: square-foot.
290
282
  * Caller owns returned value and must free it.
291
283
  * @param status ICU error code.
292
- * @draft ICU 53
284
+ * @stable ICU 53
293
285
  */
294
286
  static MeasureUnit *createSquareFoot(UErrorCode &status);
295
287
 
296
- #endif /* U_HIDE_DRAFT_API */
297
288
  #ifndef U_HIDE_DRAFT_API
298
289
  /**
299
290
  * Returns unit of area: square-inch.
@@ -304,36 +295,30 @@ class U_I18N_API MeasureUnit: public UObject {
304
295
  static MeasureUnit *createSquareInch(UErrorCode &status);
305
296
 
306
297
  #endif /* U_HIDE_DRAFT_API */
307
- #ifndef U_HIDE_DRAFT_API
308
298
  /**
309
299
  * Returns unit of area: square-kilometer.
310
300
  * Caller owns returned value and must free it.
311
301
  * @param status ICU error code.
312
- * @draft ICU 53
302
+ * @stable ICU 53
313
303
  */
314
304
  static MeasureUnit *createSquareKilometer(UErrorCode &status);
315
305
 
316
- #endif /* U_HIDE_DRAFT_API */
317
- #ifndef U_HIDE_DRAFT_API
318
306
  /**
319
307
  * Returns unit of area: square-meter.
320
308
  * Caller owns returned value and must free it.
321
309
  * @param status ICU error code.
322
- * @draft ICU 53
310
+ * @stable ICU 53
323
311
  */
324
312
  static MeasureUnit *createSquareMeter(UErrorCode &status);
325
313
 
326
- #endif /* U_HIDE_DRAFT_API */
327
- #ifndef U_HIDE_DRAFT_API
328
314
  /**
329
315
  * Returns unit of area: square-mile.
330
316
  * Caller owns returned value and must free it.
331
317
  * @param status ICU error code.
332
- * @draft ICU 53
318
+ * @stable ICU 53
333
319
  */
334
320
  static MeasureUnit *createSquareMile(UErrorCode &status);
335
321
 
336
- #endif /* U_HIDE_DRAFT_API */
337
322
  #ifndef U_HIDE_DRAFT_API
338
323
  /**
339
324
  * Returns unit of area: square-yard.
@@ -464,26 +449,22 @@ class U_I18N_API MeasureUnit: public UObject {
464
449
  static MeasureUnit *createTerabyte(UErrorCode &status);
465
450
 
466
451
  #endif /* U_HIDE_DRAFT_API */
467
- #ifndef U_HIDE_DRAFT_API
468
452
  /**
469
453
  * Returns unit of duration: day.
470
454
  * Caller owns returned value and must free it.
471
455
  * @param status ICU error code.
472
- * @draft ICU 53
456
+ * @stable ICU 53
473
457
  */
474
458
  static MeasureUnit *createDay(UErrorCode &status);
475
459
 
476
- #endif /* U_HIDE_DRAFT_API */
477
- #ifndef U_HIDE_DRAFT_API
478
460
  /**
479
461
  * Returns unit of duration: hour.
480
462
  * Caller owns returned value and must free it.
481
463
  * @param status ICU error code.
482
- * @draft ICU 53
464
+ * @stable ICU 53
483
465
  */
484
466
  static MeasureUnit *createHour(UErrorCode &status);
485
467
 
486
- #endif /* U_HIDE_DRAFT_API */
487
468
  #ifndef U_HIDE_DRAFT_API
488
469
  /**
489
470
  * Returns unit of duration: microsecond.
@@ -494,36 +475,30 @@ class U_I18N_API MeasureUnit: public UObject {
494
475
  static MeasureUnit *createMicrosecond(UErrorCode &status);
495
476
 
496
477
  #endif /* U_HIDE_DRAFT_API */
497
- #ifndef U_HIDE_DRAFT_API
498
478
  /**
499
479
  * Returns unit of duration: millisecond.
500
480
  * Caller owns returned value and must free it.
501
481
  * @param status ICU error code.
502
- * @draft ICU 53
482
+ * @stable ICU 53
503
483
  */
504
484
  static MeasureUnit *createMillisecond(UErrorCode &status);
505
485
 
506
- #endif /* U_HIDE_DRAFT_API */
507
- #ifndef U_HIDE_DRAFT_API
508
486
  /**
509
487
  * Returns unit of duration: minute.
510
488
  * Caller owns returned value and must free it.
511
489
  * @param status ICU error code.
512
- * @draft ICU 53
490
+ * @stable ICU 53
513
491
  */
514
492
  static MeasureUnit *createMinute(UErrorCode &status);
515
493
 
516
- #endif /* U_HIDE_DRAFT_API */
517
- #ifndef U_HIDE_DRAFT_API
518
494
  /**
519
495
  * Returns unit of duration: month.
520
496
  * Caller owns returned value and must free it.
521
497
  * @param status ICU error code.
522
- * @draft ICU 53
498
+ * @stable ICU 53
523
499
  */
524
500
  static MeasureUnit *createMonth(UErrorCode &status);
525
501
 
526
- #endif /* U_HIDE_DRAFT_API */
527
502
  #ifndef U_HIDE_DRAFT_API
528
503
  /**
529
504
  * Returns unit of duration: nanosecond.
@@ -534,36 +509,30 @@ class U_I18N_API MeasureUnit: public UObject {
534
509
  static MeasureUnit *createNanosecond(UErrorCode &status);
535
510
 
536
511
  #endif /* U_HIDE_DRAFT_API */
537
- #ifndef U_HIDE_DRAFT_API
538
512
  /**
539
513
  * Returns unit of duration: second.
540
514
  * Caller owns returned value and must free it.
541
515
  * @param status ICU error code.
542
- * @draft ICU 53
516
+ * @stable ICU 53
543
517
  */
544
518
  static MeasureUnit *createSecond(UErrorCode &status);
545
519
 
546
- #endif /* U_HIDE_DRAFT_API */
547
- #ifndef U_HIDE_DRAFT_API
548
520
  /**
549
521
  * Returns unit of duration: week.
550
522
  * Caller owns returned value and must free it.
551
523
  * @param status ICU error code.
552
- * @draft ICU 53
524
+ * @stable ICU 53
553
525
  */
554
526
  static MeasureUnit *createWeek(UErrorCode &status);
555
527
 
556
- #endif /* U_HIDE_DRAFT_API */
557
- #ifndef U_HIDE_DRAFT_API
558
528
  /**
559
529
  * Returns unit of duration: year.
560
530
  * Caller owns returned value and must free it.
561
531
  * @param status ICU error code.
562
- * @draft ICU 53
532
+ * @stable ICU 53
563
533
  */
564
534
  static MeasureUnit *createYear(UErrorCode &status);
565
535
 
566
- #endif /* U_HIDE_DRAFT_API */
567
536
  #ifndef U_HIDE_DRAFT_API
568
537
  /**
569
538
  * Returns unit of electric: ampere.
@@ -714,16 +683,14 @@ class U_I18N_API MeasureUnit: public UObject {
714
683
  static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
715
684
 
716
685
  #endif /* U_HIDE_DRAFT_API */
717
- #ifndef U_HIDE_DRAFT_API
718
686
  /**
719
687
  * Returns unit of length: centimeter.
720
688
  * Caller owns returned value and must free it.
721
689
  * @param status ICU error code.
722
- * @draft ICU 53
690
+ * @stable ICU 53
723
691
  */
724
692
  static MeasureUnit *createCentimeter(UErrorCode &status);
725
693
 
726
- #endif /* U_HIDE_DRAFT_API */
727
694
  #ifndef U_HIDE_DRAFT_API
728
695
  /**
729
696
  * Returns unit of length: decimeter.
@@ -744,16 +711,14 @@ class U_I18N_API MeasureUnit: public UObject {
744
711
  static MeasureUnit *createFathom(UErrorCode &status);
745
712
 
746
713
  #endif /* U_HIDE_DRAFT_API */
747
- #ifndef U_HIDE_DRAFT_API
748
714
  /**
749
715
  * Returns unit of length: foot.
750
716
  * Caller owns returned value and must free it.
751
717
  * @param status ICU error code.
752
- * @draft ICU 53
718
+ * @stable ICU 53
753
719
  */
754
720
  static MeasureUnit *createFoot(UErrorCode &status);
755
721
 
756
- #endif /* U_HIDE_DRAFT_API */
757
722
  #ifndef U_HIDE_DRAFT_API
758
723
  /**
759
724
  * Returns unit of length: furlong.
@@ -764,46 +729,38 @@ class U_I18N_API MeasureUnit: public UObject {
764
729
  static MeasureUnit *createFurlong(UErrorCode &status);
765
730
 
766
731
  #endif /* U_HIDE_DRAFT_API */
767
- #ifndef U_HIDE_DRAFT_API
768
732
  /**
769
733
  * Returns unit of length: inch.
770
734
  * Caller owns returned value and must free it.
771
735
  * @param status ICU error code.
772
- * @draft ICU 53
736
+ * @stable ICU 53
773
737
  */
774
738
  static MeasureUnit *createInch(UErrorCode &status);
775
739
 
776
- #endif /* U_HIDE_DRAFT_API */
777
- #ifndef U_HIDE_DRAFT_API
778
740
  /**
779
741
  * Returns unit of length: kilometer.
780
742
  * Caller owns returned value and must free it.
781
743
  * @param status ICU error code.
782
- * @draft ICU 53
744
+ * @stable ICU 53
783
745
  */
784
746
  static MeasureUnit *createKilometer(UErrorCode &status);
785
747
 
786
- #endif /* U_HIDE_DRAFT_API */
787
- #ifndef U_HIDE_DRAFT_API
788
748
  /**
789
749
  * Returns unit of length: light-year.
790
750
  * Caller owns returned value and must free it.
791
751
  * @param status ICU error code.
792
- * @draft ICU 53
752
+ * @stable ICU 53
793
753
  */
794
754
  static MeasureUnit *createLightYear(UErrorCode &status);
795
755
 
796
- #endif /* U_HIDE_DRAFT_API */
797
- #ifndef U_HIDE_DRAFT_API
798
756
  /**
799
757
  * Returns unit of length: meter.
800
758
  * Caller owns returned value and must free it.
801
759
  * @param status ICU error code.
802
- * @draft ICU 53
760
+ * @stable ICU 53
803
761
  */
804
762
  static MeasureUnit *createMeter(UErrorCode &status);
805
763
 
806
- #endif /* U_HIDE_DRAFT_API */
807
764
  #ifndef U_HIDE_DRAFT_API
808
765
  /**
809
766
  * Returns unit of length: micrometer.
@@ -814,26 +771,22 @@ class U_I18N_API MeasureUnit: public UObject {
814
771
  static MeasureUnit *createMicrometer(UErrorCode &status);
815
772
 
816
773
  #endif /* U_HIDE_DRAFT_API */
817
- #ifndef U_HIDE_DRAFT_API
818
774
  /**
819
775
  * Returns unit of length: mile.
820
776
  * Caller owns returned value and must free it.
821
777
  * @param status ICU error code.
822
- * @draft ICU 53
778
+ * @stable ICU 53
823
779
  */
824
780
  static MeasureUnit *createMile(UErrorCode &status);
825
781
 
826
- #endif /* U_HIDE_DRAFT_API */
827
- #ifndef U_HIDE_DRAFT_API
828
782
  /**
829
783
  * Returns unit of length: millimeter.
830
784
  * Caller owns returned value and must free it.
831
785
  * @param status ICU error code.
832
- * @draft ICU 53
786
+ * @stable ICU 53
833
787
  */
834
788
  static MeasureUnit *createMillimeter(UErrorCode &status);
835
789
 
836
- #endif /* U_HIDE_DRAFT_API */
837
790
  #ifndef U_HIDE_DRAFT_API
838
791
  /**
839
792
  * Returns unit of length: nanometer.
@@ -864,26 +817,22 @@ class U_I18N_API MeasureUnit: public UObject {
864
817
  static MeasureUnit *createParsec(UErrorCode &status);
865
818
 
866
819
  #endif /* U_HIDE_DRAFT_API */
867
- #ifndef U_HIDE_DRAFT_API
868
820
  /**
869
821
  * Returns unit of length: picometer.
870
822
  * Caller owns returned value and must free it.
871
823
  * @param status ICU error code.
872
- * @draft ICU 53
824
+ * @stable ICU 53
873
825
  */
874
826
  static MeasureUnit *createPicometer(UErrorCode &status);
875
827
 
876
- #endif /* U_HIDE_DRAFT_API */
877
- #ifndef U_HIDE_DRAFT_API
878
828
  /**
879
829
  * Returns unit of length: yard.
880
830
  * Caller owns returned value and must free it.
881
831
  * @param status ICU error code.
882
- * @draft ICU 53
832
+ * @stable ICU 53
883
833
  */
884
834
  static MeasureUnit *createYard(UErrorCode &status);
885
835
 
886
- #endif /* U_HIDE_DRAFT_API */
887
836
  #ifndef U_HIDE_DRAFT_API
888
837
  /**
889
838
  * Returns unit of light: lux.
@@ -904,26 +853,22 @@ class U_I18N_API MeasureUnit: public UObject {
904
853
  static MeasureUnit *createCarat(UErrorCode &status);
905
854
 
906
855
  #endif /* U_HIDE_DRAFT_API */
907
- #ifndef U_HIDE_DRAFT_API
908
856
  /**
909
857
  * Returns unit of mass: gram.
910
858
  * Caller owns returned value and must free it.
911
859
  * @param status ICU error code.
912
- * @draft ICU 53
860
+ * @stable ICU 53
913
861
  */
914
862
  static MeasureUnit *createGram(UErrorCode &status);
915
863
 
916
- #endif /* U_HIDE_DRAFT_API */
917
- #ifndef U_HIDE_DRAFT_API
918
864
  /**
919
865
  * Returns unit of mass: kilogram.
920
866
  * Caller owns returned value and must free it.
921
867
  * @param status ICU error code.
922
- * @draft ICU 53
868
+ * @stable ICU 53
923
869
  */
924
870
  static MeasureUnit *createKilogram(UErrorCode &status);
925
871
 
926
- #endif /* U_HIDE_DRAFT_API */
927
872
  #ifndef U_HIDE_DRAFT_API
928
873
  /**
929
874
  * Returns unit of mass: metric-ton.
@@ -954,16 +899,14 @@ class U_I18N_API MeasureUnit: public UObject {
954
899
  static MeasureUnit *createMilligram(UErrorCode &status);
955
900
 
956
901
  #endif /* U_HIDE_DRAFT_API */
957
- #ifndef U_HIDE_DRAFT_API
958
902
  /**
959
903
  * Returns unit of mass: ounce.
960
904
  * Caller owns returned value and must free it.
961
905
  * @param status ICU error code.
962
- * @draft ICU 53
906
+ * @stable ICU 53
963
907
  */
964
908
  static MeasureUnit *createOunce(UErrorCode &status);
965
909
 
966
- #endif /* U_HIDE_DRAFT_API */
967
910
  #ifndef U_HIDE_DRAFT_API
968
911
  /**
969
912
  * Returns unit of mass: ounce-troy.
@@ -974,16 +917,14 @@ class U_I18N_API MeasureUnit: public UObject {
974
917
  static MeasureUnit *createOunceTroy(UErrorCode &status);
975
918
 
976
919
  #endif /* U_HIDE_DRAFT_API */
977
- #ifndef U_HIDE_DRAFT_API
978
920
  /**
979
921
  * Returns unit of mass: pound.
980
922
  * Caller owns returned value and must free it.
981
923
  * @param status ICU error code.
982
- * @draft ICU 53
924
+ * @stable ICU 53
983
925
  */
984
926
  static MeasureUnit *createPound(UErrorCode &status);
985
927
 
986
- #endif /* U_HIDE_DRAFT_API */
987
928
  #ifndef U_HIDE_DRAFT_API
988
929
  /**
989
930
  * Returns unit of mass: stone.
@@ -1014,26 +955,22 @@ class U_I18N_API MeasureUnit: public UObject {
1014
955
  static MeasureUnit *createGigawatt(UErrorCode &status);
1015
956
 
1016
957
  #endif /* U_HIDE_DRAFT_API */
1017
- #ifndef U_HIDE_DRAFT_API
1018
958
  /**
1019
959
  * Returns unit of power: horsepower.
1020
960
  * Caller owns returned value and must free it.
1021
961
  * @param status ICU error code.
1022
- * @draft ICU 53
962
+ * @stable ICU 53
1023
963
  */
1024
964
  static MeasureUnit *createHorsepower(UErrorCode &status);
1025
965
 
1026
- #endif /* U_HIDE_DRAFT_API */
1027
- #ifndef U_HIDE_DRAFT_API
1028
966
  /**
1029
967
  * Returns unit of power: kilowatt.
1030
968
  * Caller owns returned value and must free it.
1031
969
  * @param status ICU error code.
1032
- * @draft ICU 53
970
+ * @stable ICU 53
1033
971
  */
1034
972
  static MeasureUnit *createKilowatt(UErrorCode &status);
1035
973
 
1036
- #endif /* U_HIDE_DRAFT_API */
1037
974
  #ifndef U_HIDE_DRAFT_API
1038
975
  /**
1039
976
  * Returns unit of power: megawatt.
@@ -1054,46 +991,38 @@ class U_I18N_API MeasureUnit: public UObject {
1054
991
  static MeasureUnit *createMilliwatt(UErrorCode &status);
1055
992
 
1056
993
  #endif /* U_HIDE_DRAFT_API */
1057
- #ifndef U_HIDE_DRAFT_API
1058
994
  /**
1059
995
  * Returns unit of power: watt.
1060
996
  * Caller owns returned value and must free it.
1061
997
  * @param status ICU error code.
1062
- * @draft ICU 53
998
+ * @stable ICU 53
1063
999
  */
1064
1000
  static MeasureUnit *createWatt(UErrorCode &status);
1065
1001
 
1066
- #endif /* U_HIDE_DRAFT_API */
1067
- #ifndef U_HIDE_DRAFT_API
1068
1002
  /**
1069
1003
  * Returns unit of pressure: hectopascal.
1070
1004
  * Caller owns returned value and must free it.
1071
1005
  * @param status ICU error code.
1072
- * @draft ICU 53
1006
+ * @stable ICU 53
1073
1007
  */
1074
1008
  static MeasureUnit *createHectopascal(UErrorCode &status);
1075
1009
 
1076
- #endif /* U_HIDE_DRAFT_API */
1077
- #ifndef U_HIDE_DRAFT_API
1078
1010
  /**
1079
1011
  * Returns unit of pressure: inch-hg.
1080
1012
  * Caller owns returned value and must free it.
1081
1013
  * @param status ICU error code.
1082
- * @draft ICU 53
1014
+ * @stable ICU 53
1083
1015
  */
1084
1016
  static MeasureUnit *createInchHg(UErrorCode &status);
1085
1017
 
1086
- #endif /* U_HIDE_DRAFT_API */
1087
- #ifndef U_HIDE_DRAFT_API
1088
1018
  /**
1089
1019
  * Returns unit of pressure: millibar.
1090
1020
  * Caller owns returned value and must free it.
1091
1021
  * @param status ICU error code.
1092
- * @draft ICU 53
1022
+ * @stable ICU 53
1093
1023
  */
1094
1024
  static MeasureUnit *createMillibar(UErrorCode &status);
1095
1025
 
1096
- #endif /* U_HIDE_DRAFT_API */
1097
1026
  #ifndef U_HIDE_DRAFT_API
1098
1027
  /**
1099
1028
  * Returns unit of pressure: millimeter-of-mercury.
@@ -1124,56 +1053,46 @@ class U_I18N_API MeasureUnit: public UObject {
1124
1053
  static MeasureUnit *createKarat(UErrorCode &status);
1125
1054
 
1126
1055
  #endif /* U_HIDE_DRAFT_API */
1127
- #ifndef U_HIDE_DRAFT_API
1128
1056
  /**
1129
1057
  * Returns unit of speed: kilometer-per-hour.
1130
1058
  * Caller owns returned value and must free it.
1131
1059
  * @param status ICU error code.
1132
- * @draft ICU 53
1060
+ * @stable ICU 53
1133
1061
  */
1134
1062
  static MeasureUnit *createKilometerPerHour(UErrorCode &status);
1135
1063
 
1136
- #endif /* U_HIDE_DRAFT_API */
1137
- #ifndef U_HIDE_DRAFT_API
1138
1064
  /**
1139
1065
  * Returns unit of speed: meter-per-second.
1140
1066
  * Caller owns returned value and must free it.
1141
1067
  * @param status ICU error code.
1142
- * @draft ICU 53
1068
+ * @stable ICU 53
1143
1069
  */
1144
1070
  static MeasureUnit *createMeterPerSecond(UErrorCode &status);
1145
1071
 
1146
- #endif /* U_HIDE_DRAFT_API */
1147
- #ifndef U_HIDE_DRAFT_API
1148
1072
  /**
1149
1073
  * Returns unit of speed: mile-per-hour.
1150
1074
  * Caller owns returned value and must free it.
1151
1075
  * @param status ICU error code.
1152
- * @draft ICU 53
1076
+ * @stable ICU 53
1153
1077
  */
1154
1078
  static MeasureUnit *createMilePerHour(UErrorCode &status);
1155
1079
 
1156
- #endif /* U_HIDE_DRAFT_API */
1157
- #ifndef U_HIDE_DRAFT_API
1158
1080
  /**
1159
1081
  * Returns unit of temperature: celsius.
1160
1082
  * Caller owns returned value and must free it.
1161
1083
  * @param status ICU error code.
1162
- * @draft ICU 53
1084
+ * @stable ICU 53
1163
1085
  */
1164
1086
  static MeasureUnit *createCelsius(UErrorCode &status);
1165
1087
 
1166
- #endif /* U_HIDE_DRAFT_API */
1167
- #ifndef U_HIDE_DRAFT_API
1168
1088
  /**
1169
1089
  * Returns unit of temperature: fahrenheit.
1170
1090
  * Caller owns returned value and must free it.
1171
1091
  * @param status ICU error code.
1172
- * @draft ICU 53
1092
+ * @stable ICU 53
1173
1093
  */
1174
1094
  static MeasureUnit *createFahrenheit(UErrorCode &status);
1175
1095
 
1176
- #endif /* U_HIDE_DRAFT_API */
1177
1096
  #ifndef U_HIDE_DRAFT_API
1178
1097
  /**
1179
1098
  * Returns unit of temperature: kelvin.
@@ -1244,16 +1163,14 @@ class U_I18N_API MeasureUnit: public UObject {
1244
1163
  static MeasureUnit *createCubicInch(UErrorCode &status);
1245
1164
 
1246
1165
  #endif /* U_HIDE_DRAFT_API */
1247
- #ifndef U_HIDE_DRAFT_API
1248
1166
  /**
1249
1167
  * Returns unit of volume: cubic-kilometer.
1250
1168
  * Caller owns returned value and must free it.
1251
1169
  * @param status ICU error code.
1252
- * @draft ICU 53
1170
+ * @stable ICU 53
1253
1171
  */
1254
1172
  static MeasureUnit *createCubicKilometer(UErrorCode &status);
1255
1173
 
1256
- #endif /* U_HIDE_DRAFT_API */
1257
1174
  #ifndef U_HIDE_DRAFT_API
1258
1175
  /**
1259
1176
  * Returns unit of volume: cubic-meter.
@@ -1264,16 +1181,14 @@ class U_I18N_API MeasureUnit: public UObject {
1264
1181
  static MeasureUnit *createCubicMeter(UErrorCode &status);
1265
1182
 
1266
1183
  #endif /* U_HIDE_DRAFT_API */
1267
- #ifndef U_HIDE_DRAFT_API
1268
1184
  /**
1269
1185
  * Returns unit of volume: cubic-mile.
1270
1186
  * Caller owns returned value and must free it.
1271
1187
  * @param status ICU error code.
1272
- * @draft ICU 53
1188
+ * @stable ICU 53
1273
1189
  */
1274
1190
  static MeasureUnit *createCubicMile(UErrorCode &status);
1275
1191
 
1276
- #endif /* U_HIDE_DRAFT_API */
1277
1192
  #ifndef U_HIDE_DRAFT_API
1278
1193
  /**
1279
1194
  * Returns unit of volume: cubic-yard.
@@ -1334,16 +1249,14 @@ class U_I18N_API MeasureUnit: public UObject {
1334
1249
  static MeasureUnit *createHectoliter(UErrorCode &status);
1335
1250
 
1336
1251
  #endif /* U_HIDE_DRAFT_API */
1337
- #ifndef U_HIDE_DRAFT_API
1338
1252
  /**
1339
1253
  * Returns unit of volume: liter.
1340
1254
  * Caller owns returned value and must free it.
1341
1255
  * @param status ICU error code.
1342
- * @draft ICU 53
1256
+ * @stable ICU 53
1343
1257
  */
1344
1258
  static MeasureUnit *createLiter(UErrorCode &status);
1345
1259
 
1346
- #endif /* U_HIDE_DRAFT_API */
1347
1260
  #ifndef U_HIDE_DRAFT_API
1348
1261
  /**
1349
1262
  * Returns unit of volume: megaliter.