pango 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (530) hide show
  1. checksums.yaml +7 -0
  2. data/README +33 -0
  3. data/Rakefile +65 -0
  4. data/ext/pango/depend +12 -0
  5. data/ext/pango/extconf.rb +90 -0
  6. data/ext/pango/pango.def +18 -0
  7. data/ext/pango/rbpango.c +318 -0
  8. data/ext/pango/rbpango.h +96 -0
  9. data/ext/pango/rbpangoanalysis.c +218 -0
  10. data/ext/pango/rbpangoattribute.c +499 -0
  11. data/ext/pango/rbpangoattriterator.c +141 -0
  12. data/ext/pango/rbpangoattrlist.c +101 -0
  13. data/ext/pango/rbpangocairo.c +122 -0
  14. data/ext/pango/rbpangocairocontext.c +131 -0
  15. data/ext/pango/rbpangocolor.c +120 -0
  16. data/ext/pango/rbpangocontext.c +309 -0
  17. data/ext/pango/rbpangoconversions.h +111 -0
  18. data/ext/pango/rbpangocoverage.c +106 -0
  19. data/ext/pango/rbpangoengine.c +73 -0
  20. data/ext/pango/rbpangofont.c +110 -0
  21. data/ext/pango/rbpangofontdescription.c +282 -0
  22. data/ext/pango/rbpangofontface.c +73 -0
  23. data/ext/pango/rbpangofontfamily.c +79 -0
  24. data/ext/pango/rbpangofontmap.c +102 -0
  25. data/ext/pango/rbpangofontmetrics.c +85 -0
  26. data/ext/pango/rbpangofontset.c +69 -0
  27. data/ext/pango/rbpangofontsetsimple.c +60 -0
  28. data/ext/pango/rbpangoglyphinfo.c +123 -0
  29. data/ext/pango/rbpangoglyphitem.c +125 -0
  30. data/ext/pango/rbpangoglyphstring.c +151 -0
  31. data/ext/pango/rbpangogravity.c +54 -0
  32. data/ext/pango/rbpangoitem.c +95 -0
  33. data/ext/pango/rbpangolanguage.c +86 -0
  34. data/ext/pango/rbpangolayout.c +572 -0
  35. data/ext/pango/rbpangolayoutiter.c +189 -0
  36. data/ext/pango/rbpangolayoutline.c +239 -0
  37. data/ext/pango/rbpangologattr.c +109 -0
  38. data/ext/pango/rbpangomatrix.c +143 -0
  39. data/ext/pango/rbpangoprivate.h +49 -0
  40. data/ext/pango/rbpangorectangle.c +170 -0
  41. data/ext/pango/rbpangorenderer.c +193 -0
  42. data/ext/pango/rbpangoscript.c +84 -0
  43. data/ext/pango/rbpangoscriptiter.c +92 -0
  44. data/ext/pango/rbpangotabarray.c +128 -0
  45. data/extconf.rb +49 -0
  46. data/lib/2.0/pango.so +0 -0
  47. data/lib/2.1/pango.so +0 -0
  48. data/lib/2.2/pango.so +0 -0
  49. data/lib/pango.rb +79 -0
  50. data/sample/attribute.rb +82 -0
  51. data/sample/break.rb +28 -0
  52. data/sample/gdk_layout.rb +27 -0
  53. data/sample/glyphstring.rb +61 -0
  54. data/sample/item.rb +37 -0
  55. data/sample/label.rb +23 -0
  56. data/sample/layout.rb +102 -0
  57. data/sample/pango_cairo.rb +66 -0
  58. data/sample/parse.rb +33 -0
  59. data/sample/sample.txt +10 -0
  60. data/sample/script.rb +23 -0
  61. data/test/pango-test-utils.rb +9 -0
  62. data/test/run-test.rb +28 -0
  63. data/test/test-analysis.rb +26 -0
  64. data/test/test-attribute.rb +19 -0
  65. data/test/test-color.rb +47 -0
  66. data/test/test-language.rb +7 -0
  67. data/test/test-layout.rb +34 -0
  68. data/test/test-log-attr.rb +26 -0
  69. data/test/test-matrix.rb +26 -0
  70. data/test/test-rectangle.rb +26 -0
  71. data/vendor/local/bin/derb.exe +0 -0
  72. data/vendor/local/bin/genbrk.exe +0 -0
  73. data/vendor/local/bin/genccode.exe +0 -0
  74. data/vendor/local/bin/gencfu.exe +0 -0
  75. data/vendor/local/bin/gencmn.exe +0 -0
  76. data/vendor/local/bin/gencnval.exe +0 -0
  77. data/vendor/local/bin/gendict.exe +0 -0
  78. data/vendor/local/bin/gennorm2.exe +0 -0
  79. data/vendor/local/bin/genrb.exe +0 -0
  80. data/vendor/local/bin/gensprep.exe +0 -0
  81. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  82. data/vendor/local/bin/hb-shape.exe +0 -0
  83. data/vendor/local/bin/hb-view.exe +0 -0
  84. data/vendor/local/bin/icu-config +820 -0
  85. data/vendor/local/bin/icuinfo.exe +0 -0
  86. data/vendor/local/bin/icupkg.exe +0 -0
  87. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  88. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  89. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  90. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  91. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  92. data/vendor/local/bin/makeconv.exe +0 -0
  93. data/vendor/local/bin/pango-querymodules.exe +0 -0
  94. data/vendor/local/bin/pango-view.exe +0 -0
  95. data/vendor/local/bin/pkgdata.exe +0 -0
  96. data/vendor/local/bin/uconv.exe +0 -0
  97. data/vendor/local/etc/pango/pango.modules +19 -0
  98. data/vendor/local/include/harfbuzz/hb-blob.h +126 -0
  99. data/vendor/local/include/harfbuzz/hb-buffer.h +344 -0
  100. data/vendor/local/include/harfbuzz/hb-common.h +344 -0
  101. data/vendor/local/include/harfbuzz/hb-deprecated.h +51 -0
  102. data/vendor/local/include/harfbuzz/hb-face.h +117 -0
  103. data/vendor/local/include/harfbuzz/hb-font.h +507 -0
  104. data/vendor/local/include/harfbuzz/hb-ft.h +62 -0
  105. data/vendor/local/include/harfbuzz/hb-glib.h +52 -0
  106. data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
  107. data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
  108. data/vendor/local/include/harfbuzz/hb-ot-layout.h +302 -0
  109. data/vendor/local/include/harfbuzz/hb-ot-shape.h +53 -0
  110. data/vendor/local/include/harfbuzz/hb-ot-tag.h +59 -0
  111. data/vendor/local/include/harfbuzz/hb-ot.h +43 -0
  112. data/vendor/local/include/harfbuzz/hb-set.h +154 -0
  113. data/vendor/local/include/harfbuzz/hb-shape-plan.h +89 -0
  114. data/vendor/local/include/harfbuzz/hb-shape.h +81 -0
  115. data/vendor/local/include/harfbuzz/hb-unicode.h +445 -0
  116. data/vendor/local/include/harfbuzz/hb-version.h +66 -0
  117. data/vendor/local/include/harfbuzz/hb.h +47 -0
  118. data/vendor/local/include/layout/LEFontInstance.h +550 -0
  119. data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
  120. data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
  121. data/vendor/local/include/layout/LEInsertionList.h +177 -0
  122. data/vendor/local/include/layout/LELanguages.h +112 -0
  123. data/vendor/local/include/layout/LEScripts.h +263 -0
  124. data/vendor/local/include/layout/LESwaps.h +100 -0
  125. data/vendor/local/include/layout/LETableReference.h +418 -0
  126. data/vendor/local/include/layout/LETypes.h +728 -0
  127. data/vendor/local/include/layout/LayoutEngine.h +518 -0
  128. data/vendor/local/include/layout/ParagraphLayout.h +747 -0
  129. data/vendor/local/include/layout/RunArrays.h +676 -0
  130. data/vendor/local/include/layout/loengine.h +225 -0
  131. data/vendor/local/include/layout/playout.h +466 -0
  132. data/vendor/local/include/layout/plruns.h +441 -0
  133. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +514 -0
  134. data/vendor/local/include/pango-1.0/pango/pango-bidi-type.h +136 -0
  135. data/vendor/local/include/pango-1.0/pango/pango-break.h +173 -0
  136. data/vendor/local/include/pango-1.0/pango/pango-context.h +112 -0
  137. data/vendor/local/include/pango-1.0/pango/pango-coverage.h +79 -0
  138. data/vendor/local/include/pango-1.0/pango/pango-engine.h +429 -0
  139. data/vendor/local/include/pango-1.0/pango/pango-enum-types.h +69 -0
  140. data/vendor/local/include/pango-1.0/pango/pango-features.h +12 -0
  141. data/vendor/local/include/pango-1.0/pango/pango-font.h +622 -0
  142. data/vendor/local/include/pango-1.0/pango/pango-fontmap.h +167 -0
  143. data/vendor/local/include/pango-1.0/pango/pango-fontset.h +169 -0
  144. data/vendor/local/include/pango-1.0/pango/pango-glyph-item.h +158 -0
  145. data/vendor/local/include/pango-1.0/pango/pango-glyph.h +197 -0
  146. data/vendor/local/include/pango-1.0/pango/pango-gravity.h +128 -0
  147. data/vendor/local/include/pango-1.0/pango/pango-item.h +109 -0
  148. data/vendor/local/include/pango-1.0/pango/pango-language.h +61 -0
  149. data/vendor/local/include/pango-1.0/pango/pango-layout.h +340 -0
  150. data/vendor/local/include/pango-1.0/pango/pango-matrix.h +117 -0
  151. data/vendor/local/include/pango-1.0/pango/pango-modules.h +71 -0
  152. data/vendor/local/include/pango-1.0/pango/pango-ot.h +391 -0
  153. data/vendor/local/include/pango-1.0/pango/pango-renderer.h +260 -0
  154. data/vendor/local/include/pango-1.0/pango/pango-script.h +260 -0
  155. data/vendor/local/include/pango-1.0/pango/pango-tabs.h +87 -0
  156. data/vendor/local/include/pango-1.0/pango/pango-types.h +200 -0
  157. data/vendor/local/include/pango-1.0/pango/pango-utils.h +189 -0
  158. data/vendor/local/include/pango-1.0/pango/pango.h +48 -0
  159. data/vendor/local/include/pango-1.0/pango/pangocairo.h +169 -0
  160. data/vendor/local/include/pango-1.0/pango/pangofc-decoder.h +110 -0
  161. data/vendor/local/include/pango-1.0/pango/pangofc-font.h +153 -0
  162. data/vendor/local/include/pango-1.0/pango/pangofc-fontmap.h +289 -0
  163. data/vendor/local/include/pango-1.0/pango/pangoft2.h +133 -0
  164. data/vendor/local/include/pango-1.0/pango/pangowin32.h +128 -0
  165. data/vendor/local/include/unicode/alphaindex.h +752 -0
  166. data/vendor/local/include/unicode/appendable.h +232 -0
  167. data/vendor/local/include/unicode/basictz.h +214 -0
  168. data/vendor/local/include/unicode/brkiter.h +655 -0
  169. data/vendor/local/include/unicode/bytestream.h +257 -0
  170. data/vendor/local/include/unicode/bytestrie.h +519 -0
  171. data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
  172. data/vendor/local/include/unicode/calendar.h +2519 -0
  173. data/vendor/local/include/unicode/caniter.h +208 -0
  174. data/vendor/local/include/unicode/chariter.h +722 -0
  175. data/vendor/local/include/unicode/choicfmt.h +594 -0
  176. data/vendor/local/include/unicode/coleitr.h +404 -0
  177. data/vendor/local/include/unicode/coll.h +1267 -0
  178. data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
  179. data/vendor/local/include/unicode/curramt.h +130 -0
  180. data/vendor/local/include/unicode/currpinf.h +258 -0
  181. data/vendor/local/include/unicode/currunit.h +110 -0
  182. data/vendor/local/include/unicode/datefmt.h +883 -0
  183. data/vendor/local/include/unicode/dbbi.h +40 -0
  184. data/vendor/local/include/unicode/dcfmtsym.h +482 -0
  185. data/vendor/local/include/unicode/decimfmt.h +2479 -0
  186. data/vendor/local/include/unicode/docmain.h +215 -0
  187. data/vendor/local/include/unicode/dtfmtsym.h +912 -0
  188. data/vendor/local/include/unicode/dtintrv.h +158 -0
  189. data/vendor/local/include/unicode/dtitvfmt.h +985 -0
  190. data/vendor/local/include/unicode/dtitvinf.h +514 -0
  191. data/vendor/local/include/unicode/dtptngen.h +498 -0
  192. data/vendor/local/include/unicode/dtrule.h +250 -0
  193. data/vendor/local/include/unicode/enumset.h +64 -0
  194. data/vendor/local/include/unicode/errorcode.h +137 -0
  195. data/vendor/local/include/unicode/fieldpos.h +291 -0
  196. data/vendor/local/include/unicode/filteredbrk.h +131 -0
  197. data/vendor/local/include/unicode/fmtable.h +760 -0
  198. data/vendor/local/include/unicode/format.h +305 -0
  199. data/vendor/local/include/unicode/fpositer.h +117 -0
  200. data/vendor/local/include/unicode/gender.h +111 -0
  201. data/vendor/local/include/unicode/gregocal.h +777 -0
  202. data/vendor/local/include/unicode/icudataver.h +41 -0
  203. data/vendor/local/include/unicode/icuplug.h +371 -0
  204. data/vendor/local/include/unicode/idna.h +323 -0
  205. data/vendor/local/include/unicode/listformatter.h +167 -0
  206. data/vendor/local/include/unicode/localpointer.h +304 -0
  207. data/vendor/local/include/unicode/locdspnm.h +204 -0
  208. data/vendor/local/include/unicode/locid.h +815 -0
  209. data/vendor/local/include/unicode/measfmt.h +389 -0
  210. data/vendor/local/include/unicode/measunit.h +1443 -0
  211. data/vendor/local/include/unicode/measure.h +159 -0
  212. data/vendor/local/include/unicode/messagepattern.h +943 -0
  213. data/vendor/local/include/unicode/msgfmt.h +1093 -0
  214. data/vendor/local/include/unicode/normalizer2.h +658 -0
  215. data/vendor/local/include/unicode/normlzr.h +797 -0
  216. data/vendor/local/include/unicode/numfmt.h +1187 -0
  217. data/vendor/local/include/unicode/numsys.h +208 -0
  218. data/vendor/local/include/unicode/parseerr.h +92 -0
  219. data/vendor/local/include/unicode/parsepos.h +230 -0
  220. data/vendor/local/include/unicode/platform.h +751 -0
  221. data/vendor/local/include/unicode/plurfmt.h +615 -0
  222. data/vendor/local/include/unicode/plurrule.h +501 -0
  223. data/vendor/local/include/unicode/ptypes.h +126 -0
  224. data/vendor/local/include/unicode/putil.h +181 -0
  225. data/vendor/local/include/unicode/rbbi.h +782 -0
  226. data/vendor/local/include/unicode/rbnf.h +1032 -0
  227. data/vendor/local/include/unicode/rbtz.h +362 -0
  228. data/vendor/local/include/unicode/regex.h +1857 -0
  229. data/vendor/local/include/unicode/region.h +228 -0
  230. data/vendor/local/include/unicode/reldatefmt.h +498 -0
  231. data/vendor/local/include/unicode/rep.h +261 -0
  232. data/vendor/local/include/unicode/resbund.h +490 -0
  233. data/vendor/local/include/unicode/schriter.h +187 -0
  234. data/vendor/local/include/unicode/scientificformathelper.h +139 -0
  235. data/vendor/local/include/unicode/search.h +575 -0
  236. data/vendor/local/include/unicode/selfmt.h +367 -0
  237. data/vendor/local/include/unicode/simpletz.h +928 -0
  238. data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
  239. data/vendor/local/include/unicode/sortkey.h +338 -0
  240. data/vendor/local/include/unicode/std_string.h +37 -0
  241. data/vendor/local/include/unicode/strenum.h +276 -0
  242. data/vendor/local/include/unicode/stringpiece.h +224 -0
  243. data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
  244. data/vendor/local/include/unicode/stsearch.h +504 -0
  245. data/vendor/local/include/unicode/symtable.h +112 -0
  246. data/vendor/local/include/unicode/tblcoll.h +873 -0
  247. data/vendor/local/include/unicode/timezone.h +948 -0
  248. data/vendor/local/include/unicode/tmunit.h +129 -0
  249. data/vendor/local/include/unicode/tmutamt.h +168 -0
  250. data/vendor/local/include/unicode/tmutfmt.h +243 -0
  251. data/vendor/local/include/unicode/translit.h +1342 -0
  252. data/vendor/local/include/unicode/tzfmt.h +1098 -0
  253. data/vendor/local/include/unicode/tznames.h +404 -0
  254. data/vendor/local/include/unicode/tzrule.h +828 -0
  255. data/vendor/local/include/unicode/tztrans.h +195 -0
  256. data/vendor/local/include/unicode/ubidi.h +2186 -0
  257. data/vendor/local/include/unicode/ubrk.h +540 -0
  258. data/vendor/local/include/unicode/ucal.h +1560 -0
  259. data/vendor/local/include/unicode/ucasemap.h +423 -0
  260. data/vendor/local/include/unicode/ucat.h +158 -0
  261. data/vendor/local/include/unicode/uchar.h +3426 -0
  262. data/vendor/local/include/unicode/ucharstrie.h +576 -0
  263. data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
  264. data/vendor/local/include/unicode/uchriter.h +381 -0
  265. data/vendor/local/include/unicode/uclean.h +258 -0
  266. data/vendor/local/include/unicode/ucnv.h +2036 -0
  267. data/vendor/local/include/unicode/ucnv_cb.h +162 -0
  268. data/vendor/local/include/unicode/ucnv_err.h +463 -0
  269. data/vendor/local/include/unicode/ucnvsel.h +187 -0
  270. data/vendor/local/include/unicode/ucol.h +1474 -0
  271. data/vendor/local/include/unicode/ucoleitr.h +266 -0
  272. data/vendor/local/include/unicode/uconfig.h +430 -0
  273. data/vendor/local/include/unicode/ucsdet.h +413 -0
  274. data/vendor/local/include/unicode/ucurr.h +424 -0
  275. data/vendor/local/include/unicode/udat.h +1536 -0
  276. data/vendor/local/include/unicode/udata.h +430 -0
  277. data/vendor/local/include/unicode/udateintervalformat.h +181 -0
  278. data/vendor/local/include/unicode/udatpg.h +588 -0
  279. data/vendor/local/include/unicode/udisplaycontext.h +150 -0
  280. data/vendor/local/include/unicode/uenum.h +206 -0
  281. data/vendor/local/include/unicode/uformattable.h +280 -0
  282. data/vendor/local/include/unicode/ugender.h +82 -0
  283. data/vendor/local/include/unicode/uidna.h +762 -0
  284. data/vendor/local/include/unicode/uiter.h +707 -0
  285. data/vendor/local/include/unicode/uldnames.h +302 -0
  286. data/vendor/local/include/unicode/uloc.h +1256 -0
  287. data/vendor/local/include/unicode/ulocdata.h +277 -0
  288. data/vendor/local/include/unicode/umachine.h +356 -0
  289. data/vendor/local/include/unicode/umisc.h +60 -0
  290. data/vendor/local/include/unicode/umsg.h +623 -0
  291. data/vendor/local/include/unicode/unifilt.h +120 -0
  292. data/vendor/local/include/unicode/unifunct.h +125 -0
  293. data/vendor/local/include/unicode/unimatch.h +163 -0
  294. data/vendor/local/include/unicode/unirepl.h +97 -0
  295. data/vendor/local/include/unicode/uniset.h +1691 -0
  296. data/vendor/local/include/unicode/unistr.h +4470 -0
  297. data/vendor/local/include/unicode/unorm.h +561 -0
  298. data/vendor/local/include/unicode/unorm2.h +528 -0
  299. data/vendor/local/include/unicode/unum.h +1328 -0
  300. data/vendor/local/include/unicode/unumsys.h +170 -0
  301. data/vendor/local/include/unicode/uobject.h +320 -0
  302. data/vendor/local/include/unicode/upluralrules.h +145 -0
  303. data/vendor/local/include/unicode/uregex.h +1591 -0
  304. data/vendor/local/include/unicode/uregion.h +248 -0
  305. data/vendor/local/include/unicode/urename.h +1784 -0
  306. data/vendor/local/include/unicode/urep.h +155 -0
  307. data/vendor/local/include/unicode/ures.h +887 -0
  308. data/vendor/local/include/unicode/uscript.h +642 -0
  309. data/vendor/local/include/unicode/usearch.h +885 -0
  310. data/vendor/local/include/unicode/uset.h +1126 -0
  311. data/vendor/local/include/unicode/usetiter.h +318 -0
  312. data/vendor/local/include/unicode/ushape.h +474 -0
  313. data/vendor/local/include/unicode/uspoof.h +1064 -0
  314. data/vendor/local/include/unicode/usprep.h +269 -0
  315. data/vendor/local/include/unicode/ustdio.h +1018 -0
  316. data/vendor/local/include/unicode/ustream.h +68 -0
  317. data/vendor/local/include/unicode/ustring.h +1700 -0
  318. data/vendor/local/include/unicode/ustringtrie.h +95 -0
  319. data/vendor/local/include/unicode/utext.h +1600 -0
  320. data/vendor/local/include/unicode/utf.h +223 -0
  321. data/vendor/local/include/unicode/utf16.h +623 -0
  322. data/vendor/local/include/unicode/utf32.h +23 -0
  323. data/vendor/local/include/unicode/utf8.h +824 -0
  324. data/vendor/local/include/unicode/utf_old.h +1169 -0
  325. data/vendor/local/include/unicode/utmscale.h +481 -0
  326. data/vendor/local/include/unicode/utrace.h +359 -0
  327. data/vendor/local/include/unicode/utrans.h +658 -0
  328. data/vendor/local/include/unicode/utypes.h +723 -0
  329. data/vendor/local/include/unicode/uvernum.h +170 -0
  330. data/vendor/local/include/unicode/uversion.h +193 -0
  331. data/vendor/local/include/unicode/vtzone.h +455 -0
  332. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  333. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  334. data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
  335. data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
  336. data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
  337. data/vendor/local/lib/icu/Makefile.inc +293 -0
  338. data/vendor/local/lib/icu/pkgdata.inc +17 -0
  339. data/vendor/local/lib/icudt.dll +0 -0
  340. data/vendor/local/lib/icudt54.dll +0 -0
  341. data/vendor/local/lib/icuin.dll +0 -0
  342. data/vendor/local/lib/icuin54.dll +0 -0
  343. data/vendor/local/lib/icuio.dll +0 -0
  344. data/vendor/local/lib/icuio54.dll +0 -0
  345. data/vendor/local/lib/icule.dll +0 -0
  346. data/vendor/local/lib/icule54.dll +0 -0
  347. data/vendor/local/lib/iculx.dll +0 -0
  348. data/vendor/local/lib/iculx54.dll +0 -0
  349. data/vendor/local/lib/icutest.dll +0 -0
  350. data/vendor/local/lib/icutest54.dll +0 -0
  351. data/vendor/local/lib/icutu.dll +0 -0
  352. data/vendor/local/lib/icutu54.dll +0 -0
  353. data/vendor/local/lib/icuuc.dll +0 -0
  354. data/vendor/local/lib/icuuc54.dll +0 -0
  355. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  356. data/vendor/local/lib/libharfbuzz-icu.la +41 -0
  357. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  358. data/vendor/local/lib/libharfbuzz.la +41 -0
  359. data/vendor/local/lib/libicudt.dll.a +0 -0
  360. data/vendor/local/lib/libicuin.dll.a +0 -0
  361. data/vendor/local/lib/libicuio.dll.a +0 -0
  362. data/vendor/local/lib/libicule.dll.a +0 -0
  363. data/vendor/local/lib/libiculx.dll.a +0 -0
  364. data/vendor/local/lib/libicutest.dll.a +0 -0
  365. data/vendor/local/lib/libicutu.dll.a +0 -0
  366. data/vendor/local/lib/libicuuc.dll.a +0 -0
  367. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  368. data/vendor/local/lib/libpango-1.0.la +41 -0
  369. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  370. data/vendor/local/lib/libpangocairo-1.0.la +41 -0
  371. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  372. data/vendor/local/lib/libpangoft2-1.0.la +41 -0
  373. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  374. data/vendor/local/lib/libpangowin32-1.0.la +41 -0
  375. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  376. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  377. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +41 -0
  378. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  379. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  380. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +41 -0
  381. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  382. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  383. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +41 -0
  384. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  385. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  386. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +41 -0
  387. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
  388. data/vendor/local/lib/pkgconfig/harfbuzz.pc +11 -0
  389. data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
  390. data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
  391. data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
  392. data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
  393. data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
  394. data/vendor/local/lib/pkgconfig/pango.pc +14 -0
  395. data/vendor/local/lib/pkgconfig/pangocairo.pc +11 -0
  396. data/vendor/local/lib/pkgconfig/pangoft2.pc +12 -0
  397. data/vendor/local/lib/pkgconfig/pangowin32.pc +11 -0
  398. data/vendor/local/share/gir-1.0/Pango-1.0.gir +13329 -0
  399. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +833 -0
  400. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +354 -0
  401. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +75 -0
  402. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +1449 -0
  403. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +98 -0
  404. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +46 -0
  405. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +610 -0
  406. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1780 -0
  407. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +1337 -0
  408. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +144 -0
  409. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +99 -0
  410. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +630 -0
  411. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +2529 -0
  412. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +188 -0
  413. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +120 -0
  414. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +50 -0
  415. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +120 -0
  416. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +120 -0
  417. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +771 -0
  418. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +172 -0
  419. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +50 -0
  420. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +966 -0
  421. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +405 -0
  422. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +286 -0
  423. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1523 -0
  424. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +100 -0
  425. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +182 -0
  426. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +50 -0
  427. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +378 -0
  428. data/vendor/local/share/gtk-doc/html/harfbuzz/home.png +0 -0
  429. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +105 -0
  430. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +496 -0
  431. data/vendor/local/share/gtk-doc/html/harfbuzz/left-insensitive.png +0 -0
  432. data/vendor/local/share/gtk-doc/html/harfbuzz/left.png +0 -0
  433. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +59 -0
  434. data/vendor/local/share/gtk-doc/html/harfbuzz/right-insensitive.png +0 -0
  435. data/vendor/local/share/gtk-doc/html/harfbuzz/right.png +0 -0
  436. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +476 -0
  437. data/vendor/local/share/gtk-doc/html/harfbuzz/up-insensitive.png +0 -0
  438. data/vendor/local/share/gtk-doc/html/harfbuzz/up.png +0 -0
  439. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +224 -0
  440. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +255 -0
  441. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +246 -0
  442. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +500 -0
  443. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +1001 -0
  444. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +301 -0
  445. data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +1219 -0
  446. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +89 -0
  447. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +135 -0
  448. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +49 -0
  449. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +64 -0
  450. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +228 -0
  451. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +152 -0
  452. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +122 -0
  453. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +87 -0
  454. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +124 -0
  455. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +97 -0
  456. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +46 -0
  457. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +39 -0
  458. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +39 -0
  459. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +53 -0
  460. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +42 -0
  461. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +38 -0
  462. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +201 -0
  463. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +165 -0
  464. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +171 -0
  465. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +284 -0
  466. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +2968 -0
  467. data/vendor/local/share/gtk-doc/html/pango/home.png +0 -0
  468. data/vendor/local/share/gtk-doc/html/pango/index.html +146 -0
  469. data/vendor/local/share/gtk-doc/html/pango/index.sgml +957 -0
  470. data/vendor/local/share/gtk-doc/html/pango/layout.gif +0 -0
  471. data/vendor/local/share/gtk-doc/html/pango/left-insensitive.png +0 -0
  472. data/vendor/local/share/gtk-doc/html/pango/left.png +0 -0
  473. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +68 -0
  474. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +514 -0
  475. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +1632 -0
  476. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +115 -0
  477. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +508 -0
  478. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +358 -0
  479. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +4154 -0
  480. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +956 -0
  481. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +2627 -0
  482. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +4153 -0
  483. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +965 -0
  484. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +331 -0
  485. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +2202 -0
  486. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1430 -0
  487. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +582 -0
  488. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +3356 -0
  489. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +2079 -0
  490. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +325 -0
  491. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +523 -0
  492. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +1028 -0
  493. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +1275 -0
  494. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +91 -0
  495. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +131 -0
  496. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +786 -0
  497. data/vendor/local/share/gtk-doc/html/pango/pango.html +63 -0
  498. data/vendor/local/share/gtk-doc/html/pango/rendering.html +47 -0
  499. data/vendor/local/share/gtk-doc/html/pango/right-insensitive.png +0 -0
  500. data/vendor/local/share/gtk-doc/html/pango/right.png +0 -0
  501. data/vendor/local/share/gtk-doc/html/pango/rotated-text.png +0 -0
  502. data/vendor/local/share/gtk-doc/html/pango/style.css +476 -0
  503. data/vendor/local/share/gtk-doc/html/pango/tools.html +33 -0
  504. data/vendor/local/share/gtk-doc/html/pango/up-insensitive.png +0 -0
  505. data/vendor/local/share/gtk-doc/html/pango/up.png +0 -0
  506. data/vendor/local/share/icu/54.1/config/mh-mingw64 +158 -0
  507. data/vendor/local/share/icu/54.1/install-sh +251 -0
  508. data/vendor/local/share/icu/54.1/license.html +385 -0
  509. data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
  510. data/vendor/local/share/license/harfbuzz/AUTHORS +9 -0
  511. data/vendor/local/share/license/harfbuzz/COPYING +36 -0
  512. data/vendor/local/share/license/pango/AUTHORS +2 -0
  513. data/vendor/local/share/license/pango/COPYING +482 -0
  514. data/vendor/local/share/man/man1/derb.1 +196 -0
  515. data/vendor/local/share/man/man1/genbrk.1 +112 -0
  516. data/vendor/local/share/man/man1/gencfu.1 +91 -0
  517. data/vendor/local/share/man/man1/gencnval.1 +91 -0
  518. data/vendor/local/share/man/man1/gendict.1 +131 -0
  519. data/vendor/local/share/man/man1/genrb.1 +146 -0
  520. data/vendor/local/share/man/man1/icu-config.1 +288 -0
  521. data/vendor/local/share/man/man1/makeconv.1 +112 -0
  522. data/vendor/local/share/man/man1/pango-querymodules.1 +106 -0
  523. data/vendor/local/share/man/man1/pango-view.1 +1 -0
  524. data/vendor/local/share/man/man1/pkgdata.1 +258 -0
  525. data/vendor/local/share/man/man1/uconv.1 +443 -0
  526. data/vendor/local/share/man/man8/genccode.8 +106 -0
  527. data/vendor/local/share/man/man8/gencmn.8 +129 -0
  528. data/vendor/local/share/man/man8/gensprep.8 +102 -0
  529. data/vendor/local/share/man/man8/icupkg.8 +204 -0
  530. metadata +599 -0
