Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

format.h

Go to the documentation of this file.
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
00091 class U_I18N_API Format : public UObject {
00092 public:
00093 
00097     virtual ~Format();
00098 
00107     virtual UBool operator==(const Format& other) const = 0;
00108 
00116     UBool operator!=(const Format& other) const { return !operator==(other); }
00117 
00124     virtual Format* clone() const = 0;
00125 
00136     UnicodeString& format(const Formattable& obj,
00137                           UnicodeString& appendTo,
00138                           UErrorCode& status) const;
00139 
00156     virtual UnicodeString& format(const Formattable& obj,
00157                                   UnicodeString& appendTo,
00158                                   FieldPosition& pos,
00159                                   UErrorCode& status) const = 0;
00160 
00200     virtual void parseObject(const UnicodeString& source,
00201                              Formattable& result,
00202                              ParsePosition& parse_pos) const = 0;
00203 
00216     void parseObject(const UnicodeString& source,
00217                      Formattable& result,
00218                      UErrorCode& status) const;
00219 
00234     virtual UClassID getDynamicClassID() const = 0;
00235 
00242     virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0;
00243 
00250     virtual const char* getLocaleInternal(ULocDataLocaleType type, UErrorCode &status) const = 0;
00251 
00252 protected:
00257     Format();
00258 
00262     Format(const Format&); // Does nothing; for subclasses only
00263 
00267     Format& operator=(const Format&); // Does nothing; for subclasses
00268 
00269        
00278     static void syntaxError(const UnicodeString& pattern,
00279                             int32_t pos,
00280                             UParseError& parseError);
00281 };
00282 
00283 U_NAMESPACE_END
00284 
00285 #endif /* #if !UCONFIG_NO_FORMATTING */
00286 
00287 #endif // _FORMAT
00288 //eof

Generated on Mon Nov 24 14:35:31 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001