choicfmt.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. /*
  2. ********************************************************************************
  3. * Copyright (C) 1997-2013, International Business Machines
  4. * Corporation and others. All Rights Reserved.
  5. ********************************************************************************
  6. *
  7. * File CHOICFMT.H
  8. *
  9. * Modification History:
  10. *
  11. * Date Name Description
  12. * 02/19/97 aliu Converted from java.
  13. * 03/20/97 helena Finished first cut of implementation and got rid
  14. * of nextDouble/previousDouble and replaced with
  15. * boolean array.
  16. * 4/10/97 aliu Clean up. Modified to work on AIX.
  17. * 8/6/97 nos Removed overloaded constructor, member var 'buffer'.
  18. * 07/22/98 stephen Removed operator!= (implemented in Format)
  19. ********************************************************************************
  20. */
  21. #ifndef CHOICFMT_H
  22. #define CHOICFMT_H
  23. #include "unicode/utypes.h"
  24. /**
  25. * \file
  26. * \brief C++ API: Choice Format.
  27. */
  28. #if !UCONFIG_NO_FORMATTING
  29. #ifndef U_HIDE_DEPRECATED_API
  30. #include "unicode/fieldpos.h"
  31. #include "unicode/format.h"
  32. #include "unicode/messagepattern.h"
  33. #include "unicode/numfmt.h"
  34. #include "unicode/unistr.h"
  35. U_NAMESPACE_BEGIN
  36. class MessageFormat;
  37. /**
  38. * ChoiceFormat converts between ranges of numeric values and strings for those ranges.
  39. * The strings must conform to the MessageFormat pattern syntax.
  40. *
  41. * <p><em><code>ChoiceFormat</code> is probably not what you need.
  42. * Please use <code>MessageFormat</code>
  43. * with <code>plural</code> arguments for proper plural selection,
  44. * and <code>select</code> arguments for simple selection among a fixed set of choices!</em></p>
  45. *
  46. * <p>A <code>ChoiceFormat</code> splits
  47. * the real number line \htmlonly<code>-&#x221E;</code> to
  48. * <code>+&#x221E;</code>\endhtmlonly into two
  49. * or more contiguous ranges. Each range is mapped to a
  50. * string.</p>
  51. *
  52. * <p><code>ChoiceFormat</code> was originally intended
  53. * for displaying grammatically correct
  54. * plurals such as &quot;There is one file.&quot; vs. &quot;There are 2 files.&quot;
  55. * <em>However,</em> plural rules for many languages
  56. * are too complex for the capabilities of ChoiceFormat,
  57. * and its requirement of specifying the precise rules for each message
  58. * is unmanageable for translators.</p>
  59. *
  60. * <p>There are two methods of defining a <code>ChoiceFormat</code>; both
  61. * are equivalent. The first is by using a string pattern. This is the
  62. * preferred method in most cases. The second method is through direct
  63. * specification of the arrays that logically make up the
  64. * <code>ChoiceFormat</code>.</p>
  65. *
  66. * <p>Note: Typically, choice formatting is done (if done at all) via <code>MessageFormat</code>
  67. * with a <code>choice</code> argument type,
  68. * rather than using a stand-alone <code>ChoiceFormat</code>.</p>
  69. *
  70. * <h5>Patterns and Their Interpretation</h5>
  71. *
  72. * <p>The pattern string defines the range boundaries and the strings for each number range.
  73. * Syntax:
  74. * <pre>
  75. * choiceStyle = number separator message ('|' number separator message)*
  76. * number = normal_number | ['-'] \htmlonly&#x221E;\endhtmlonly (U+221E, infinity)
  77. * normal_number = double value (unlocalized ASCII string)
  78. * separator = less_than | less_than_or_equal
  79. * less_than = '<'
  80. * less_than_or_equal = '#' | \htmlonly&#x2264;\endhtmlonly (U+2264)
  81. * message: see {@link MessageFormat}
  82. * </pre>
  83. * Pattern_White_Space between syntax elements is ignored, except
  84. * around each range's sub-message.</p>
  85. *
  86. * <p>Each numeric sub-range extends from the current range's number
  87. * to the next range's number.
  88. * The number itself is included in its range if a <code>less_than_or_equal</code> sign is used,
  89. * and excluded from its range (and instead included in the previous range)
  90. * if a <code>less_than</code> sign is used.</p>
  91. *
  92. * <p>When a <code>ChoiceFormat</code> is constructed from
  93. * arrays of numbers, closure flags and strings,
  94. * they are interpreted just like
  95. * the sequence of <code>(number separator string)</code> in an equivalent pattern string.
  96. * <code>closure[i]==TRUE</code> corresponds to a <code>less_than</code> separator sign.
  97. * The equivalent pattern string will be constructed automatically.</p>
  98. *
  99. * <p>During formatting, a number is mapped to the first range
  100. * where the number is not greater than the range's upper limit.
  101. * That range's message string is returned. A NaN maps to the very first range.</p>
  102. *
  103. * <p>During parsing, a range is selected for the longest match of
  104. * any range's message. That range's number is returned, ignoring the separator/closure.
  105. * Only a simple string match is performed, without parsing of arguments that
  106. * might be specified in the message strings.</p>
  107. *
  108. * <p>Note that the first range's number is ignored in formatting
  109. * but may be returned from parsing.</p>
  110. *
  111. * <h5>Examples</h5>
  112. *
  113. * <p>Here is an example of two arrays that map the number
  114. * <code>1..7</code> to the English day of the week abbreviations
  115. * <code>Sun..Sat</code>. No closures array is given; this is the same as
  116. * specifying all closures to be <code>FALSE</code>.</p>
  117. *
  118. * <pre> {1,2,3,4,5,6,7},
  119. * {&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thur&quot;,&quot;Fri&quot;,&quot;Sat&quot;}</pre>
  120. *
  121. * <p>Here is an example that maps the ranges [-Inf, 1), [1, 1], and (1,
  122. * +Inf] to three strings. That is, the number line is split into three
  123. * ranges: x &lt; 1.0, x = 1.0, and x &gt; 1.0.
  124. * (The round parentheses in the notation above indicate an exclusive boundary,
  125. * like the turned bracket in European notation: [-Inf, 1) == [-Inf, 1[ )</p>
  126. *
  127. * <pre> {0, 1, 1},
  128. * {FALSE, FALSE, TRUE},
  129. * {&quot;no files&quot;, &quot;one file&quot;, &quot;many files&quot;}</pre>
  130. *
  131. * <p>Here is an example that shows formatting and parsing: </p>
  132. *
  133. * \code
  134. * #include <unicode/choicfmt.h>
  135. * #include <unicode/unistr.h>
  136. * #include <iostream.h>
  137. *
  138. * int main(int argc, char *argv[]) {
  139. * double limits[] = {1,2,3,4,5,6,7};
  140. * UnicodeString monthNames[] = {
  141. * "Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
  142. * ChoiceFormat fmt(limits, monthNames, 7);
  143. * UnicodeString str;
  144. * char buf[256];
  145. * for (double x = 1.0; x <= 8.0; x += 1.0) {
  146. * fmt.format(x, str);
  147. * str.extract(0, str.length(), buf, 256, "");
  148. * str.truncate(0);
  149. * cout << x << " -> "
  150. * << buf << endl;
  151. * }
  152. * cout << endl;
  153. * return 0;
  154. * }
  155. * \endcode
  156. *
  157. * <p><em>User subclasses are not supported.</em> While clients may write
  158. * subclasses, such code will not necessarily work and will not be
  159. * guaranteed to work stably from release to release.
  160. *
  161. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  162. */
  163. class U_I18N_API ChoiceFormat: public NumberFormat {
  164. public:
  165. /**
  166. * Constructs a new ChoiceFormat from the pattern string.
  167. *
  168. * @param pattern Pattern used to construct object.
  169. * @param status Output param to receive success code. If the
  170. * pattern cannot be parsed, set to failure code.
  171. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  172. */
  173. ChoiceFormat(const UnicodeString& pattern,
  174. UErrorCode& status);
  175. /**
  176. * Constructs a new ChoiceFormat with the given limits and message strings.
  177. * All closure flags default to <code>FALSE</code>,
  178. * equivalent to <code>less_than_or_equal</code> separators.
  179. *
  180. * Copies the limits and formats instead of adopting them.
  181. *
  182. * @param limits Array of limit values.
  183. * @param formats Array of formats.
  184. * @param count Size of 'limits' and 'formats' arrays.
  185. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  186. */
  187. ChoiceFormat(const double* limits,
  188. const UnicodeString* formats,
  189. int32_t count );
  190. /**
  191. * Constructs a new ChoiceFormat with the given limits, closure flags and message strings.
  192. *
  193. * Copies the limits and formats instead of adopting them.
  194. *
  195. * @param limits Array of limit values
  196. * @param closures Array of booleans specifying whether each
  197. * element of 'limits' is open or closed. If FALSE, then the
  198. * corresponding limit number is a member of its range.
  199. * If TRUE, then the limit number belongs to the previous range it.
  200. * @param formats Array of formats
  201. * @param count Size of 'limits', 'closures', and 'formats' arrays
  202. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  203. */
  204. ChoiceFormat(const double* limits,
  205. const UBool* closures,
  206. const UnicodeString* formats,
  207. int32_t count);
  208. /**
  209. * Copy constructor.
  210. *
  211. * @param that ChoiceFormat object to be copied from
  212. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  213. */
  214. ChoiceFormat(const ChoiceFormat& that);
  215. /**
  216. * Assignment operator.
  217. *
  218. * @param that ChoiceFormat object to be copied
  219. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  220. */
  221. const ChoiceFormat& operator=(const ChoiceFormat& that);
  222. /**
  223. * Destructor.
  224. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  225. */
  226. virtual ~ChoiceFormat();
  227. /**
  228. * Clones this Format object. The caller owns the
  229. * result and must delete it when done.
  230. *
  231. * @return a copy of this object
  232. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  233. */
  234. virtual Format* clone(void) const;
  235. /**
  236. * Returns true if the given Format objects are semantically equal.
  237. * Objects of different subclasses are considered unequal.
  238. *
  239. * @param other ChoiceFormat object to be compared
  240. * @return true if other is the same as this.
  241. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  242. */
  243. virtual UBool operator==(const Format& other) const;
  244. /**
  245. * Sets the pattern.
  246. * @param pattern The pattern to be applied.
  247. * @param status Output param set to success/failure code on
  248. * exit. If the pattern is invalid, this will be
  249. * set to a failure result.
  250. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  251. */
  252. virtual void applyPattern(const UnicodeString& pattern,
  253. UErrorCode& status);
  254. /**
  255. * Sets the pattern.
  256. * @param pattern The pattern to be applied.
  257. * @param parseError Struct to receive information on position
  258. * of error if an error is encountered
  259. * @param status Output param set to success/failure code on
  260. * exit. If the pattern is invalid, this will be
  261. * set to a failure result.
  262. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  263. */
  264. virtual void applyPattern(const UnicodeString& pattern,
  265. UParseError& parseError,
  266. UErrorCode& status);
  267. /**
  268. * Gets the pattern.
  269. *
  270. * @param pattern Output param which will receive the pattern
  271. * Previous contents are deleted.
  272. * @return A reference to 'pattern'
  273. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  274. */
  275. virtual UnicodeString& toPattern(UnicodeString &pattern) const;
  276. /**
  277. * Sets the choices to be used in formatting.
  278. * For details see the constructor with the same parameter list.
  279. *
  280. * @param limitsToCopy Contains the top value that you want
  281. * parsed with that format,and should be in
  282. * ascending sorted order. When formatting X,
  283. * the choice will be the i, where limit[i]
  284. * &lt;= X &lt; limit[i+1].
  285. * @param formatsToCopy The format strings you want to use for each limit.
  286. * @param count The size of the above arrays.
  287. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  288. */
  289. virtual void setChoices(const double* limitsToCopy,
  290. const UnicodeString* formatsToCopy,
  291. int32_t count );
  292. /**
  293. * Sets the choices to be used in formatting.
  294. * For details see the constructor with the same parameter list.
  295. *
  296. * @param limits Array of limits
  297. * @param closures Array of limit booleans
  298. * @param formats Array of format string
  299. * @param count The size of the above arrays
  300. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  301. */
  302. virtual void setChoices(const double* limits,
  303. const UBool* closures,
  304. const UnicodeString* formats,
  305. int32_t count);
  306. /**
  307. * Returns NULL and 0.
  308. * Before ICU 4.8, this used to return the choice limits array.
  309. *
  310. * @param count Will be set to 0.
  311. * @return NULL
  312. * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
  313. */
  314. virtual const double* getLimits(int32_t& count) const;
  315. /**
  316. * Returns NULL and 0.
  317. * Before ICU 4.8, this used to return the limit booleans array.
  318. *
  319. * @param count Will be set to 0.
  320. * @return NULL
  321. * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
  322. */
  323. virtual const UBool* getClosures(int32_t& count) const;
  324. /**
  325. * Returns NULL and 0.
  326. * Before ICU 4.8, this used to return the array of choice strings.
  327. *
  328. * @param count Will be set to 0.
  329. * @return NULL
  330. * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
  331. */
  332. virtual const UnicodeString* getFormats(int32_t& count) const;
  333. using NumberFormat::format;
  334. /**
  335. * Formats a double number using this object's choices.
  336. *
  337. * @param number The value to be formatted.
  338. * @param appendTo Output parameter to receive result.
  339. * Result is appended to existing contents.
  340. * @param pos On input: an alignment field, if desired.
  341. * On output: the offsets of the alignment field.
  342. * @return Reference to 'appendTo' parameter.
  343. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  344. */
  345. virtual UnicodeString& format(double number,
  346. UnicodeString& appendTo,
  347. FieldPosition& pos) const;
  348. /**
  349. * Formats an int32_t number using this object's choices.
  350. *
  351. * @param number The value to be formatted.
  352. * @param appendTo Output parameter to receive result.
  353. * Result is appended to existing contents.
  354. * @param pos On input: an alignment field, if desired.
  355. * On output: the offsets of the alignment field.
  356. * @return Reference to 'appendTo' parameter.
  357. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  358. */
  359. virtual UnicodeString& format(int32_t number,
  360. UnicodeString& appendTo,
  361. FieldPosition& pos) const;
  362. /**
  363. * Formats an int64_t number using this object's choices.
  364. *
  365. * @param number The value to be formatted.
  366. * @param appendTo Output parameter to receive result.
  367. * Result is appended to existing contents.
  368. * @param pos On input: an alignment field, if desired.
  369. * On output: the offsets of the alignment field.
  370. * @return Reference to 'appendTo' parameter.
  371. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  372. */
  373. virtual UnicodeString& format(int64_t number,
  374. UnicodeString& appendTo,
  375. FieldPosition& pos) const;
  376. /**
  377. * Formats an array of objects using this object's choices.
  378. *
  379. * @param objs The array of objects to be formatted.
  380. * @param cnt The size of objs.
  381. * @param appendTo Output parameter to receive result.
  382. * Result is appended to existing contents.
  383. * @param pos On input: an alignment field, if desired.
  384. * On output: the offsets of the alignment field.
  385. * @param success Output param set to success/failure code on
  386. * exit.
  387. * @return Reference to 'appendTo' parameter.
  388. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  389. */
  390. virtual UnicodeString& format(const Formattable* objs,
  391. int32_t cnt,
  392. UnicodeString& appendTo,
  393. FieldPosition& pos,
  394. UErrorCode& success) const;
  395. using NumberFormat::parse;
  396. /**
  397. * Looks for the longest match of any message string on the input text and,
  398. * if there is a match, sets the result object to the corresponding range's number.
  399. *
  400. * If no string matches, then the parsePosition is unchanged.
  401. *
  402. * @param text The text to be parsed.
  403. * @param result Formattable to be set to the parse result.
  404. * If parse fails, return contents are undefined.
  405. * @param parsePosition The position to start parsing at on input.
  406. * On output, moved to after the last successfully
  407. * parse character. On parse failure, does not change.
  408. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  409. */
  410. virtual void parse(const UnicodeString& text,
  411. Formattable& result,
  412. ParsePosition& parsePosition) const;
  413. /**
  414. * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's RTTI".
  415. *
  416. * @return The class ID for this object. All objects of a
  417. * given class have the same class ID. Objects of
  418. * other classes have different class IDs.
  419. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  420. */
  421. virtual UClassID getDynamicClassID(void) const;
  422. /**
  423. * Returns the class ID for this class. This is useful only for
  424. * comparing to a return value from getDynamicClassID(). For example:
  425. * <pre>
  426. * . Base* polymorphic_pointer = createPolymorphicObject();
  427. * . if (polymorphic_pointer->getDynamicClassID() ==
  428. * . Derived::getStaticClassID()) ...
  429. * </pre>
  430. * @return The class ID for all objects of this class.
  431. * @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
  432. */
  433. static UClassID U_EXPORT2 getStaticClassID(void);
  434. private:
  435. /**
  436. * Converts a double value to a string.
  437. * @param value the double number to be converted.
  438. * @param string the result string.
  439. * @return the converted string.
  440. */
  441. static UnicodeString& dtos(double value, UnicodeString& string);
  442. ChoiceFormat(); // default constructor not implemented
  443. /**
  444. * Construct a new ChoiceFormat with the limits and the corresponding formats
  445. * based on the pattern.
  446. *
  447. * @param newPattern Pattern used to construct object.
  448. * @param parseError Struct to receive information on position
  449. * of error if an error is encountered.
  450. * @param status Output param to receive success code. If the
  451. * pattern cannot be parsed, set to failure code.
  452. */
  453. ChoiceFormat(const UnicodeString& newPattern,
  454. UParseError& parseError,
  455. UErrorCode& status);
  456. friend class MessageFormat;
  457. virtual void setChoices(const double* limits,
  458. const UBool* closures,
  459. const UnicodeString* formats,
  460. int32_t count,
  461. UErrorCode &errorCode);
  462. /**
  463. * Finds the ChoiceFormat sub-message for the given number.
  464. * @param pattern A MessagePattern.
  465. * @param partIndex the index of the first ChoiceFormat argument style part.
  466. * @param number a number to be mapped to one of the ChoiceFormat argument's intervals
  467. * @return the sub-message start part index.
  468. */
  469. static int32_t findSubMessage(const MessagePattern &pattern, int32_t partIndex, double number);
  470. static double parseArgument(
  471. const MessagePattern &pattern, int32_t partIndex,
  472. const UnicodeString &source, ParsePosition &pos);
  473. /**
  474. * Matches the pattern string from the end of the partIndex to
  475. * the beginning of the limitPartIndex,
  476. * including all syntax except SKIP_SYNTAX,
  477. * against the source string starting at sourceOffset.
  478. * If they match, returns the length of the source string match.
  479. * Otherwise returns -1.
  480. */
  481. static int32_t matchStringUntilLimitPart(
  482. const MessagePattern &pattern, int32_t partIndex, int32_t limitPartIndex,
  483. const UnicodeString &source, int32_t sourceOffset);
  484. /**
  485. * Some of the ChoiceFormat constructors do not have a UErrorCode paramater.
  486. * We need _some_ way to provide one for the MessagePattern constructor.
  487. * Alternatively, the MessagePattern could be a pointer field, but that is
  488. * not nice either.
  489. */
  490. UErrorCode constructorErrorCode;
  491. /**
  492. * The MessagePattern which contains the parsed structure of the pattern string.
  493. *
  494. * Starting with ICU 4.8, the MessagePattern contains a sequence of
  495. * numeric/selector/message parts corresponding to the parsed pattern.
  496. * For details see the MessagePattern class API docs.
  497. */
  498. MessagePattern msgPattern;
  499. /**
  500. * Docs & fields from before ICU 4.8, before MessagePattern was used.
  501. * Commented out, and left only for explanation of semantics.
  502. * --------
  503. * Each ChoiceFormat divides the range -Inf..+Inf into fCount
  504. * intervals. The intervals are:
  505. *
  506. * 0: fChoiceLimits[0]..fChoiceLimits[1]
  507. * 1: fChoiceLimits[1]..fChoiceLimits[2]
  508. * ...
  509. * fCount-2: fChoiceLimits[fCount-2]..fChoiceLimits[fCount-1]
  510. * fCount-1: fChoiceLimits[fCount-1]..+Inf
  511. *
  512. * Interval 0 is special; during formatting (mapping numbers to
  513. * strings), it also contains all numbers less than
  514. * fChoiceLimits[0], as well as NaN values.
  515. *
  516. * Interval i maps to and from string fChoiceFormats[i]. When
  517. * parsing (mapping strings to numbers), then intervals map to
  518. * their lower limit, that is, interval i maps to fChoiceLimit[i].
  519. *
  520. * The intervals may be closed, half open, or open. This affects
  521. * formatting but does not affect parsing. Interval i is affected
  522. * by fClosures[i] and fClosures[i+1]. If fClosures[i]
  523. * is FALSE, then the value fChoiceLimits[i] is in interval i.
  524. * That is, intervals i and i are:
  525. *
  526. * i-1: ... x < fChoiceLimits[i]
  527. * i: fChoiceLimits[i] <= x ...
  528. *
  529. * If fClosures[i] is TRUE, then the value fChoiceLimits[i] is
  530. * in interval i-1. That is, intervals i-1 and i are:
  531. *
  532. * i-1: ... x <= fChoiceLimits[i]
  533. * i: fChoiceLimits[i] < x ...
  534. *
  535. * Because of the nature of interval 0, fClosures[0] has no
  536. * effect.
  537. */
  538. // double* fChoiceLimits;
  539. // UBool* fClosures;
  540. // UnicodeString* fChoiceFormats;
  541. // int32_t fCount;
  542. };
  543. U_NAMESPACE_END
  544. #endif // U_HIDE_DEPRECATED_API
  545. #endif /* #if !UCONFIG_NO_FORMATTING */
  546. #endif // CHOICFMT_H
  547. //eof