Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

format.h

00001 /*
00002 ********************************************************************************
00003 * Copyright (C) {1997-2003}, 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 
00094 class U_I18N_API Format : public UObject {
00095 public:
00096 
00100     virtual ~Format();
00101 
00110     virtual UBool operator==(const Format& other) const = 0;
00111 
00119     UBool operator!=(const Format& other) const { return !operator==(other); }
00120 
00127     virtual Format* clone() const = 0;
00128 
00139     UnicodeString& format(const Formattable& obj,
00140                           UnicodeString& appendTo,
00141                           UErrorCode& status) const;
00142 
00159     virtual UnicodeString& format(const Formattable& obj,
00160                                   UnicodeString& appendTo,
00161                                   FieldPosition& pos,
00162                                   UErrorCode& status) const = 0;
00163 
00203     virtual void parseObject(const UnicodeString& source,
00204                              Formattable& result,
00205                              ParsePosition& parse_pos) const = 0;
00206 
00219     void parseObject(const UnicodeString& source,
00220                      Formattable& result,
00221                      UErrorCode& status) const;
00222 
00235     virtual UClassID getDynamicClassID() const = 0;
00236 
00243     Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
00244 
00251     const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) const;
00252 
00253  protected:
00254     
00255     void setLocales(const ResourceBundle& res);
00256 
00257     void setLocaleIDs(const char* valid, const char* actual);
00258 
00259 protected:
00264     Format();
00265 
00269     Format(const Format&); // Does nothing; for subclasses only
00270 
00274     Format& operator=(const Format&); // Does nothing; for subclasses
00275 
00276        
00285     static void syntaxError(const UnicodeString& pattern,
00286                             int32_t pos,
00287                             UParseError& parseError);
00288 
00289  private:
00290     char actualLocale[ULOC_FULLNAME_CAPACITY];
00291     char validLocale[ULOC_FULLNAME_CAPACITY];
00292 };
00293 
00294 U_NAMESPACE_END
00295 
00296 #endif /* #if !UCONFIG_NO_FORMATTING */
00297 
00298 #endif // _FORMAT
00299 //eof

Generated on Wed May 18 17:29:14 2005 for ICU 2.8 by  doxygen 1.4.2