Lines Matching defs:Formattable

22  * \brief C++ API: Formattable is a thin wrapper for primitive types used for formatting and parsing
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.
66 class U_I18N_API Formattable : public UObject {
70 * the Formattable(UDate) constructor and the Formattable(double)
83 Formattable(); // Type kLong, value 0
86 * Creates a Formattable object with a UDate instance.
91 Formattable(UDate d, ISDATE flag);
94 * Creates a Formattable object with a double number.
98 Formattable(double d);
101 * Creates a Formattable object with a long number.
105 Formattable(int32_t l);
108 * Creates a Formattable object with an int64_t number
112 Formattable(int64_t ll);
116 * Creates a Formattable object with a char string pointer.
121 Formattable(const char* strToCopy);
125 * Creates a Formattable object of an appropriate numeric type from a
126 * a decimal number in string form. The Formattable will retain the
137 Formattable(const StringPiece &number, UErrorCode &status);
140 * Creates a Formattable object with a UnicodeString object to copy from.
144 Formattable(const UnicodeString& strToCopy);
147 * Creates a Formattable object with a UnicodeString object to adopt from.
151 Formattable(UnicodeString* strToAdopt);
154 * Creates a Formattable object with an array of Formattable objects.
155 * @param arrayToCopy the Formattable object array.
159 Formattable(const Formattable* arrayToCopy, int32_t count);
162 * Creates a Formattable object that adopts the given UObject.
166 Formattable(UObject* objectToAdopt);
172 Formattable(const Formattable&);
176 * @param rhs The Formattable object to copy into this object.
179 Formattable& operator=(const Formattable &rhs);
187 UBool operator==(const Formattable &other) const;
195 UBool operator!=(const Formattable& other) const
202 virtual ~Formattable();
215 Formattable *clone() const;
219 * Formattable object. Formattable is a union of several
275 * Gets the data type of this Formattable object.
276 * @return the data type of this Formattable object.
282 * Returns TRUE if the data type of this Formattable object
445 const Formattable* getArray(int32_t& count) const
457 const Formattable* getArray(int32_t& count, UErrorCode& status) const;
461 * Formattable object. If this object is not of type kArray then
467 Formattable& operator[](int32_t index) { return fValue.fArrayAndCount.fArray[index]; }
544 void setArray(const Formattable* array, int32_t count);
559 void adoptArray(Formattable* array, int32_t count);
603 * Convert the UFormattable to a Formattable. Internally, this is a reinterpret_cast.
605 * @return the UFormattable as a Formattable object pointer. This is an alias to the original
609 static inline Formattable *fromUFormattable(UFormattable *fmt);
612 * Convert the const UFormattable to a const Formattable. Internally, this is a reinterpret_cast.
614 * @return the UFormattable as a Formattable object pointer. This is an alias to the original
618 static inline const Formattable *fromUFormattable(const UFormattable *fmt);
651 * NumberFormat::format(Formattable, ...
702 Formattable* fArray;
717 inline UDate Formattable::getDate(UErrorCode& status) const {
727 inline const UnicodeString& Formattable::getString(void) const {
731 inline UnicodeString& Formattable::getString(void) {
736 inline int32_t Formattable::getLong(UErrorCode* status) const {
742 inline UFormattable* Formattable::toUFormattable() {
746 inline const UFormattable* Formattable::toUFormattable() const {
750 inline Formattable* Formattable::fromUFormattable(UFormattable *fmt) {
751 return reinterpret_cast<Formattable *>(fmt);
754 inline const Formattable* Formattable::fromUFormattable(const UFormattable *fmt) {
755 return reinterpret_cast<const Formattable *>(fmt);