Formattable objects can be passed to the Format class or its subclasses for formatting
Formattable objects can be passed to the Format class or its subclasses for formatting. Formattable is a thin wrapper class which interconverts between the primitive numeric types (double, long, etc.) as well as UDate and UnicodeString.Note that this is fundamentally different from the Java behavior, since in this case the various formattable objects do not occupy a hierarchy, but are all wrapped within this one class. Formattable encapsulates all the polymorphism in itself.
It would be easy to change this so that Formattable was an abstract base class of a genuine hierarchy, and that would clean up the code that currently must explicitly check for type, but that seems like overkill at this point.
Formattable(UDate d, ISDATE)
ISDATE - the flag to indicate this is a date. Formattable(double d)
Formattable(int32_t l)
Formattable(const char* strToCopy)
Formattable(const UnicodeString& stringToCopy)
Formattable(UnicodeString* stringToAdopt)
Formattable(const Formattable* arrayToCopy, int32_t count)
count - the array count. Formattable(const Formattable&)
Formattable& operator=(const Formattable&)
bool_t operator==(const Formattable&) const
virtual ~Formattable()
enum Type
Type getType(void) const
double getDouble(void) const
int32_t getLong(void) const
UDate getDate(void) const
UnicodeString& getString(UnicodeString& result) const
const Formattable* getArray(int32_t& count) const
Formattable& operator[](int32_t index)
void setDouble(double d)
void setLong(int32_t l)
void setDate(UDate d)
void setString(const UnicodeString& stringToCopy)
void setArray(const Formattable* array, int32_t count)
void adoptString(UnicodeString* stringToAdopt)
void adoptArray(Formattable* array, int32_t count)
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de