Home | History | Annotate | Download | only in unicode

Lines Matching refs:Format

13 *   07/22/98    stephen     Removed operator!= (defined in Format)
29 #include "unicode/format.h"
57 * <p><code>MessageFormat</code> differs from the other <code>Format</code>
69 * <p>An argument might not specify any format type. In this case,
75 * Format object is created, cached and used.
81 * <p>After construction, a custom Format object can be set for
97 * (or using a custom Format object if one was set).
153 * a <code>Format</code> instance for the format element. The following
154 * table shows how the values map to Format instances. Combinations not
156 * be a valid pattern string for the Format subclass used.
162 * <th>resulting Format object
254 * MessageFormat::format(
264 * Typically, the message format will come from resources, and the
279 * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl;
304 * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
306 * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
317 * It is recommended to create separate format instances for each thread.
318 * If multiple threads access a format concurrently, it must be synchronized
323 class U_I18N_API MessageFormat : public Format {
397 * Clones this Format object polymorphically. The caller owns the
401 virtual Format* clone(void) const;
404 * Returns true if the given Format objects are semantically equal.
407 * @return true if the given Format objects are semantically equal.
410 virtual UBool operator==(const Format& other) const;
413 * Sets the locale to be used for creating argument Format objects.
420 * Gets the locale used for creating argument Format objects.
421 * format information.
428 * Applies the given pattern string to this message format.
438 * Applies the given pattern string to this message format.
452 * Sets the UMessagePatternApostropheMode and the pattern used by this message format.
453 * Parses the pattern and caches Format objects for simple argument types.
494 * See the class description about format numbering.
495 * The caller should not delete the Format objects after this call.
501 * <p>If this format uses named arguments, the new formats are discarded
502 * and this format remains unchanged.
505 * @param formatsToAdopt the format to be adopted.
508 virtual void adoptFormats(Format** formatsToAdopt, int32_t count);
512 * See the class description about format numbering.
517 * <p>If this format uses named arguments, the new formats are discarded
518 * and this format remains unchanged.
521 * @param newFormats the new format to be set.
524 virtual void setFormats(const Format** newFormats, int32_t cnt);
529 * See the class description about format numbering.
530 * The caller should not delete the Format object after this call.
534 * <p>If this format uses named arguments, the new format is discarded
535 * and this format remains unchanged.
539 * @param formatToAdopt the format to be adopted.
541 virtual void adoptFormat(int32_t formatNumber, Format* formatToAdopt);
545 * See the class description about format numbering.
549 * @param format the format to be set.
552 virtual void setFormat(int32_t formatNumber, const Format& format);
555 * Gets format names. This function returns formatNames in StringEnumerations
565 * Gets subformat pointer for given format name.
569 * The returned Format object should not be deleted by the caller,
573 * @param formatName the name or number specifying a format
577 virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status);
580 * Sets one subformat for given format name.
581 * See the class description about format name.
588 * @param format the format to be set.
592 virtual void setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status);
595 * Sets one subformat for given format name.
596 * See the class description about format name.
602 * The caller should not delete the Format object after this call.
604 * @param formatToAdopt Format to be adopted.
608 virtual void adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status);
614 * until the next call to this format. See the class description
615 * about format numbering.
618 * @return an array of count Format* objects, or NULL if out of
622 virtual const Format** getFormats(int32_t& count) const;
625 using Format::format;
631 * <p>If this format uses named arguments, appendTo is unchanged and
644 UnicodeString& format(const Formattable* source,
654 * <p>If this format uses named arguments, appendTo is unchanged and
667 static UnicodeString& format(const UnicodeString& pattern,
679 * <p>If this format uses named arguments, appendTo is unchanged and
693 virtual UnicodeString& format(const Formattable& obj,
704 * @param obj The object to format
712 UnicodeString& format(const Formattable& obj,
735 UnicodeString& format(const UnicodeString* argumentNames,
760 * <p>If this format uses named arguments, status is set to
867 * Compares two Format objects. This is used for constructing the hash
870 * @param left pointer to a Format object. Must not be NULL.
871 * @param right pointer to a Format object. Must not be NULL.
883 Format** formatAliases; // see getFormats
930 * Default Format objects used when no format is specified and a
962 * Thin wrapper around the format(... AppendableWrapper ...) variant.
966 UnicodeString& format(const Formattable* arguments,
979 * where a '#' is replaced by the format string for this number.
990 void format(int32_t msgStart,
1001 void setArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
1003 void setCustomArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
1011 Format* createAppropriateFormat(UnicodeString& type,
1030 Format* getCachedFormatter(int32_t argumentNumber) const;
1072 class U_I18N_API DummyFormat : public Format {
1074 using Format::format;
1075 virtual UBool operator==(const Format&) const;
1076 virtual Format* clone() const;
1077 virtual UnicodeString& format(const Formattable& obj,
1080 virtual UnicodeString& format(const Formattable&,
1084 virtual UnicodeString& format(const Formattable& obj,
1097 MessageFormat::format(const Formattable& obj,
1100 return Format::format(obj, appendTo, status);