ICU 58.2 58.2

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

- File List
- Globals

currunit.h
Go to the documentation of this file.
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 **********************************************************************
5 * Copyright (c) 2004-2014, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Author: Alan Liu
9 * Created: April 26, 2004
10 * Since: ICU 3.0
11 **********************************************************************
12 */
13 #ifndef __CURRENCYUNIT_H__
14 #define __CURRENCYUNIT_H__
15
16 #include "unicode/utypes.h"
17
18 #if !UCONFIG_NO_FORMATTING
19
20 #include "unicode/measunit.h"
21
27 U_NAMESPACE_BEGIN
28
37 class U_I18N_API CurrencyUnit: public MeasureUnit {
38 public:
47 CurrencyUnit(const UChar* isoCode, UErrorCode &ec);
48
53 CurrencyUnit(const CurrencyUnit& other);
54
59 CurrencyUnit& operator=(const CurrencyUnit& other);
60
66 virtual UObject* clone() const;
67
72 virtual ~CurrencyUnit();
73
82 virtual UClassID getDynamicClassID() const;
83
90 static UClassID U_EXPORT2 getStaticClassID();
91
96 inline const UChar* getISOCurrency() const;
97
98 private:
102 UChar isoCode[4];
103 };
104
105 inline const UChar* CurrencyUnit::getISOCurrency() const {
106 return isoCode;
107 }
108
109 U_NAMESPACE_END
110
111 #endif // !UCONFIG_NO_FORMATTING
112 #endif // __CURRENCYUNIT_H__
icu::MeasureUnit
A unit such as length, mass, volume, currency, etc.
Definition: measunit.h:38
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&#39;s RTTI.
Definition: uobject.h:93
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:360
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
measunit.h
C++ API: A unit for measuring a quantity.
icu::CurrencyUnit
A unit of currency, such as USD (U.S.
Definition: currunit.h:37
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:337
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
icu::CurrencyUnit::getISOCurrency
const UChar * getISOCurrency() const
Return the ISO currency code of this object.
Definition: currunit.h:105
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223