Main Page | Class Hierarchy | Alphabetical List | Data Structures | 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 
00035 U_NAMESPACE_BEGIN
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 
00236     virtual UClassID getDynamicClassID() const = 0;
00237 
00238 protected:
00243     Format();
00244 
00248     Format(const Format&); // Does nothing; for subclasses only
00249 
00253     Format& operator=(const Format&); // Does nothing; for subclasses
00254 
00255        
00264     static void syntaxError(const UnicodeString& pattern,
00265                             int32_t pos,
00266                             UParseError& parseError);
00267 };
00268 
00269 U_NAMESPACE_END
00270 
00271 #endif /* #if !UCONFIG_NO_FORMATTING */
00272 
00273 #endif // _FORMAT
00274 //eof

Generated on Wed Sep 3 17:47:08 2003 for ICU 2.6 by doxygen 1.3.2