ICU 56.1: currunit.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

currunit.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (c) 2004-2014, 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 __CURRENCYUNIT_H__
12 #define __CURRENCYUNIT_H__
13
14 #include "unicode/utypes.h"
15
16 #if !UCONFIG_NO_FORMATTING
17
18 #include "unicode/measunit.h"
19
25 U_NAMESPACE_BEGIN
26
35 class U_I18N_API CurrencyUnit: public MeasureUnit {
36 public:
45 CurrencyUnit(const UChar* isoCode, UErrorCode &ec);
46
51 CurrencyUnit(const CurrencyUnit& other);
52
57 CurrencyUnit& operator=(const CurrencyUnit& other);
58
64 virtual UObject* clone() const;
65
70 virtual ~CurrencyUnit();
71
80 virtual UClassID getDynamicClassID() const;
81
88 static UClassID U_EXPORT2 getStaticClassID();
89
94 inline const UChar* getISOCurrency() const;
95
96 private:
100 UChar isoCode[4];
101 };
102
103 inline const UChar* CurrencyUnit::getISOCurrency() const {
104 return isoCode;
105 }
106
107 U_NAMESPACE_END
108
109 #endif // !UCONFIG_NO_FORMATTING
110 #endif // __CURRENCYUNIT_H__
icu::MeasureUnit
A unit such as length, mass, volume, currency, etc.
Definition: measunit.h:36
icu::MeasureUnit::operator=
MeasureUnit & operator=(const MeasureUnit &other)
Assignment operator.
icu::MeasureUnit::getStaticClassID
static UClassID getStaticClassID(void)
Return the class ID for this class.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:91
icu::MeasureUnit::clone
virtual UObject * clone() const
Returns a polymorphic clone of this object.
icu::MeasureUnit::getDynamicClassID
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:358
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
measunit.h
C++ API: A unit for measuring a quantity.
icu::CurrencyUnit
A unit of currency, such as USD (U.S.
Definition: currunit.h:35
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:221