Lines Matching refs:Format
203 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) {
205 formatter->format(arg, s, ec);
210 void formatAndAppend(const Format* formatter, const Formattable& arg,
300 Format(that),
376 Format::operator=(that);
392 MessageFormat::operator==(const Format& rhs) const
399 if (!Format::operator==(rhs) ||
426 const Format* format = (const Format*)uhash_iget(cachedFormatters, cur->key.integer);
427 const Format* rhs_format = (const Format*)uhash_iget(that.cachedFormatters, rhs_cur->key.integer);
428 if (*format != *rhs_format) {
438 Format*
550 Format* formatter,
582 Format* formatter,
592 Format* MessageFormat::getCachedFormatter(int32_t argumentNumber) const {
597 if (ptr != NULL && dynamic_cast<DummyFormat*>((Format*)ptr) == NULL) {
598 return (Format*) ptr;
609 MessageFormat::adoptFormats(Format** newFormats,
642 MessageFormat::setFormats(const Format** newFormats,
659 Format* newFormat = NULL;
675 // Adopt a single format by format number.
676 // Do nothing if the format number is not less than the array count.
679 MessageFormat::adoptFormat(int32_t n, Format *newFormat) {
680 LocalPointer<Format> p(newFormat);
695 // Adopt a single format by format name.
699 Format* formatToAdopt,
701 LocalPointer<Format> p(formatToAdopt);
714 Format* f;
732 // Set a single format.
735 MessageFormat::setFormat(int32_t n, const Format& newFormat) {
742 Format* new_format = newFormat.clone();
755 // Get a single format by format name.
757 Format *
775 // Set a single format by format name
779 const Format& newFormat,
792 Format* new_format = newFormat.clone();
803 // Gets the format array.
804 const Format**
807 // This old API returns an array (which we hold) of Format*
810 // on demand that contains aliases to the subformats[i].format
816 Format** a = (Format**)
817 uprv_malloc(sizeof(Format*) * formatAliasesCapacity);
824 Format** a = (Format**)
825 uprv_realloc(formatAliases, sizeof(Format*) * argTypeCount);
838 return (const Format**)formatAliases;
871 MessageFormat::format(const Formattable* source,
877 return format(source, NULL, cnt, appendTo, &ignore, success);
886 MessageFormat::format( const UnicodeString& pattern,
893 return temp.format(arguments, NULL, cnt, appendTo, NULL, success);
902 MessageFormat::format(const Formattable& source,
915 return format(tmpPtr, NULL, cnt, appendTo, &ignore, success);
919 MessageFormat::format(const UnicodeString* argumentNames,
924 return format(arguments, argumentNames, count, appendTo, NULL, success);
941 MessageFormat::format(const Formattable* arguments,
953 format(0, NULL, arguments, argumentNames, cnt, app, pos, status);
971 // For format() methods, and to preserve information (e.g., BigDecimal).
988 const Format *formatter;
1001 void MessageFormat::format(int32_t msgStart, const void *plNumber,
1061 const Format* formatter = NULL;
1089 formatter->format(*arg, subMsgString, success);
1094 subMsgFormat.format(0, NULL, arguments, argumentNames, cnt, appendTo, ignore, success);
1168 format(msgStart, plNumber, arguments, argumentNames, cnt, appendTo, NULL, success);
1172 // JDK compatibility mode: (see JDK MessageFormat.format() API docs)
1175 // instantiate a temporary MessageFormat object and format again;
1197 sb.append(nf->format(pluralNumber.number, sb, success));
1214 subMsgFormat.format(0, NULL, arguments, argumentNames, cnt, appendTo, NULL, success);
1340 Format* newFormat = ((Format*)(cur->value.pointer))->clone();
1420 const Format* formatter = NULL;
1567 static Format* makeRBNF(URBNFRuleSetTag tag, const Locale& locale, const UnicodeString& defaultRuleSet, UErrorCode& ec) {
1649 Format* formatter = createAppropriateFormat(explicitType, style, formattableType, parseError, status);
1676 Format* MessageFormat::createAppropriateFormat(UnicodeString& type, UnicodeString& style,
1682 Format* fmt = NULL;
1797 * Return the default number format. Used to format a numeric
1798 * argument when subformats[i].format is NULL. Returns NULL
1818 * Return the default date format. Used to format a date
1819 * argument when subformats[i].format is NULL. Returns NULL
1846 return *(const Format*)left==*(const Format*)right;
1850 UBool MessageFormat::DummyFormat::operator==(const Format&) const {
1854 Format* MessageFormat::DummyFormat::clone() const {
1858 UnicodeString& MessageFormat::DummyFormat::format(const Formattable&,
1867 UnicodeString& MessageFormat::DummyFormat::format(const Formattable&,
1877 UnicodeString& MessageFormat::DummyFormat::format(const Formattable&,
1951 (const Format*)uhash_iget(msgFormat.cachedFormatters, context.numberArgIndex);
1958 context.formatter->format(context.number, context.numberString, ec);