]>
Commit | Line | Data |
---|---|---|
374ca955 A |
1 | /* |
2 | ********************************************************************** | |
3 | * Copyright (c) 2004, International Business Machines | |
4 | * Corporation and others. All Rights Reserved. | |
5 | ********************************************************************** | |
6 | * Author: Alan Liu | |
7 | * Created: April 26, 2004 | |
8 | * Since: ICU 3.0 | |
9 | ********************************************************************** | |
10 | */ | |
11 | #ifndef __MEASUREUNIT_H__ | |
12 | #define __MEASUREUNIT_H__ | |
13 | ||
14 | #include "unicode/utypes.h" | |
15 | ||
16 | #if !UCONFIG_NO_FORMATTING | |
17 | ||
18 | #include "unicode/fmtable.h" | |
19 | ||
20 | U_NAMESPACE_BEGIN | |
21 | ||
22 | /** | |
23 | * A unit such as length, mass, volume, currency, etc. A unit is | |
24 | * coupled with a numeric amount to produce a Measure. | |
25 | * | |
26 | * <p>This is an abstract class. | |
27 | * | |
28 | * @author Alan Liu | |
29 | * @draft ICU 3.0 | |
30 | */ | |
31 | class U_I18N_API MeasureUnit: public UObject { | |
32 | public: | |
33 | /** | |
34 | * Return a polymorphic clone of this object. The result will | |
35 | * have the same class as returned by getDynamicClassID(). | |
36 | * @draft ICU 3.0 | |
37 | */ | |
38 | virtual UObject* clone() const = 0; | |
39 | ||
40 | /** | |
41 | * Destructor | |
42 | * @draft ICU 3.0 | |
43 | */ | |
44 | virtual ~MeasureUnit(); | |
45 | ||
46 | /** | |
47 | * Equality operator. Return true if this object is equal | |
48 | * to the given object. | |
49 | * @draft ICU 3.0 | |
50 | */ | |
51 | virtual UBool operator==(const UObject& other) const = 0; | |
52 | ||
53 | protected: | |
54 | /** | |
55 | * Default constructor. | |
56 | * @draft ICU 3.0 | |
57 | */ | |
58 | MeasureUnit(); | |
59 | }; | |
60 | ||
61 | U_NAMESPACE_END | |
62 | ||
63 | // NOTE: There is no measunit.cpp. For implementation, see measure.cpp. [alan] | |
64 | ||
65 | #endif // !UCONFIG_NO_FORMATTING | |
66 | #endif // __MEASUREUNIT_H__ |