Logo Search packages:      
Sourcecode: icu version File versions  Download package

RuleBasedNumberFormat::RuleBasedNumberFormat ( const UnicodeString rules,
const UnicodeString localizations,
UParseError perror,
UErrorCode status 

Creates a RuleBasedNumberFormat that behaves according to the description passed in. The formatter uses the default locale.

The localizations data provides information about the public rule sets and their localized display names for different locales. The first element in the list is an array of the names of the public rule sets. The first element in this array is the initial default ruleset. The remaining elements in the list are arrays of localizations of the names of the public rule sets. Each of these is one longer than the initial array, with the first String being the ULocale ID, and the remaining Strings being the localizations of the rule set names, in the same order as the initial array. Arrays are NULL-terminated.

rules A description of the formatter's desired behavior. See the class documentation for a complete explanation of the description syntax.
localizations the localization information. names in the description. These will be copied by the constructor.
perror The parse error if an error was encountered.
status The status indicating whether the constructor succeeded. ICU 3.2

Definition at line 665 of file rbnf.cpp.

References RuleBasedNumberFormat().

  : ruleSets(NULL)
  , defaultRuleSet(NULL)
  , locale(Locale::getDefault())
  , collator(NULL)
  , decimalFormatSymbols(NULL)
  , lenient(FALSE)
  , lenientParseRules(NULL)
  , localizations(NULL)
  , noParse(FALSE) //TODO: to be removed after #6895
  LocalizationInfo* locinfo = StringLocalizationInfo::create(locs, perror, status);
  init(description, locinfo, perror, status);

Generated by  Doxygen 1.6.0   Back to index