Logo Search packages:      
Sourcecode: icu version File versions

void DecimalFormat::expandAffixes ( const UnicodeString pluralCount ) [private]

Expand the affix pattern strings into the expanded affix strings. If any affix pattern string is null, do not expand it. This method should be called any time the symbols or the affix patterns change in order to keep the expanded affix strings up to date. This method also will be called before formatting if format currency plural names, since the plural name is not a static one, it is based on the currency plural count, the affix will be known only after the currency plural count is know. In which case, the parameter 'pluralCount' will be a non-null currency plural count. In all other cases, the 'pluralCount' is null, which means it is not needed.

Definition at line 3183 of file decimfmt.cpp.

References UnicodeString::append(), expandAffix(), FALSE, and fPositivePrefix.

Referenced by adoptDecimalFormatSymbols().

                                                                  {
    FieldPositionHandler none;
    if (fPosPrefixPattern != 0) {
      expandAffix(*fPosPrefixPattern, fPositivePrefix, 0, none, FALSE, pluralCount);
    }
    if (fPosSuffixPattern != 0) {
      expandAffix(*fPosSuffixPattern, fPositiveSuffix, 0, none, FALSE, pluralCount);
    }
    if (fNegPrefixPattern != 0) {
      expandAffix(*fNegPrefixPattern, fNegativePrefix, 0, none, FALSE, pluralCount);
    }
    if (fNegSuffixPattern != 0) {
      expandAffix(*fNegSuffixPattern, fNegativeSuffix, 0, none, FALSE, pluralCount);
    }
#ifdef FMT_DEBUG
    UnicodeString s;
    s.append("[")
        .append(*fPosPrefixPattern).append("|").append(*fPosSuffixPattern)
        .append(";") .append(*fNegPrefixPattern).append("|").append(*fNegSuffixPattern)
        .append("]->[")
        .append(fPositivePrefix).append("|").append(fPositiveSuffix)
        .append(";") .append(fNegativePrefix).append("|").append(fNegativeSuffix)
        .append("]\n");
    debugout(s);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index