]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/measfmt.h
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / i18n / unicode / measfmt.h
1 /*
2 **********************************************************************
3 * Copyright (c) 2004, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Author: Alan Liu
7 * Created: April 20, 2004
8 * Since: ICU 3.0
9 **********************************************************************
10 */
11 #ifndef MEASUREFORMAT_H
12 #define MEASUREFORMAT_H
13
14 #include "unicode/utypes.h"
15
16 #if !UCONFIG_NO_FORMATTING
17
18 #include "unicode/format.h"
19
20 U_NAMESPACE_BEGIN
21
22 /**
23 * A formatter for measure objects. This is an abstract base class.
24 *
25 * <p>To format or parse a measure object, first create a formatter
26 * object using a MeasureFormat factory method. Then use that
27 * object's format and parse methods.
28 *
29 * <p>This is an abstract class.
30 *
31 * @see Format
32 * @author Alan Liu
33 * @draft ICU 3.0
34 */
35 class U_I18N_API MeasureFormat : public Format {
36
37 public:
38
39 /**
40 * Return a formatter for CurrencyAmount objects in the given
41 * locale.
42 * @param locale desired locale
43 * @param ec input-output error code
44 * @return a formatter object, or NULL upon error
45 * @draft ICU 3.0
46 */
47 static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale,
48 UErrorCode& ec);
49
50 /**
51 * Return a formatter for CurrencyAmount objects in the default
52 * locale.
53 * @param ec input-output error code
54 * @return a formatter object, or NULL upon error
55 * @draft ICU 3.0
56 */
57 static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec);
58
59 protected:
60
61 /**
62 * Default constructor.
63 * @draft ICU 3.0
64 */
65 MeasureFormat();
66 };
67
68 U_NAMESPACE_END
69
70 #endif // #if !UCONFIG_NO_FORMATTING
71 #endif // #ifndef MEASUREFORMAT_H