00001 /* 00002 ******************************************************************************** 00003 * Copyright © {1997-1999}, International Business Machines Corporation and others. All Rights Reserved. 00004 ******************************************************************************** 00005 * 00006 * File FORMAT.H 00007 * 00008 * Modification History: 00009 * 00010 * Date Name Description 00011 * 02/19/97 aliu Converted from java. 00012 * 03/17/97 clhuang Updated per C++ implementation. 00013 * 03/27/97 helena Updated to pass the simple test after code review. 00014 ******************************************************************************** 00015 */ 00016 // ***************************************************************************** 00017 // This file was generated from the java source file Format.java 00018 // ***************************************************************************** 00019 00020 #ifndef FORMAT_H 00021 #define FORMAT_H 00022 00023 00024 #include "unicode/utypes.h" 00025 #include "unicode/unistr.h" 00026 #include "unicode/fmtable.h" 00027 #include "unicode/fieldpos.h" 00028 #include "unicode/parsepos.h" 00029 00084 class U_I18N_API Format { 00085 public: 00086 00087 virtual ~Format(); 00088 00094 virtual UBool operator==(const Format& other) const = 0; 00095 00101 UBool operator!=(const Format& other) const { return !operator==(other); } 00102 00108 virtual Format* clone() const = 0; 00109 00120 UnicodeString& format(const Formattable& obj, 00121 UnicodeString& result, 00122 UErrorCode& status) const; 00123 00140 virtual UnicodeString& format(const Formattable& obj, 00141 UnicodeString& toAppendTo, 00142 FieldPosition& pos, 00143 UErrorCode& status) const = 0; 00144 00184 virtual void parseObject(const UnicodeString& source, 00185 Formattable& result, 00186 ParsePosition& parse_pos) const = 0; 00187 00200 void parseObject(const UnicodeString& source, 00201 Formattable& result, 00202 UErrorCode& status) const; 00203 00221 virtual UClassID getDynamicClassID() const = 0; 00222 00223 protected: 00228 Format(); 00229 00233 Format(const Format&); // Does nothing; for subclasses only 00234 00238 Format& operator=(const Format&); // Does nothing; for subclasses 00239 }; 00240 00241 #endif // _FORMAT 00242 //eof