format.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************** 00003 * Copyright (C) {1997-2004}, 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 00026 #if !UCONFIG_NO_FORMATTING 00027 00028 #include "unicode/uobject.h" 00029 #include "unicode/unistr.h" 00030 #include "unicode/fmtable.h" 00031 #include "unicode/fieldpos.h" 00032 #include "unicode/parsepos.h" 00033 #include "unicode/parseerr.h" 00034 #include "unicode/locid.h" 00035 00036 U_NAMESPACE_BEGIN 00037 00038 class ResourceBundle; 00039 00090 class U_I18N_API Format : public UObject { 00091 public: 00092 00096 virtual ~Format(); 00097 00106 virtual UBool operator==(const Format& other) const = 0; 00107 00115 UBool operator!=(const Format& other) const { return !operator==(other); } 00116 00123 virtual Format* clone() const = 0; 00124 00135 UnicodeString& format(const Formattable& obj, 00136 UnicodeString& appendTo, 00137 UErrorCode& status) const; 00138 00155 virtual UnicodeString& format(const Formattable& obj, 00156 UnicodeString& appendTo, 00157 FieldPosition& pos, 00158 UErrorCode& status) const = 0; 00159 00199 virtual void parseObject(const UnicodeString& source, 00200 Formattable& result, 00201 ParsePosition& parse_pos) const = 0; 00202 00215 void parseObject(const UnicodeString& source, 00216 Formattable& result, 00217 UErrorCode& status) const; 00218 00231 virtual UClassID getDynamicClassID() const = 0; 00232 00239 Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; 00240 00247 const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) const; 00248 00249 protected: 00251 void setLocales(const ResourceBundle& res); 00252 00254 void setLocaleIDs(const char* valid, const char* actual); 00255 00256 protected: 00261 Format(); 00262 00266 Format(const Format&); // Does nothing; for subclasses only 00267 00271 Format& operator=(const Format&); // Does nothing; for subclasses 00272 00273 00282 static void syntaxError(const UnicodeString& pattern, 00283 int32_t pos, 00284 UParseError& parseError); 00285 00286 private: 00287 char actualLocale[ULOC_FULLNAME_CAPACITY]; 00288 char validLocale[ULOC_FULLNAME_CAPACITY]; 00289 }; 00290 00291 U_NAMESPACE_END 00292 00293 #endif /* #if !UCONFIG_NO_FORMATTING */ 00294 00295 #endif // _FORMAT 00296 //eof

Generated on Fri Jun 18 12:35:57 2004 for ICU by doxygen 1.3.7