Exemplo n.º 1
0
const SimpleFormatter *MeasureFormat::getPluralFormatter(
        const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index,
        UErrorCode &errorCode) const {
    if (U_FAILURE(errorCode)) {
        return NULL;
    }
    if (index != StandardPlural::OTHER) {
        const SimpleFormatter *pattern = getFormatterOrNull(unit, width, index);
        if (pattern != NULL) {
            return pattern;
        }
    }
    return getFormatter(unit, width, StandardPlural::OTHER, errorCode);
}
Exemplo n.º 2
0
//##############################################################################
//# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
//##############################################################################
void xLogHandlerFile::publish(xLogRecord& record)
{
	if(record.getLevel() <= getLogLevel())
		m_out->write(getFormatter().format(record));
}
Exemplo n.º 3
0
int DateTimeFormat::StyleFormatter::parseInto(DateTimeParserBucket *bucket, string text, int position) {
    DateTimeParser p = getFormatter(bucket->getLocale())->getParser();
    return p.parseInto(bucket, text, position);
}
Exemplo n.º 4
0
void DateTimeFormat::StyleFormatter::printTo(stringstream &out, ReadablePartial *partial, Locale *locale) {
    DateTimePrinter *p = getFormatter(locale)->getPrinter();
    p->printTo(out, partial, locale);
}
Exemplo n.º 5
0
void DateTimeFormat::StyleFormatter::printTo(stringstream &out, int64_t instant, Chronology *chrono,
             int displayOffset, DateTimeZone *displayZone, Locale *locale) {
    DateTimePrinter *p = getFormatter(locale)->getPrinter();
    p->printTo(out, instant, chrono, displayOffset, displayZone, locale);
}