Home | History | Annotate | Download | only in i18n

Lines Matching refs:Format

195  * Each subformat has a Format object, an offset into the plain
205 Format* format; // formatter
221 * Clone that.format and assign it to this.format
222 * Do NOT delete this.format
227 format = that.format ? that.format->clone() : NULL;
244 ((format == that.format) || // handles NULL
245 (*format == *that.format));
341 : Format(that),
363 delete subformats[idx].format;
463 Format::operator=(that);
470 delete subformats[j].format;
475 // Subformat::operator= does NOT delete this.format
489 MessageFormat::operator==(const Format& rhs) const
496 if (!Format::operator==(rhs) ||
516 Format*
582 // subpattern is parsed, it creates a format object that is stored
607 delete subformats[i].format;
695 delete subformats[i].format;
717 Format* fmt = subformats[i].format;
719 // do nothing, string format
855 MessageFormat::adoptFormats(Format** newFormats,
864 delete subformats[i].format;
867 subformats[i].format = newFormats[i];
872 // the incoming format objects and return unchanged.
886 MessageFormat::setFormats(const Format** newFormats,
895 delete subformats[i].format;
900 subformats[i].format = newFormats[i] ? newFormats[i]->clone() : NULL;
909 // Adopt a single format by format number.
910 // Do nothing if the format number is not less than the array count.
913 MessageFormat::adoptFormat(int32_t n, Format *newFormat) {
917 delete subformats[n].format;
918 subformats[n].format = newFormat;
923 // Adopt a single format by format name.
927 Format* formatToAdopt,
940 delete subformats[i].format;
943 subformats[i].format = NULL;
945 subformats[i].format = formatToAdopt;
952 // Set a single format.
956 MessageFormat::setFormat(int32_t n, const Format& newFormat) {
958 delete subformats[n].format;
961 subformats[n].format = NULL;
963 subformats[n].format = newFormat.clone();
969 // Get a single format by format name.
971 Format *
983 return subformats[argumentNumber].format;
993 return subformats[i].format;
1000 // Set a single format by format name
1004 const Format& newFormat,
1013 delete subformats[i].format;
1016 subformats[i].format = NULL;
1018 subformats[i].format = newFormat.clone();
1026 // Gets the format array.
1028 const Format**
1031 // This old API returns an array (which we hold) of Format*
1034 // on demand that contains aliases to the subformats[i].format
1040 Format** a = (Format**)
1041 uprv_malloc(sizeof(Format
1047 Format** a = (Format**)
1048 uprv_realloc(formatAliases, sizeof(Format*) * subformatCount);
1056 t->formatAliases[i] = subformats[i].format;
1059 return (const Format**)formatAliases;
1089 MessageFormat::format(const Formattable* source,
1098 return format(source, cnt, appendTo, ignore, 0, success);
1107 MessageFormat::format( const UnicodeString& pattern,
1115 temp.format(arguments, cnt, appendTo, ignore, success);
1125 MessageFormat::format(const Formattable& source,
1140 return format(tmpPtr, cnt, appendTo, ignore, 0, success);
1145 MessageFormat::format(const UnicodeString* argumentNames,
1151 return format(arguments, argumentNames, count, appendTo, ignore, 0, success);
1155 MessageFormat::format(const Formattable* arguments,
1162 return format(arguments, NULL, cnt, appendTo, status, recursionProtection, success);
1170 MessageFormat::format(const Formattable* arguments,
1192 // Append the prefix of current format element.
1225 // Recursively calling the format process only if the current
1226 // format argument refers to a ChoiceFormat object.
1227 Format* fmt = subformats[i].format;
1230 fmt->format(*obj, argNum, success);
1240 temp.format(arguments, NULL, cnt, appendTo, status, recursionProtection, success);
1243 temp.format(arguments, argumentNames, cnt, appendTo, status, recursionProtection, success);
1263 nf->format(obj->getDouble(), appendTo);
1265 nf->format(obj->getLong(), appendTo);
1267 nf->format(obj->getInt64(), appendTo);
1276 df->format(obj->getDate(), appendTo);
1316 // match up to format
1327 // now use format
1328 Format* fmt = subformats[i].format;
1330 if (fmt == NULL) { // string format
1465 static Format* makeRBNF(URBNFRuleSetTag tag, const Locale& locale, const UnicodeString& defaultRuleSet, UErrorCode& ec) {
1478 * segments[1..3] into a Format* object. Stores the format object in
1482 * @param formatNumber index into subformats[] for this format
1515 // Parse the format, recording the argument type and creating a
1516 // new Format object (except for string arguments).
1518 Format *fmt = NULL;
1635 subformats[formatNumber].format = fmt;
1734 * Return the default number format. Used to format a numeric
1735 * argument when subformats[i].format is NULL. Returns NULL
1755 * Return the default date format. Used to format a date
1756 * argument when subformats[i].format is NULL. Returns NULL