@@ -0,0 +1,1093 @@
1
+ /*
2
+ * Copyright (C) 2007-2013, International Business Machines Corporation and
3
+ * others. All Rights Reserved.
4
+ ********************************************************************************
5
+ *
6
+ * File MSGFMT.H
7
+ *
8
+ * Modification History:
9
+ *
10
+ * Date Name Description
11
+ * 02/19/97 aliu Converted from java.
12
+ * 03/20/97 helena Finished first cut of implementation.
13
+ * 07/22/98 stephen Removed operator!= (defined in Format)
14
+ * 08/19/2002 srl Removing Javaisms
15
+ *******************************************************************************/
16
+
17
+ #ifndef MSGFMT_H
18
+ #define MSGFMT_H
19
+
20
+ #include "unicode/utypes.h"
21
+
22
+ /**
23
+ * \file
24
+ * \brief C++ API: Formats messages in a language-neutral way.
25
+ */
26
+
27
+ #if !UCONFIG_NO_FORMATTING
28
+
29
+ #include "unicode/format.h"
30
+ #include "unicode/locid.h"
31
+ #include "unicode/messagepattern.h"
32
+ #include "unicode/parseerr.h"
33
+ #include "unicode/plurfmt.h"
34
+ #include "unicode/plurrule.h"
35
+
36
+ U_CDECL_BEGIN
37
+ // Forward declaration.
38
+ struct UHashtable;
39
+ typedef struct UHashtable UHashtable; /**< @internal */
40
+ U_CDECL_END
41
+
42
+ U_NAMESPACE_BEGIN
43
+
44
+ class AppendableWrapper;
45
+ class DateFormat;
46
+ class NumberFormat;
47
+
48
+ /**
49
+ * <p>MessageFormat prepares strings for display to users,
50
+ * with optional arguments (variables/placeholders).
51
+ * The arguments can occur in any order, which is necessary for translation
52
+ * into languages with different grammars.
53
+ *
54
+ * <p>A MessageFormat is constructed from a <em>pattern</em> string
55
+ * with arguments in {curly braces} which will be replaced by formatted values.
56
+ *
57
+ * <p><code>MessageFormat</code> differs from the other <code>Format</code>
58
+ * classes in that you create a <code>MessageFormat</code> object with one
59
+ * of its constructors (not with a <code>createInstance</code> style factory
60
+ * method). Factory methods aren't necessary because <code>MessageFormat</code>
61
+ * itself doesn't implement locale-specific behavior. Any locale-specific
62
+ * behavior is defined by the pattern that you provide and the
63
+ * subformats used for inserted arguments.
64
+ *
65
+ * <p>Arguments can be named (using identifiers) or numbered (using small ASCII-digit integers).
66
+ * Some of the API methods work only with argument numbers and throw an exception
67
+ * if the pattern has named arguments (see {@link #usesNamedArguments()}).
68
+ *
69
+ * <p>An argument might not specify any format type. In this case,
70
+ * a Number value is formatted with a default (for the locale) NumberFormat,
71
+ * a Date value is formatted with a default (for the locale) DateFormat,
72
+ * and for any other value its toString() value is used.
73
+ *
74
+ * <p>An argument might specify a "simple" type for which the specified
75
+ * Format object is created, cached and used.
76
+ *
77
+ * <p>An argument might have a "complex" type with nested MessageFormat sub-patterns.
78
+ * During formatting, one of these sub-messages is selected according to the argument value
79
+ * and recursively formatted.
80
+ *
81
+ * <p>After construction, a custom Format object can be set for
82
+ * a top-level argument, overriding the default formatting and parsing behavior
83
+ * for that argument.
84
+ * However, custom formatting can be achieved more simply by writing
85
+ * a typeless argument in the pattern string
86
+ * and supplying it with a preformatted string value.
87
+ *
88
+ * <p>When formatting, MessageFormat takes a collection of argument values
89
+ * and writes an output string.
90
+ * The argument values may be passed as an array
91
+ * (when the pattern contains only numbered arguments)
92
+ * or as an array of names and and an array of arguments (which works for both named
93
+ * and numbered arguments).
94
+ *
95
+ * <p>Each argument is matched with one of the input values by array index or argument name
96
+ * and formatted according to its pattern specification
97
+ * (or using a custom Format object if one was set).
98
+ * A numbered pattern argument is matched with an argument name that contains that number
99
+ * as an ASCII-decimal-digit string (without leading zero).
100
+ *
101
+ * <h4><a name="patterns">Patterns and Their Interpretation</a></h4>
102
+ *
103
+ * <code>MessageFormat</code> uses patterns of the following form:
104
+ * <pre>
105
+ * message = messageText (argument messageText)*
106
+ * argument = noneArg | simpleArg | complexArg
107
+ * complexArg = choiceArg | pluralArg | selectArg | selectordinalArg
108
+ *
109
+ * noneArg = '{' argNameOrNumber '}'
110
+ * simpleArg = '{' argNameOrNumber ',' argType [',' argStyle] '}'
111
+ * choiceArg = '{' argNameOrNumber ',' "choice" ',' choiceStyle '}'
112
+ * pluralArg = '{' argNameOrNumber ',' "plural" ',' pluralStyle '}'
113
+ * selectArg = '{' argNameOrNumber ',' "select" ',' selectStyle '}'
114
+ * selectordinalArg = '{' argNameOrNumber ',' "selectordinal" ',' pluralStyle '}'
115
+ *
116
+ * choiceStyle: see {@link ChoiceFormat}
117
+ * pluralStyle: see {@link PluralFormat}
118
+ * selectStyle: see {@link SelectFormat}
119
+ *
120
+ * argNameOrNumber = argName | argNumber
121
+ * argName = [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+
122
+ * argNumber = '0' | ('1'..'9' ('0'..'9')*)
123
+ *
124
+ * argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duration"
125
+ * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText
126
+ * </pre>
127
+ *
128
+ * <ul>
129
+ * <li>messageText can contain quoted literal strings including syntax characters.
130
+ * A quoted literal string begins with an ASCII apostrophe and a syntax character
131
+ * (usually a {curly brace}) and continues until the next single apostrophe.
132
+ * A double ASCII apostrohpe inside or outside of a quoted string represents
133
+ * one literal apostrophe.
134
+ * <li>Quotable syntax characters are the {curly braces} in all messageText parts,
135
+ * plus the '#' sign in a messageText immediately inside a pluralStyle,
136
+ * and the '|' symbol in a messageText immediately inside a choiceStyle.
137
+ * <li>See also {@link #UMessagePatternApostropheMode}
138
+ * <li>In argStyleText, every single ASCII apostrophe begins and ends quoted literal text,
139
+ * and unquoted {curly braces} must occur in matched pairs.
140
+ * </ul>
141
+ *
142
+ * <p>Recommendation: Use the real apostrophe (single quote) character
143
+ * \htmlonly&#x2019;\endhtmlonly (U+2019) for
144
+ * human-readable text, and use the ASCII apostrophe ' (U+0027)
145
+ * only in program syntax, like quoting in MessageFormat.
146
+ * See the annotations for U+0027 Apostrophe in The Unicode Standard.
147
+ *
148
+ * <p>The <code>choice</code> argument type is deprecated.
149
+ * Use <code>plural</code> arguments for proper plural selection,
150
+ * and <code>select</code> arguments for simple selection among a fixed set of choices.
151
+ *
152
+ * <p>The <code>argType</code> and <code>argStyle</code> values are used to create
153
+ * a <code>Format</code> instance for the format element. The following
154
+ * table shows how the values map to Format instances. Combinations not
155
+ * shown in the table are illegal. Any <code>argStyleText</code> must
156
+ * be a valid pattern string for the Format subclass used.
157
+ *
158
+ * <p><table border=1>
159
+ * <tr>
160
+ * <th>argType
161
+ * <th>argStyle
162
+ * <th>resulting Format object
163
+ * <tr>
164
+ * <td colspan=2><i>(none)</i>
165
+ * <td><code>null</code>
166
+ * <tr>
167
+ * <td rowspan=5><code>number</code>
168
+ * <td><i>(none)</i>
169
+ * <td><code>NumberFormat.createInstance(getLocale(), status)</code>
170
+ * <tr>
171
+ * <td><code>integer</code>
172
+ * <td><code>NumberFormat.createInstance(getLocale(), kNumberStyle, status)</code>
173
+ * <tr>
174
+ * <td><code>currency</code>
175
+ * <td><code>NumberFormat.createCurrencyInstance(getLocale(), status)</code>
176
+ * <tr>
177
+ * <td><code>percent</code>
178
+ * <td><code>NumberFormat.createPercentInstance(getLocale(), status)</code>
179
+ * <tr>
180
+ * <td><i>argStyleText</i>
181
+ * <td><code>new DecimalFormat(argStyleText, new DecimalFormatSymbols(getLocale(), status), status)</code>
182
+ * <tr>
183
+ * <td rowspan=6><code>date</code>
184
+ * <td><i>(none)</i>
185
+ * <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code>
186
+ * <tr>
187
+ * <td><code>short</code>
188
+ * <td><code>DateFormat.createDateInstance(kShort, getLocale(), status)</code>
189
+ * <tr>
190
+ * <td><code>medium</code>
191
+ * <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code>
192
+ * <tr>
193
+ * <td><code>long</code>
194
+ * <td><code>DateFormat.createDateInstance(kLong, getLocale(), status)</code>
195
+ * <tr>
196
+ * <td><code>full</code>
197
+ * <td><code>DateFormat.createDateInstance(kFull, getLocale(), status)</code>
198
+ * <tr>
199
+ * <td><i>argStyleText</i>
200
+ * <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
201
+ * <tr>
202
+ * <td rowspan=6><code>time</code>
203
+ * <td><i>(none)</i>
204
+ * <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), status)</code>
205
+ * <tr>
206
+ * <td><code>short</code>
207
+ * <td><code>DateFormat.createTimeInstance(kShort, getLocale(), status)</code>
208
+ * <tr>
209
+ * <td><code>medium</code>
210
+ * <td><code>DateFormat.createTimeInstance(kDefault, getLocale(), status)</code>
211
+ * <tr>
212
+ * <td><code>long</code>
213
+ * <td><code>DateFormat.createTimeInstance(kLong, getLocale(), status)</code>
214
+ * <tr>
215
+ * <td><code>full</code>
216
+ * <td><code>DateFormat.createTimeInstance(kFull, getLocale(), status)</code>
217
+ * <tr>
218
+ * <td><i>argStyleText</i>
219
+ * <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
220
+ * <tr>
221
+ * <td><code>spellout</code>
222
+ * <td><i>argStyleText (optional)</i>
223
+ * <td><code>new RuleBasedNumberFormat(URBNF_SPELLOUT, getLocale(), status)
224
+ * <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText, status);</code>
225
+ * <tr>
226
+ * <td><code>ordinal</code>
227
+ * <td><i>argStyleText (optional)</i>
228
+ * <td><code>new RuleBasedNumberFormat(URBNF_ORDINAL, getLocale(), status)
229
+ * <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText, status);</code>
230
+ * <tr>
231
+ * <td><code>duration</code>
232
+ * <td><i>argStyleText (optional)</i>
233
+ * <td><code>new RuleBasedNumberFormat(URBNF_DURATION, getLocale(), status)
234
+ * <br/>&nbsp;&nbsp;&nbsp;&nbsp;.setDefaultRuleset(argStyleText, status);</code>
235
+ * </table>
236
+ * <p>
237
+ *
238
+ * <h4>Usage Information</h4>
239
+ *
240
+ * <p>Here are some examples of usage:
241
+ * Example 1:
242
+ *
243
+ * <pre>
244
+ * \code
245
+ * UErrorCode success = U_ZERO_ERROR;
246
+ * GregorianCalendar cal(success);
247
+ * Formattable arguments[] = {
248
+ * 7L,
249
+ * Formattable( (Date) cal.getTime(success), Formattable::kIsDate),
250
+ * "a disturbance in the Force"
251
+ * };
252
+ *
253
+ * UnicodeString result;
254
+ * MessageFormat::format(
255
+ * "At {1,time} on {1,date}, there was {2} on planet {0,number}.",
256
+ * arguments, 3, result, success );
257
+ *
258
+ * cout << "result: " << result << endl;
259
+ * //<output>: At 4:34:20 PM on 23-Mar-98, there was a disturbance
260
+ * // in the Force on planet 7.
261
+ * \endcode
262
+ * </pre>
263
+ *
264
+ * Typically, the message format will come from resources, and the
265
+ * arguments will be dynamically set at runtime.
266
+ *
267
+ * <p>Example 2:
268
+ *
269
+ * <pre>
270
+ * \code
271
+ * success = U_ZERO_ERROR;
272
+ * Formattable testArgs[] = {3L, "MyDisk"};
273
+ *
274
+ * MessageFormat form(
275
+ * "The disk \"{1}\" contains {0} file(s).", success );
276
+ *
277
+ * UnicodeString string;
278
+ * FieldPosition fpos = 0;
279
+ * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl;
280
+ *
281
+ * // output, with different testArgs:
282
+ * // output: The disk "MyDisk" contains 0 file(s).
283
+ * // output: The disk "MyDisk" contains 1 file(s).
284
+ * // output: The disk "MyDisk" contains 1,273 file(s).
285
+ * \endcode
286
+ * </pre>
287
+ *
288
+ *
289
+ * <p>For messages that include plural forms, you can use a plural argument:
290
+ * <pre>
291
+ * \code
292
+ * success = U_ZERO_ERROR;
293
+ * MessageFormat msgFmt(
294
+ * "{num_files, plural, "
295
+ * "=0{There are no files on disk \"{disk_name}\".}"
296
+ * "=1{There is one file on disk \"{disk_name}\".}"
297
+ * "other{There are # files on disk \"{disk_name}\".}}",
298
+ * Locale("en"),
299
+ * success);
300
+ * FieldPosition fpos = 0;
301
+ * Formattable testArgs[] = {0L, "MyDisk"};
302
+ * UnicodeString testArgsNames[] = {"num_files", "disk_name"};
303
+ * UnicodeString result;
304
+ * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
305
+ * testArgs[0] = 3L;
306
+ * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
307
+ * \endcode
308
+ * <em>output</em>:
309
+ * There are no files on disk "MyDisk".
310
+ * There are 3 files on "MyDisk".
311
+ * </pre>
312
+ * See {@link PluralFormat} and {@link PluralRules} for details.
313
+ *
314
+ * <h4><a name="synchronization">Synchronization</a></h4>
315
+ *
316
+ * <p>MessageFormats are not synchronized.
317
+ * It is recommended to create separate format instances for each thread.
318
+ * If multiple threads access a format concurrently, it must be synchronized
319
+ * externally.
320
+ *
321
+ * @stable ICU 2.0
322
+ */
323
+ class U_I18N_API MessageFormat : public Format {
324
+ public:
325
+ #ifndef U_HIDE_OBSOLETE_API
326
+ /**
327
+ * Enum type for kMaxFormat.
328
+ * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6,
329
+ * rendering this enum type obsolete.
330
+ */
331
+ enum EFormatNumber {
332
+ /**
333
+ * The maximum number of arguments.
334
+ * @obsolete ICU 3.0. The 10-argument limit was removed as of ICU 2.6,
335
+ * rendering this constant obsolete.
336
+ */
337
+ kMaxFormat = 10
338
+ };
339
+ #endif /* U_HIDE_OBSOLETE_API */
340
+
341
+ /**
342
+ * Constructs a new MessageFormat using the given pattern and the
343
+ * default locale.
344
+ *
345
+ * @param pattern Pattern used to construct object.
346
+ * @param status Input/output error code. If the
347
+ * pattern cannot be parsed, set to failure code.
348
+ * @stable ICU 2.0
349
+ */
350
+ MessageFormat(const UnicodeString& pattern,
351
+ UErrorCode &status);
352
+
353
+ /**
354
+ * Constructs a new MessageFormat using the given pattern and locale.
355
+ * @param pattern Pattern used to construct object.
356
+ * @param newLocale The locale to use for formatting dates and numbers.
357
+ * @param status Input/output error code. If the
358
+ * pattern cannot be parsed, set to failure code.
359
+ * @stable ICU 2.0
360
+ */
361
+ MessageFormat(const UnicodeString& pattern,
362
+ const Locale& newLocale,
363
+ UErrorCode& status);
364
+ /**
365
+ * Constructs a new MessageFormat using the given pattern and locale.
366
+ * @param pattern Pattern used to construct object.
367
+ * @param newLocale The locale to use for formatting dates and numbers.
368
+ * @param parseError Struct to receive information on the position
369
+ * of an error within the pattern.
370
+ * @param status Input/output error code. If the
371
+ * pattern cannot be parsed, set to failure code.
372
+ * @stable ICU 2.0
373
+ */
374
+ MessageFormat(const UnicodeString& pattern,
375
+ const Locale& newLocale,
376
+ UParseError& parseError,
377
+ UErrorCode& status);
378
+ /**
379
+ * Constructs a new MessageFormat from an existing one.
380
+ * @stable ICU 2.0
381
+ */
382
+ MessageFormat(const MessageFormat&);
383
+
384
+ /**
385
+ * Assignment operator.
386
+ * @stable ICU 2.0
387
+ */
388
+ const MessageFormat& operator=(const MessageFormat&);
389
+
390
+ /**
391
+ * Destructor.
392
+ * @stable ICU 2.0
393
+ */
394
+ virtual ~MessageFormat();
395
+
396
+ /**
397
+ * Clones this Format object polymorphically. The caller owns the
398
+ * result and should delete it when done.
399
+ * @stable ICU 2.0
400
+ */
401
+ virtual Format* clone(void) const;
402
+
403
+ /**
404
+ * Returns true if the given Format objects are semantically equal.
405
+ * Objects of different subclasses are considered unequal.
406
+ * @param other the object to be compared with.
407
+ * @return true if the given Format objects are semantically equal.
408
+ * @stable ICU 2.0
409
+ */
410
+ virtual UBool operator==(const Format& other) const;
411
+
412
+ /**
413
+ * Sets the locale to be used for creating argument Format objects.
414
+ * @param theLocale the new locale value to be set.
415
+ * @stable ICU 2.0
416
+ */
417
+ virtual void setLocale(const Locale& theLocale);
418
+
419
+ /**
420
+ * Gets the locale used for creating argument Format objects.
421
+ * format information.
422
+ * @return the locale of the object.
423
+ * @stable ICU 2.0
424
+ */
425
+ virtual const Locale& getLocale(void) const;
426
+
427
+ /**
428
+ * Applies the given pattern string to this message format.
429
+ *
430
+ * @param pattern The pattern to be applied.
431
+ * @param status Input/output error code. If the
432
+ * pattern cannot be parsed, set to failure code.
433
+ * @stable ICU 2.0
434
+ */
435
+ virtual void applyPattern(const UnicodeString& pattern,
436
+ UErrorCode& status);
437
+ /**
438
+ * Applies the given pattern string to this message format.
439
+ *
440
+ * @param pattern The pattern to be applied.
441
+ * @param parseError Struct to receive information on the position
442
+ * of an error within the pattern.
443
+ * @param status Input/output error code. If the
444
+ * pattern cannot be parsed, set to failure code.
445
+ * @stable ICU 2.0
446
+ */
447
+ virtual void applyPattern(const UnicodeString& pattern,
448
+ UParseError& parseError,
449
+ UErrorCode& status);
450
+
451
+ /**
452
+ * Sets the UMessagePatternApostropheMode and the pattern used by this message format.
453
+ * Parses the pattern and caches Format objects for simple argument types.
454
+ * Patterns and their interpretation are specified in the
455
+ * <a href="#patterns">class description</a>.
456
+ * <p>
457
+ * This method is best used only once on a given object to avoid confusion about the mode,
458
+ * and after constructing the object with an empty pattern string to minimize overhead.
459
+ *
460
+ * @param pattern The pattern to be applied.
461
+ * @param aposMode The new apostrophe mode.
462
+ * @param parseError Struct to receive information on the position
463
+ * of an error within the pattern.
464
+ * Can be NULL.
465
+ * @param status Input/output error code. If the
466
+ * pattern cannot be parsed, set to failure code.
467
+ * @stable ICU 4.8
468
+ */
469
+ virtual void applyPattern(const UnicodeString& pattern,
470
+ UMessagePatternApostropheMode aposMode,
471
+ UParseError* parseError,
472
+ UErrorCode& status);
473
+
474
+ /**
475
+ * @return this instance's UMessagePatternApostropheMode.
476
+ * @stable ICU 4.8
477
+ */
478
+ UMessagePatternApostropheMode getApostropheMode() const {
479
+ return msgPattern.getApostropheMode();
480
+ }
481
+
482
+ /**
483
+ * Returns a pattern that can be used to recreate this object.
484
+ *
485
+ * @param appendTo Output parameter to receive the pattern.
486
+ * Result is appended to existing contents.
487
+ * @return Reference to 'appendTo' parameter.
488
+ * @stable ICU 2.0
489
+ */
490
+ virtual UnicodeString& toPattern(UnicodeString& appendTo) const;
491
+
492
+ /**
493
+ * Sets subformats.
494
+ * See the class description about format numbering.
495
+ * The caller should not delete the Format objects after this call.
496
+ * <EM>The array formatsToAdopt is not itself adopted.</EM> Its
497
+ * ownership is retained by the caller. If the call fails because
498
+ * memory cannot be allocated, then the formats will be deleted
499
+ * by this method, and this object will remain unchanged.
500
+ *
501
+ * <p>If this format uses named arguments, the new formats are discarded
502
+ * and this format remains unchanged.
503
+ *
504
+ * @stable ICU 2.0
505
+ * @param formatsToAdopt the format to be adopted.
506
+ * @param count the size of the array.
507
+ */
508
+ virtual void adoptFormats(Format** formatsToAdopt, int32_t count);
509
+
510
+ /**
511
+ * Sets subformats.
512
+ * See the class description about format numbering.
513
+ * Each item in the array is cloned into the internal array.
514
+ * If the call fails because memory cannot be allocated, then this
515
+ * object will remain unchanged.
516
+ *
517
+ * <p>If this format uses named arguments, the new formats are discarded
518
+ * and this format remains unchanged.
519
+ *
520
+ * @stable ICU 2.0
521
+ * @param newFormats the new format to be set.
522
+ * @param cnt the size of the array.
523
+ */
524
+ virtual void setFormats(const Format** newFormats, int32_t cnt);
525
+
526
+
527
+ /**
528
+ * Sets one subformat.
529
+ * See the class description about format numbering.
530
+ * The caller should not delete the Format object after this call.
531
+ * If the number is over the number of formats already set,
532
+ * the item will be deleted and ignored.
533
+ *
534
+ * <p>If this format uses named arguments, the new format is discarded
535
+ * and this format remains unchanged.
536
+ *
537
+ * @stable ICU 2.0
538
+ * @param formatNumber index of the subformat.
539
+ * @param formatToAdopt the format to be adopted.
540
+ */
541
+ virtual void adoptFormat(int32_t formatNumber, Format* formatToAdopt);
542
+
543
+ /**
544
+ * Sets one subformat.
545
+ * See the class description about format numbering.
546
+ * If the number is over the number of formats already set,
547
+ * the item will be ignored.
548
+ * @param formatNumber index of the subformat.
549
+ * @param format the format to be set.
550
+ * @stable ICU 2.0
551
+ */
552
+ virtual void setFormat(int32_t formatNumber, const Format& format);
553
+
554
+ /**
555
+ * Gets format names. This function returns formatNames in StringEnumerations
556
+ * which can be used with getFormat() and setFormat() to export formattable
557
+ * array from current MessageFormat to another. It is the caller's responsibility
558
+ * to delete the returned formatNames.
559
+ * @param status output param set to success/failure code.
560
+ * @stable ICU 4.0
561
+ */
562
+ virtual StringEnumeration* getFormatNames(UErrorCode& status);
563
+
564
+ /**
565
+ * Gets subformat pointer for given format name.
566
+ * This function supports both named and numbered
567
+ * arguments. If numbered, the formatName is the
568
+ * corresponding UnicodeStrings (e.g. "0", "1", "2"...).
569
+ * The returned Format object should not be deleted by the caller,
570
+ * nor should the ponter of other object . The pointer and its
571
+ * contents remain valid only until the next call to any method
572
+ * of this class is made with this object.
573
+ * @param formatName the name or number specifying a format
574
+ * @param status output param set to success/failure code.
575
+ * @stable ICU 4.0
576
+ */
577
+ virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status);
578
+
579
+ /**
580
+ * Sets one subformat for given format name.
581
+ * See the class description about format name.
582
+ * This function supports both named and numbered
583
+ * arguments-- if numbered, the formatName is the
584
+ * corresponding UnicodeStrings (e.g. "0", "1", "2"...).
585
+ * If there is no matched formatName or wrong type,
586
+ * the item will be ignored.
587
+ * @param formatName Name of the subformat.
588
+ * @param format the format to be set.
589
+ * @param status output param set to success/failure code.
590
+ * @stable ICU 4.0
591
+ */
592
+ virtual void setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status);
593
+
594
+ /**
595
+ * Sets one subformat for given format name.
596
+ * See the class description about format name.
597
+ * This function supports both named and numbered
598
+ * arguments-- if numbered, the formatName is the
599
+ * corresponding UnicodeStrings (e.g. "0", "1", "2"...).
600
+ * If there is no matched formatName or wrong type,
601
+ * the item will be ignored.
602
+ * The caller should not delete the Format object after this call.
603
+ * @param formatName Name of the subformat.
604
+ * @param formatToAdopt Format to be adopted.
605
+ * @param status output param set to success/failure code.
606
+ * @stable ICU 4.0
607
+ */
608
+ virtual void adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status);
609
+
610
+ /**
611
+ * Gets an array of subformats of this object. The returned array
612
+ * should not be deleted by the caller, nor should the pointers
613
+ * within the array. The array and its contents remain valid only
614
+ * until the next call to this format. See the class description
615
+ * about format numbering.
616
+ *
617
+ * @param count output parameter to receive the size of the array
618
+ * @return an array of count Format* objects, or NULL if out of
619
+ * memory. Any or all of the array elements may be NULL.
620
+ * @stable ICU 2.0
621
+ */
622
+ virtual const Format** getFormats(int32_t& count) const;
623
+
624
+
625
+ using Format::format;
626
+
627
+ /**
628
+ * Formats the given array of arguments into a user-readable string.
629
+ * Does not take ownership of the Formattable* array or its contents.
630
+ *
631
+ * <p>If this format uses named arguments, appendTo is unchanged and
632
+ * status is set to U_ILLEGAL_ARGUMENT_ERROR.
633
+ *
634
+ * @param source An array of objects to be formatted.
635
+ * @param count The number of elements of 'source'.
636
+ * @param appendTo Output parameter to receive result.
637
+ * Result is appended to existing contents.
638
+ * @param ignore Not used; inherited from base class API.
639
+ * @param status Input/output error code. If the
640
+ * pattern cannot be parsed, set to failure code.
641
+ * @return Reference to 'appendTo' parameter.
642
+ * @stable ICU 2.0
643
+ */
644
+ UnicodeString& format(const Formattable* source,
645
+ int32_t count,
646
+ UnicodeString& appendTo,
647
+ FieldPosition& ignore,
648
+ UErrorCode& status) const;
649
+
650
+ /**
651
+ * Formats the given array of arguments into a user-readable string
652
+ * using the given pattern.
653
+ *
654
+ * <p>If this format uses named arguments, appendTo is unchanged and
655
+ * status is set to U_ILLEGAL_ARGUMENT_ERROR.
656
+ *
657
+ * @param pattern The pattern.
658
+ * @param arguments An array of objects to be formatted.
659
+ * @param count The number of elements of 'source'.
660
+ * @param appendTo Output parameter to receive result.
661
+ * Result is appended to existing contents.
662
+ * @param status Input/output error code. If the
663
+ * pattern cannot be parsed, set to failure code.
664
+ * @return Reference to 'appendTo' parameter.
665
+ * @stable ICU 2.0
666
+ */
667
+ static UnicodeString& format(const UnicodeString& pattern,
668
+ const Formattable* arguments,
669
+ int32_t count,
670
+ UnicodeString& appendTo,
671
+ UErrorCode& status);
672
+
673
+ /**
674
+ * Formats the given array of arguments into a user-readable
675
+ * string. The array must be stored within a single Formattable
676
+ * object of type kArray. If the Formattable object type is not of
677
+ * type kArray, then returns a failing UErrorCode.
678
+ *
679
+ * <p>If this format uses named arguments, appendTo is unchanged and
680
+ * status is set to U_ILLEGAL_ARGUMENT_ERROR.
681
+ *
682
+ * @param obj A Formattable of type kArray containing
683
+ * arguments to be formatted.
684
+ * @param appendTo Output parameter to receive result.
685
+ * Result is appended to existing contents.
686
+ * @param pos On input: an alignment field, if desired.
687
+ * On output: the offsets of the alignment field.
688
+ * @param status Input/output error code. If the
689
+ * pattern cannot be parsed, set to failure code.
690
+ * @return Reference to 'appendTo' parameter.
691
+ * @stable ICU 2.0
692
+ */
693
+ virtual UnicodeString& format(const Formattable& obj,
694
+ UnicodeString& appendTo,
695
+ FieldPosition& pos,
696
+ UErrorCode& status) const;
697
+
698
+ /**
699
+ * Formats the given array of arguments into a user-defined argument name
700
+ * array. This function supports both named and numbered
701
+ * arguments-- if numbered, the formatName is the
702
+ * corresponding UnicodeStrings (e.g. "0", "1", "2"...).
703
+ *
704
+ * @param argumentNames argument name array
705
+ * @param arguments An array of objects to be formatted.
706
+ * @param count The number of elements of 'argumentNames' and
707
+ * arguments. The number of argumentNames and arguments
708
+ * must be the same.
709
+ * @param appendTo Output parameter to receive result.
710
+ * Result is appended to existing contents.
711
+ * @param status Input/output error code. If the
712
+ * pattern cannot be parsed, set to failure code.
713
+ * @return Reference to 'appendTo' parameter.
714
+ * @stable ICU 4.0
715
+ */
716
+ UnicodeString& format(const UnicodeString* argumentNames,
717
+ const Formattable* arguments,
718
+ int32_t count,
719
+ UnicodeString& appendTo,
720
+ UErrorCode& status) const;
721
+ /**
722
+ * Parses the given string into an array of output arguments.
723
+ *
724
+ * @param source String to be parsed.
725
+ * @param pos On input, starting position for parse. On output,
726
+ * final position after parse. Unchanged if parse
727
+ * fails.
728
+ * @param count Output parameter to receive the number of arguments
729
+ * parsed.
730
+ * @return an array of parsed arguments. The caller owns both
731
+ * the array and its contents.
732
+ * @stable ICU 2.0
733
+ */
734
+ virtual Formattable* parse(const UnicodeString& source,
735
+ ParsePosition& pos,
736
+ int32_t& count) const;
737
+
738
+ /**
739
+ * Parses the given string into an array of output arguments.
740
+ *
741
+ * <p>If this format uses named arguments, status is set to
742
+ * U_ARGUMENT_TYPE_MISMATCH.
743
+ *
744
+ * @param source String to be parsed.
745
+ * @param count Output param to receive size of returned array.
746
+ * @param status Input/output error code. If the
747
+ * pattern cannot be parsed, set to failure code.
748
+ * @return an array of parsed arguments. The caller owns both
749
+ * the array and its contents. Returns NULL if status is not U_ZERO_ERROR.
750
+ *
751
+ * @stable ICU 2.0
752
+ */
753
+ virtual Formattable* parse(const UnicodeString& source,
754
+ int32_t& count,
755
+ UErrorCode& status) const;
756
+
757
+ /**
758
+ * Parses the given string into an array of output arguments
759
+ * stored within a single Formattable of type kArray.
760
+ *
761
+ * @param source The string to be parsed into an object.
762
+ * @param result Formattable to be set to the parse result.
763
+ * If parse fails, return contents are undefined.
764
+ * @param pos On input, starting position for parse. On output,
765
+ * final position after parse. Unchanged if parse
766
+ * fails.
767
+ * @stable ICU 2.0
768
+ */
769
+ virtual void parseObject(const UnicodeString& source,
770
+ Formattable& result,
771
+ ParsePosition& pos) const;
772
+
773
+ /**
774
+ * Convert an 'apostrophe-friendly' pattern into a standard
775
+ * pattern. Standard patterns treat all apostrophes as
776
+ * quotes, which is problematic in some languages, e.g.
777
+ * French, where apostrophe is commonly used. This utility
778
+ * assumes that only an unpaired apostrophe immediately before
779
+ * a brace is a true quote. Other unpaired apostrophes are paired,
780
+ * and the resulting standard pattern string is returned.
781
+ *
782
+ * <p><b>Note</b> it is not guaranteed that the returned pattern
783
+ * is indeed a valid pattern. The only effect is to convert
784
+ * between patterns having different quoting semantics.
785
+ *
786
+ * @param pattern the 'apostrophe-friendly' patttern to convert
787
+ * @param status Input/output error code. If the pattern
788
+ * cannot be parsed, the failure code is set.
789
+ * @return the standard equivalent of the original pattern
790
+ * @stable ICU 3.4
791
+ */
792
+ static UnicodeString autoQuoteApostrophe(const UnicodeString& pattern,
793
+ UErrorCode& status);
794
+
795
+
796
+ /**
797
+ * Returns true if this MessageFormat uses named arguments,
798
+ * and false otherwise. See class description.
799
+ *
800
+ * @return true if named arguments are used.
801
+ * @stable ICU 4.0
802
+ */
803
+ UBool usesNamedArguments() const;
804
+
805
+
806
+ #ifndef U_HIDE_INTERNAL_API
807
+ /**
808
+ * This API is for ICU internal use only.
809
+ * Please do not use it.
810
+ *
811
+ * Returns argument types count in the parsed pattern.
812
+ * Used to distinguish pattern "{0} d" and "d".
813
+ *
814
+ * @return The number of formattable types in the pattern
815
+ * @internal
816
+ */
817
+ int32_t getArgTypeCount() const;
818
+ #endif /* U_HIDE_INTERNAL_API */
819
+
820
+ /**
821
+ * Returns a unique class ID POLYMORPHICALLY. Pure virtual override.
822
+ * This method is to implement a simple version of RTTI, since not all
823
+ * C++ compilers support genuine RTTI. Polymorphic operator==() and
824
+ * clone() methods call this method.
825
+ *
826
+ * @return The class ID for this object. All objects of a
827
+ * given class have the same class ID. Objects of
828
+ * other classes have different class IDs.
829
+ * @stable ICU 2.0
830
+ */
831
+ virtual UClassID getDynamicClassID(void) const;
832
+
833
+ /**
834
+ * Return the class ID for this class. This is useful only for
835
+ * comparing to a return value from getDynamicClassID(). For example:
836
+ * <pre>
837
+ * . Base* polymorphic_pointer = createPolymorphicObject();
838
+ * . if (polymorphic_pointer->getDynamicClassID() ==
839
+ * . Derived::getStaticClassID()) ...
840
+ * </pre>
841
+ * @return The class ID for all objects of this class.
842
+ * @stable ICU 2.0
843
+ */
844
+ static UClassID U_EXPORT2 getStaticClassID(void);
845
+
846
+ #ifndef U_HIDE_INTERNAL_API
847
+ /**
848
+ * Compares two Format objects. This is used for constructing the hash
849
+ * tables.
850
+ *
851
+ * @param left pointer to a Format object. Must not be NULL.
852
+ * @param right pointer to a Format object. Must not be NULL.
853
+ *
854
+ * @return whether the two objects are the same
855
+ * @internal
856
+ */
857
+ static UBool equalFormats(const void* left, const void* right);
858
+ #endif /* U_HIDE_INTERNAL_API */
859
+
860
+ private:
861
+
862
+ Locale fLocale;
863
+ MessagePattern msgPattern;
864
+ Format** formatAliases; // see getFormats
865
+ int32_t formatAliasesCapacity;
866
+
867
+ MessageFormat(); // default constructor not implemented
868
+
869
+ /**
870
+ * This provider helps defer instantiation of a PluralRules object
871
+ * until we actually need to select a keyword.
872
+ * For example, if the number matches an explicit-value selector like "=1"
873
+ * we do not need any PluralRules.
874
+ */
875
+ class U_I18N_API PluralSelectorProvider : public PluralFormat::PluralSelector {
876
+ public:
877
+ PluralSelectorProvider(const MessageFormat &mf, UPluralType type);
878
+ virtual ~PluralSelectorProvider();
879
+ virtual UnicodeString select(void *ctx, double number, UErrorCode& ec) const;
880
+
881
+ void reset();
882
+ private:
883
+ const MessageFormat &msgFormat;
884
+ PluralRules* rules;
885
+ UPluralType type;
886
+ };
887
+
888
+ /**
889
+ * A MessageFormat formats an array of arguments. Each argument
890
+ * has an expected type, based on the pattern. For example, if
891
+ * the pattern contains the subformat "{3,number,integer}", then
892
+ * we expect argument 3 to have type Formattable::kLong. This
893
+ * array needs to grow dynamically if the MessageFormat is
894
+ * modified.
895
+ */
896
+ Formattable::Type* argTypes;
897
+ int32_t argTypeCount;
898
+ int32_t argTypeCapacity;
899
+
900
+ /**
901
+ * TRUE if there are different argTypes for the same argument.
902
+ * This only matters when the MessageFormat is used in the plain C (umsg_xxx) API
903
+ * where the pattern argTypes determine how the va_arg list is read.
904
+ */
905
+ UBool hasArgTypeConflicts;
906
+
907
+ // Variable-size array management
908
+ UBool allocateArgTypes(int32_t capacity, UErrorCode& status);
909
+
910
+ /**
911
+ * Default Format objects used when no format is specified and a
912
+ * numeric or date argument is formatted. These are volatile
913
+ * cache objects maintained only for performance. They do not
914
+ * participate in operator=(), copy constructor(), nor
915
+ * operator==().
916
+ */
917
+ NumberFormat* defaultNumberFormat;
918
+ DateFormat* defaultDateFormat;
919
+
920
+ UHashtable* cachedFormatters;
921
+ UHashtable* customFormatArgStarts;
922
+
923
+ PluralSelectorProvider pluralProvider;
924
+ PluralSelectorProvider ordinalProvider;
925
+
926
+ /**
927
+ * Method to retrieve default formats (or NULL on failure).
928
+ * These are semantically const, but may modify *this.
929
+ */
930
+ const NumberFormat* getDefaultNumberFormat(UErrorCode&) const;
931
+ const DateFormat* getDefaultDateFormat(UErrorCode&) const;
932
+
933
+ /**
934
+ * Finds the word s, in the keyword list and returns the located index.
935
+ * @param s the keyword to be searched for.
936
+ * @param list the list of keywords to be searched with.
937
+ * @return the index of the list which matches the keyword s.
938
+ */
939
+ static int32_t findKeyword( const UnicodeString& s,
940
+ const UChar * const *list);
941
+
942
+ /**
943
+ * Thin wrapper around the format(... AppendableWrapper ...) variant.
944
+ * Wraps the destination UnicodeString into an AppendableWrapper and
945
+ * supplies default values for some other parameters.
946
+ */
947
+ UnicodeString& format(const Formattable* arguments,
948
+ const UnicodeString *argumentNames,
949
+ int32_t cnt,
950
+ UnicodeString& appendTo,
951
+ FieldPosition* pos,
952
+ UErrorCode& status) const;
953
+
954
+ /**
955
+ * Formats the arguments and writes the result into the
956
+ * AppendableWrapper, updates the field position.
957
+ *
958
+ * @param msgStart Index to msgPattern part to start formatting from.
959
+ * @param plNumber NULL except when formatting a plural argument sub-message
960
+ * where a '#' is replaced by the format string for this number.
961
+ * @param arguments The formattable objects array. (Must not be NULL.)
962
+ * @param argumentNames NULL if numbered values are used. Otherwise the same
963
+ * length as "arguments", and each entry is the name of the
964
+ * corresponding argument in "arguments".
965
+ * @param cnt The length of arguments (and of argumentNames if that is not NULL).
966
+ * @param appendTo Output parameter to receive the result.
967
+ * The result string is appended to existing contents.
968
+ * @param pos Field position status.
969
+ * @param success The error code status.
970
+ */
971
+ void format(int32_t msgStart,
972
+ const void *plNumber,
973
+ const Formattable* arguments,
974
+ const UnicodeString *argumentNames,
975
+ int32_t cnt,
976
+ AppendableWrapper& appendTo,
977
+ FieldPosition* pos,
978
+ UErrorCode& success) const;
979
+
980
+ UnicodeString getArgName(int32_t partIndex);
981
+
982
+ void setArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
983
+
984
+ void setCustomArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
985
+
986
+ int32_t nextTopLevelArgStart(int32_t partIndex) const;
987
+
988
+ UBool argNameMatches(int32_t partIndex, const UnicodeString& argName, int32_t argNumber);
989
+
990
+ void cacheExplicitFormats(UErrorCode& status);
991
+
992
+ Format* createAppropriateFormat(UnicodeString& type,
993
+ UnicodeString& style,
994
+ Formattable::Type& formattableType,
995
+ UParseError& parseError,
996
+ UErrorCode& ec);
997
+
998
+ const Formattable* getArgFromListByName(const Formattable* arguments,
999
+ const UnicodeString *argumentNames,
1000
+ int32_t cnt, UnicodeString& name) const;
1001
+
1002
+ Formattable* parse(int32_t msgStart,
1003
+ const UnicodeString& source,
1004
+ ParsePosition& pos,
1005
+ int32_t& count,
1006
+ UErrorCode& ec) const;
1007
+
1008
+ FieldPosition* updateMetaData(AppendableWrapper& dest, int32_t prevLength,
1009
+ FieldPosition* fp, const Formattable* argId) const;
1010
+
1011
+ /**
1012
+ * Finds the "other" sub-message.
1013
+ * @param partIndex the index of the first PluralFormat argument style part.
1014
+ * @return the "other" sub-message start part index.
1015
+ */
1016
+ int32_t findOtherSubMessage(int32_t partIndex) const;
1017
+
1018
+ /**
1019
+ * Returns the ARG_START index of the first occurrence of the plural number in a sub-message.
1020
+ * Returns -1 if it is a REPLACE_NUMBER.
1021
+ * Returns 0 if there is neither.
1022
+ */
1023
+ int32_t findFirstPluralNumberArg(int32_t msgStart, const UnicodeString &argName) const;
1024
+
1025
+ Format* getCachedFormatter(int32_t argumentNumber) const;
1026
+
1027
+ UnicodeString getLiteralStringUntilNextArgument(int32_t from) const;
1028
+
1029
+ void copyObjects(const MessageFormat& that, UErrorCode& ec);
1030
+
1031
+ void formatComplexSubMessage(int32_t msgStart,
1032
+ const void *plNumber,
1033
+ const Formattable* arguments,
1034
+ const UnicodeString *argumentNames,
1035
+ int32_t cnt,
1036
+ AppendableWrapper& appendTo,
1037
+ UErrorCode& success) const;
1038
+
1039
+ /**
1040
+ * Convenience method that ought to be in NumberFormat
1041
+ */
1042
+ NumberFormat* createIntegerFormat(const Locale& locale, UErrorCode& status) const;
1043
+
1044
+ /**
1045
+ * Returns array of argument types in the parsed pattern
1046
+ * for use in C API. Only for the use of umsg_vformat(). Not
1047
+ * for public consumption.
1048
+ * @param listCount Output parameter to receive the size of array
1049
+ * @return The array of formattable types in the pattern
1050
+ */
1051
+ const Formattable::Type* getArgTypeList(int32_t& listCount) const {
1052
+ listCount = argTypeCount;
1053
+ return argTypes;
1054
+ }
1055
+
1056
+ /**
1057
+ * Resets the internal MessagePattern, and other associated caches.
1058
+ */
1059
+ void resetPattern();
1060
+
1061
+ /**
1062
+ * A DummyFormatter that we use solely to store a NULL value. UHash does
1063
+ * not support storing NULL values.
1064
+ */
1065
+ class U_I18N_API DummyFormat : public Format {
1066
+ public:
1067
+ virtual UBool operator==(const Format&) const;
1068
+ virtual Format* clone() const;
1069
+ virtual UnicodeString& format(const Formattable& obj,
1070
+ UnicodeString& appendTo,
1071
+ UErrorCode& status) const;
1072
+ virtual UnicodeString& format(const Formattable&,
1073
+ UnicodeString& appendTo,
1074
+ FieldPosition&,
1075
+ UErrorCode& status) const;
1076
+ virtual UnicodeString& format(const Formattable& obj,
1077
+ UnicodeString& appendTo,
1078
+ FieldPositionIterator* posIter,
1079
+ UErrorCode& status) const;
1080
+ virtual void parseObject(const UnicodeString&,
1081
+ Formattable&,
1082
+ ParsePosition&) const;
1083
+ };
1084
+
1085
+ friend class MessageFormatAdapter; // getFormatTypeList() access
1086
+ };
1087
+
1088
+ U_NAMESPACE_END
1089
+
1090
+ #endif /* #if !UCONFIG_NO_FORMATTING */
1091
+
1092
+ #endif // _MSGFMT
1093
+ //eof