Home | History | Annotate | Download | only in unicode

Lines Matching defs:Formattable

24  * \brief C++ API: Formattable is a thin wrapper for primitive numeric types.
35 * Formattable objects can be passed to the Format class or
36 * its subclasses for formatting. Formattable is a thin wrapper
40 * <p>Internally, a Formattable object is a union of primitive types.
44 * <p>As of ICU 3.0, Formattable may also wrap a UObject pointer,
46 * encapsulated in a Formattable. For legacy reasons and for
48 * within a Formattable.
50 * <p>The Formattable class is not suitable for subclassing.
52 class U_I18N_API Formattable : public UObject {
56 * the Formattable(UDate) constructor and the Formattable(double)
69 Formattable(); // Type kLong, value 0
72 * Creates a Formattable object with a UDate instance.
77 Formattable(UDate d, ISDATE flag);
80 * Creates a Formattable object with a double number.
84 Formattable(double d);
87 * Creates a Formattable object with a long number.
91 Formattable(int32_t l);
94 * Creates a Formattable object with an int64_t number
98 Formattable(int64_t ll);
102 * Creates a Formattable object with a char string pointer.
107 Formattable(const char* strToCopy);
111 * Creates a Formattable object of an appropriate numeric type from a
112 * a decimal number in string form. The Formattable will retain the
123 Formattable(const StringPiece &number, UErrorCode &status);
126 * Creates a Formattable object with a UnicodeString object to copy from.
130 Formattable(const UnicodeString& strToCopy);
133 * Creates a Formattable object with a UnicodeString object to adopt from.
137 Formattable(UnicodeString* strToAdopt);
140 * Creates a Formattable object with an array of Formattable objects.
141 * @param arrayToCopy the Formattable object array.
145 Formattable(const Formattable* arrayToCopy, int32_t count);
148 * Creates a Formattable object that adopts the given UObject.
152 Formattable(UObject* objectToAdopt);
158 Formattable(const Formattable&);
162 * @param rhs The Formattable object to copy into this object.
165 Formattable& operator=(const Formattable &rhs);
173 UBool operator==(const Formattable &other) const;
181 UBool operator!=(const Formattable& other) const
188 virtual ~Formattable();
201 Formattable *clone() const;
205 * Formattable object. Formattable is a union of several
261 * Gets the data type of this Formattable object.
262 * @return the data type of this Formattable object.
268 * Returns TRUE if the data type of this Formattable object
431 const Formattable* getArray(int32_t& count) const
443 const Formattable* getArray(int32_t& count, UErrorCode& status) const;
447 * Formattable object. If this object is not of type kArray then
453 Formattable& operator[](int32_t index) { return fValue.fArrayAndCount.fArray[index]; }
457 * formattable, or NULL if this object does not contain a UObject.
465 * formattable, or NULL if this object does not contain numeric type.
474 * U_INVALID_STATE if the formattable object has not been set to
530 void setArray(const Formattable* array, int32_t count);
545 void adoptArray(Formattable* array, int32_t count);
598 * NumberFormat::format(Formattable, ...
635 Formattable* fArray;
647 inline UDate Formattable::getDate(UErrorCode& status) const {
657 inline const UnicodeString& Formattable::getString(void) const {
661 inline UnicodeString& Formattable::getString(void) {
665 inline int32_t Formattable::getLong(UErrorCode* status) const {