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"
73 * {@link #setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status)},
74 * {@link #adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status)},
75 * {@link #format(const UnicodeString* argumentNames, const Formattable* arguments,
81 * <p>If this format uses named arguments, certain methods that take or
84 * UErrorCode is set to U_ILLEGAL_ARGUMENT_ERROR by format, and to
87 * {@link #adoptFormats(Format** formatsToAdopt, int32_t count)},
88 * {@link #setFormats(const Format** newFormats,int32_t count)},
89 * {@link #adoptFormat(int32_t n, Format *newFormat)},
90 * {@link #setFormat(int32_t n, Format& newFormat)},
91 * {@link #format(const Formattable* source, int32_t count, UnicodeString& appendTo, FieldPosition& ignore, UErrorCode& success)},
92 * {@link #format(const UnicodeString& pattern,const Formattable* arguments,int32_t cnt,UnicodeString& appendTo,UErrorCode& success)},
93 * {@link #format(const Formattable& source, UnicodeString& appendTo, FieldPosition& ignore, UErrorCode& success)},
94 * {@link #format(const Formattable* arguments, int32_t cnt, UnicodeString& appendTo, FieldPosition& status, int32_t recursionProtection,UErrorCode& success)},
113 * <LI>If the format of an argument loses information, such as with
114 * a choice format where a large number formats to "many", then the
121 * format as "a,b,c". When the result is parsed, it will return {"a",
142 * MessageFormat::format(
151 * Typically, the message format will come from resources, and the
165 * cout << "format: " << form.format(testArgs, 2, string, fpos, success ) << endl;
221 * then the default format is used (e.g. NumberFormat::createInstance(),
232 * {1,number,$'#',##} will produce a number format with the pound-sign
240 * format patterns unfortunately have shown to be somewhat confusing.
260 * specified format, a failing UErrorCode result is set.
277 * cout << form.format(testArgs, 2, string, fpos, success) << endl;
298 * the string patterns), then be careful not to produce a format that
317 class U_I18N_API MessageFormat : public Format {
389 * Clones this Format object polymorphically. The caller owns the
393 virtual Format* clone(void) const;
396 * Returns true if the given Format objects are semantically equal.
399 Format objects are semantically equal.
402 virtual UBool operator==(const Format& other) const;
406 * format information.
414 * format information.
421 * Applies the given pattern string to this message format.
431 * Applies the given pattern string to this message format.
456 * See the class description about format numbering.
457 * The caller should not delete the Format objects after this call.
463 * <p>If this format uses named arguments, the new formats are discarded
464 * and this format remains unchanged.
467 * @param formatsToAdopt the format to be adopted.
470 virtual void adoptFormats(Format** formatsToAdopt, int32_t count);
474 * See the class description about format numbering.
479 * <p>If this format uses named arguments, the new formats are discarded
480 * and this format remains unchanged.
483 * @param newFormats the new format to be set.
486 virtual void setFormats(const Format** newFormats, int32_t cnt);
491 * See the class description about format numbering.
492 * The caller should not delete the Format object after this call.
496 * <p>If this format uses named arguments, the new format is discarded
497 * and this format remains unchanged.
501 * @param formatToAdopt the format to be adopted.
503 virtual void adoptFormat(int32_t formatNumber, Format* formatToAdopt);
507 * See the class description about format numbering.
511 * @param format the format to be set.
514 virtual void setFormat(int32_t formatNumber, const Format& format);
517 * Gets format names. This function returns formatNames in StringEnumerations
527 * Gets subformat pointer for given format name.
531 * The returned Format object should not be deleted by the caller,
535 * @param formatName the name or number specifying a format
539 virtual Format* getFormat(const UnicodeString& formatName, UErrorCode& status);
542 * Sets one subformat for given format name.
543 * See the class description about format name.
550 * @param format the format to be set.
554 virtual void setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status);
557 * Sets one subformat for given format name.
558 * See the class description about format name.
564 * The caller should not delete the Format object after this call.
566 * @param formatToAdopt Format to be adopted.
570 virtual void adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status);
576 * until the next call to this format. See the class description
577 * about format numbering.
580 * @return an array of count Format* objects, or NULL if out of
584 virtual const Format** getFormats(int32_t& count) const;
587 using Format::format;
593 * <p>If this format uses named arguments, appendTo is unchanged and
606 UnicodeString& format(const Formattable* source,
616 * <p>If this format uses named arguments, appendTo is unchanged and
629 static UnicodeString& format(const UnicodeString& pattern,
641 * <p>If this format uses named arguments, appendTo is unchanged and
655 virtual UnicodeString& format(const Formattable& obj,
666 * @param obj The object to format
674 UnicodeString& format(const Formattable& obj,
697 UnicodeString& format(const UnicodeString* argumentNames,
722 * <p>If this format uses named arguments, status is set to
828 Format** formatAliases; // see getFormats
837 * Each subformat has a Format object, an offset into the plain
875 * Default Format objects used when no format is specified and a
916 UnicodeString& format( const Formattable* arguments,
923 UnicodeString& format( const Formattable* arguments,
976 MessageFormat::format(const Formattable& obj,
979 return Format::format(obj, appendTo, status);