Home | History | Annotate | Download | only in unicode

Lines Matching refs:Formattable

24  * \brief C++ API: Formattable is a thin wrapper for primitive numeric types.
47 * Formattable objects can be passed to the Format class or
48 * its subclasses for formatting. Formattable is a thin wrapper
52 * <p>Internally, a Formattable object is a union of primitive types.
56 * <p>As of ICU 3.0, Formattable may also wrap a UObject pointer,
58 * encapsulated in a Formattable. For legacy reasons and for
60 * within a Formattable.
62 * <p>The Formattable class is not suitable for subclassing.
64 class U_I18N_API Formattable : public UObject {
68 * the Formattable(UDate) constructor and the Formattable(double)
81 Formattable(); // Type kLong, value 0
84 * Creates a Formattable object with a UDate instance.
89 Formattable(UDate d, ISDATE flag);
92 * Creates a Formattable object with a double number.
96 Formattable(double d);
99 * Creates a Formattable object with a long number.
103 Formattable(int32_t l);
106 * Creates a Formattable object with an int64_t number
110 Formattable(int64_t ll);
114 * Creates a Formattable object with a char string pointer.
119 Formattable(const char* strToCopy);
123 * Creates a Formattable object of an appropriate numeric type from a
124 * a decimal number in string form. The Formattable will retain the
135 Formattable(const StringPiece &number, UErrorCode &status);
138 * Creates a Formattable object with a UnicodeString object to copy from.
142 Formattable(const UnicodeString& strToCopy);
145 * Creates a Formattable object with a UnicodeString object to adopt from.
149 Formattable(UnicodeString* strToAdopt);
152 * Creates a Formattable object with an array of Formattable objects.
153 * @param arrayToCopy the Formattable object array.
157 Formattable(const Formattable* arrayToCopy, int32_t count);
160 * Creates a Formattable object that adopts the given UObject.
164 Formattable(UObject* objectToAdopt);
170 Formattable(const Formattable&);
174 * @param rhs The Formattable object to copy into this object.
177 Formattable& operator=(const Formattable &rhs);
185 UBool operator==(const Formattable &other) const;
193 UBool operator!=(const Formattable& other) const
200 virtual ~Formattable();
213 Formattable *clone() const;
217 * Formattable object. Formattable is a union of several
273 * Gets the data type of this Formattable object.
274 * @return the data type of this Formattable object.
280 * Returns TRUE if the data type of this Formattable object
443 const Formattable* getArray(int32_t& count) const
455 const Formattable* getArray(int32_t& count, UErrorCode& status) const;
459 * Formattable object. If this object is not of type kArray then
465 Formattable& operator[](int32_t index) { return fValue.fArrayAndCount.fArray[index]; }
469 * formattable, or NULL if this object does not contain a UObject.
477 * formattable, or NULL if this object does not contain numeric type.
486 * U_INVALID_STATE if the formattable object has not been set to
542 void setArray(const Formattable* array, int32_t count);
557 void adoptArray(Formattable* array, int32_t count);
613 * NumberFormat::format(Formattable, ...
655 Formattable* fArray;
670 inline UDate Formattable::getDate(UErrorCode& status) const {
680 inline const UnicodeString& Formattable::getString(void) const {
684 inline UnicodeString& Formattable::getString(void) {
688 inline int32_t Formattable::getLong(UErrorCode* status) const {