Home | History | Annotate | Download | only in unicode

Lines Matching refs:Format

15 *   07/22/98    stephen     Removed operator!= (defined in Format)
31 #include "unicode/format.h"
59 * <p><code>MessageFormat</code> differs from the other <code>Format</code>
71 * <p>An argument might not specify any format type. In this case,
77 * Format object is created, cached and used.
83 * <p>After construction, a custom Format object can be set for
99 * (or using a custom Format object if one was set).
155 * a <code>Format</code> instance for the format element. The following
156 * table shows how the values map to Format instances. Combinations not
158 * be a valid pattern string for the Format subclass used.
164 * <th>resulting Format object
256 * MessageFormat::format(
266 * Typically, the message format will come from resources, and the
281 * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl;
306 * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
308 * cout << msgFmt.format(testArgs, testArgsNames, 2, result, fpos, 0, success);
319 * It is recommended to create separate format instances for each thread.
320 * If multiple threads access a format concurrently, it must be synchronized
325 class U_I18N_API MessageFormat : public Format {
399 * Clones this Format object polymorphically. The caller owns the
403 virtual Format* clone(void) const;
406 * Returns true if the given Format objects are semantically equal.
409 * @return true if the given Format objects are semantically equal.
412 virtual UBool operator==(const Format& other) const;
415 * Sets the locale to be used for creating argument Format objects.
422 * Gets the locale used for creating argument Format objects.
423 * format information.
430 * Applies the given pattern string to this message format.
440 * Applies the given pattern string to this message format.
454 * Sets the UMessagePatternApostropheMode and the pattern used by this message format.
455 * Parses the pattern and caches Format objects for simple argument types.
496 * See the class description about format numbering.
497 * The caller should not delete the Format objects after this call.
503 * <p>If this format uses named arguments, the new formats are discarded
504 * and this format remains unchanged.
507 * @param formatsToAdopt the format to be adopted.
510 virtual void adoptFormats(Format** formatsToAdopt, int32_t count);
514 * See the class description about format numbering.
519 * <p>If this format uses named arguments, the new formats are discarded
520 * and this format remains unchanged.
523 * @param newFormats the new format to be set.
526 virtual void setFormats(const Format** newFormats, int32_t cnt);
531 * See the class description about format numbering.
532 * The caller should not delete the Format object after this call.
536 * <p>If this format uses named arguments, the new format is discarded
537 * and this format remains unchanged.
541 * @param formatToAdopt the format to be adopted.
543 virtual void adoptFormat(int32_t formatNumber, Format* formatToAdopt);
547 * See the class description about format numbering.
551 * @param format the format to be set.
554 virtual void setFormat(int32_t formatNumber, const Format& format);
557 * Gets format names. This function returns formatNames in StringEnumerations
567 * Gets subformat pointer for given format name.
571 * The returned Format object should not be deleted by the caller,
575 * @param formatName the name or number specifying a format
579 virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status);
582 * Sets one subformat for given format name.
583 * See the class description about format name.
590 * @param format the format to be set.
594 virtual void setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status);
597 * Sets one subformat for given format name.
598 * See the class description about format name.
604 * The caller should not delete the Format object after this call.
606 * @param formatToAdopt Format to be adopted.
610 virtual void adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status);
616 * until the next call to this format. See the class description
617 * about format numbering.
620 * @return an array of count Format* objects, or NULL if out of
624 virtual const Format** getFormats(int32_t& count) const;
627 using Format::format;
633 * <p>If this format uses named arguments, appendTo is unchanged and
646 UnicodeString& format(const Formattable* source,
656 * <p>If this format uses named arguments, appendTo is unchanged and
669 static UnicodeString& format(const UnicodeString& pattern,
681 * <p>If this format uses named arguments, appendTo is unchanged and
695 virtual UnicodeString& format(const Formattable& obj,
718 UnicodeString& format(const UnicodeString* argumentNames,
743 * <p>If this format uses named arguments, status is set to
850 * Compares two Format objects. This is used for constructing the hash
853 * @param left pointer to a Format object. Must not be NULL.
854 * @param right pointer to a Format object. Must not be NULL.
866 Format** formatAliases; // see getFormats
913 * Default Format objects used when no format is specified and a
945 * Thin wrapper around the format(... AppendableWrapper ...) variant.
949 UnicodeString& format(const Formattable* arguments,
962 * where a '#' is replaced by the format string for this number.
973 void format(int32_t msgStart,
984 void setArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
986 void setCustomArgStartFormat(int32_t argStart, Format* formatter, UErrorCode& status);
994 Format* createAppropriateFormat(UnicodeString& type,
1027 Format* getCachedFormatter(int32_t argumentNumber) const;
1067 class U_I18N_API DummyFormat : public Format {
1069 virtual UBool operator==(const Format&) const;
1070 virtual Format* clone() const;
1071 virtual UnicodeString& format(const Formattable& obj,
1074 virtual UnicodeString& format(const Formattable&,
1078 virtual UnicodeString& format(const Formattable& obj,