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

DecimalFormatSymbols * RuleBasedNumberFormat::getDecimalFormatSymbols ( void   )  const [private]

Returns the DecimalFormatSymbols object that should be used by all DecimalFormat instances owned by this formatter. This object is lazily created: this function creates it the first time it's called.

Returns:
The DecimalFormatSymbols object that should be used by all DecimalFormat instances owned by this formatter.

Definition at line 1595 of file rbnf.cpp.

References NULL, U_SUCCESS, and U_ZERO_ERROR.

{
    // lazy-evaluate the DecimalFormatSymbols object.  This object
    // is shared by all DecimalFormat instances belonging to this
    // formatter
    if (decimalFormatSymbols == NULL) {
        UErrorCode status = U_ZERO_ERROR;
        DecimalFormatSymbols* temp = new DecimalFormatSymbols(locale, status);
        if (U_SUCCESS(status)) {
            ((RuleBasedNumberFormat*)this)->decimalFormatSymbols = temp;
        } else {
            delete temp;
        }
    }
    return decimalFormatSymbols;
}


Generated by  Doxygen 1.6.0   Back to index