OXIESEC PANEL
- Current Dir:
/
/
usr
/
include
/
unicode
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 06:50:42 AM
rwxr-xr-x
📄
alphaindex.h
26.27 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
appendable.h
8.43 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
basictz.h
8.84 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
brkiter.h
27.54 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
bytestream.h
9.59 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
bytestrie.h
19.26 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
bytestriebuilder.h
7.1 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
calendar.h
105.35 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
caniter.h
7.35 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
casemap.h
25.31 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
char16ptr.h
7.29 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
chariter.h
24 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
choicfmt.h
23.85 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
coleitr.h
13.7 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
coll.h
55.61 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
compactdecimalformat.h
16.58 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
curramt.h
3.69 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
currpinf.h
7.08 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
currunit.h
3.49 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
datefmt.h
40.18 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dbbi.h
1.11 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dcfmtsym.h
17.66 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
decimfmt.h
89.73 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
docmain.h
6.56 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtfmtsym.h
37.64 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtintrv.h
3.76 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtitvfmt.h
42.87 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtitvinf.h
18.46 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtptngen.h
23.72 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
dtrule.h
8.62 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
edits.h
15.54 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
enumset.h
2.05 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
errorcode.h
4.78 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
fieldpos.h
8.63 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
filteredbrk.h
5.46 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
fmtable.h
24.39 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
format.h
12.44 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
fpositer.h
3.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
gender.h
3.18 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
gregocal.h
31.57 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
icudataver.h
1.03 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
icuplug.h
11.86 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
idna.h
12.63 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
listformatter.h
4.98 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
localpointer.h
18.19 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
locdspnm.h
7.05 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
locid.h
31.4 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
measfmt.h
11.25 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
measunit.h
37.74 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
measure.h
4.26 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
messagepattern.h
33.64 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
msgfmt.h
43.16 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
normalizer2.h
33.97 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
normlzr.h
30.74 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
nounit.h
2.6 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
numberformatter.h
64.98 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
numfmt.h
47.76 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
numsys.h
6.73 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
parseerr.h
3.08 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
parsepos.h
5.45 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
platform.h
27.71 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
plurfmt.h
25.66 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
plurrule.h
18.34 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ptypes.h
3.47 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
putil.h
6.34 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
rbbi.h
27.09 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
rbnf.h
49.76 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
rbtz.h
15.47 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
regex.h
84.91 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
region.h
9.12 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
reldatefmt.h
14.3 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
rep.h
9.5 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
resbund.h
18.01 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
schriter.h
6.26 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
scientificnumberformatter.h
6.59 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
search.h
22.21 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
selfmt.h
14.24 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
simpleformatter.h
11.43 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
simpletz.h
45.24 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
smpdtfmt.h
70.09 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
sortkey.h
11.12 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
std_string.h
1015 bytes
10/19/2021 07:44:28 PM
rw-r--r--
📄
strenum.h
10.04 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
stringoptions.h
5.89 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
stringpiece.h
6.46 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
stringtriebuilder.h
15.2 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
stsearch.h
21.29 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
symtable.h
4.21 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tblcoll.h
36.4 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
timezone.h
40.83 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tmunit.h
3.29 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tmutamt.h
4.8 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tmutfmt.h
7.79 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
translit.h
54.53 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tzfmt.h
42.81 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tznames.h
16.79 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tzrule.h
35.32 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
tztrans.h
6.07 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ubidi.h
89.28 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ubiditransform.h
12.71 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ubrk.h
24.08 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucal.h
54.56 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucasemap.h
15.18 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucat.h
5.36 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uchar.h
131.61 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucharstrie.h
21.06 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucharstriebuilder.h
7.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uchriter.h
13.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uclean.h
11.24 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucnv.h
83.06 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucnv_cb.h
6.59 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucnv_err.h
20.98 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucnvsel.h
6.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucol.h
61.36 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucoleitr.h
9.46 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uconfig.h
11.91 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucsdet.h
14.67 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ucurr.h
15.15 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
udat.h
60.13 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
udata.h
15.53 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
udateintervalformat.h
6.79 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
udatpg.h
24.11 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
udisplaycontext.h
5.89 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uenum.h
7.9 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ufieldpositer.h
4.36 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uformattable.h
10.94 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ugender.h
2 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uidna.h
33.37 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uiter.h
22.77 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uldnames.h
10.45 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ulistformatter.h
4.54 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uloc.h
50.75 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ulocdata.h
11.26 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
umachine.h
13.1 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
umisc.h
1.33 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
umsg.h
24.23 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unifilt.h
3.63 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unifunct.h
3.98 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unimatch.h
6.04 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unirepl.h
3.32 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uniset.h
63.98 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unistr.h
175.65 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unorm.h
20.45 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unorm2.h
24.66 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unum.h
52.49 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
unumsys.h
7.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uobject.h
10.72 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
upluralrules.h
6.77 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uregex.h
72.05 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uregion.h
9.84 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ureldatefmt.h
12.22 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
urename.h
124.49 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
urep.h
5.38 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ures.h
36.52 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uscript.h
25.91 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
usearch.h
38.14 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uset.h
39.91 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
usetiter.h
9.49 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ushape.h
18 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uspoof.h
64.9 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
usprep.h
8.13 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ustdio.h
38.54 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ustream.h
1.8 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ustring.h
72.52 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
ustringtrie.h
3.15 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utext.h
58.11 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utf.h
7.86 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utf16.h
22.49 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utf32.h
763 bytes
10/19/2021 07:44:28 PM
rw-r--r--
📄
utf8.h
28.16 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utf_old.h
43.78 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utmscale.h
13.78 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utrace.h
13.89 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utrans.h
25.53 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
utypes.h
29.92 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uvernum.h
5.69 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
uversion.h
6.4 KB
10/19/2021 07:44:28 PM
rw-r--r--
📄
vtzone.h
20.17 KB
10/19/2021 07:44:28 PM
rw-r--r--
Editing: dcfmtsym.h
Close
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************** * Copyright (C) 1997-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************** * * File DCFMTSYM.H * * Modification History: * * Date Name Description * 02/19/97 aliu Converted from java. * 03/18/97 clhuang Updated per C++ implementation. * 03/27/97 helena Updated to pass the simple test after code review. * 08/26/97 aliu Added currency/intl currency symbol support. * 07/22/98 stephen Changed to match C++ style * currencySymbol -> fCurrencySymbol * Constants changed from CAPS to kCaps * 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes * 09/22/00 grhoten Marked deprecation tags with a pointer to replacement * functions. ******************************************************************************** */ #ifndef DCFMTSYM_H #define DCFMTSYM_H #include "unicode/utypes.h" #include "unicode/uchar.h" #if !UCONFIG_NO_FORMATTING #include "unicode/uobject.h" #include "unicode/locid.h" #include "unicode/numsys.h" #include "unicode/unum.h" #include "unicode/unistr.h" /** * \file * \brief C++ API: Symbols for formatting numbers. */ U_NAMESPACE_BEGIN /** * This class represents the set of symbols needed by DecimalFormat * to format numbers. DecimalFormat creates for itself an instance of * DecimalFormatSymbols from its locale data. If you need to change any * of these symbols, you can get the DecimalFormatSymbols object from * your DecimalFormat and modify it. * <P> * Here are the special characters used in the parts of the * subpattern, with notes on their usage. * <pre> * \code * Symbol Meaning * 0 a digit * # a digit, zero shows as absent * . placeholder for decimal separator * , placeholder for grouping separator. * ; separates formats. * - default negative prefix. * % divide by 100 and show as percentage * X any other characters can be used in the prefix or suffix * ' used to quote special characters in a prefix or suffix. * \endcode * </pre> * [Notes] * <P> * If there is no explicit negative subpattern, - is prefixed to the * positive form. That is, "0.00" alone is equivalent to "0.00;-0.00". * <P> * The grouping separator is commonly used for thousands, but in some * countries for ten-thousands. The interval is a constant number of * digits between the grouping characters, such as 100,000,000 or 1,0000,0000. * If you supply a pattern with multiple grouping characters, the interval * between the last one and the end of the integer is the one that is * used. So "#,##,###,####" == "######,####" == "##,####,####". * <P> * This class only handles localized digits where the 10 digits are * contiguous in Unicode, from 0 to 9. Other digits sets (such as * superscripts) would need a different subclass. */ class U_I18N_API DecimalFormatSymbols : public UObject { public: /** * Constants for specifying a number format symbol. * @stable ICU 2.0 */ enum ENumberFormatSymbol { /** The decimal separator */ kDecimalSeparatorSymbol, /** The grouping separator */ kGroupingSeparatorSymbol, /** The pattern separator */ kPatternSeparatorSymbol, /** The percent sign */ kPercentSymbol, /** Zero*/ kZeroDigitSymbol, /** Character representing a digit in the pattern */ kDigitSymbol, /** The minus sign */ kMinusSignSymbol, /** The plus sign */ kPlusSignSymbol, /** The currency symbol */ kCurrencySymbol, /** The international currency symbol */ kIntlCurrencySymbol, /** The monetary separator */ kMonetarySeparatorSymbol, /** The exponential symbol */ kExponentialSymbol, /** Per mill symbol - replaces kPermillSymbol */ kPerMillSymbol, /** Escape padding character */ kPadEscapeSymbol, /** Infinity symbol */ kInfinitySymbol, /** Nan symbol */ kNaNSymbol, /** Significant digit symbol * @stable ICU 3.0 */ kSignificantDigitSymbol, /** The monetary grouping separator * @stable ICU 3.6 */ kMonetaryGroupingSeparatorSymbol, /** One * @stable ICU 4.6 */ kOneDigitSymbol, /** Two * @stable ICU 4.6 */ kTwoDigitSymbol, /** Three * @stable ICU 4.6 */ kThreeDigitSymbol, /** Four * @stable ICU 4.6 */ kFourDigitSymbol, /** Five * @stable ICU 4.6 */ kFiveDigitSymbol, /** Six * @stable ICU 4.6 */ kSixDigitSymbol, /** Seven * @stable ICU 4.6 */ kSevenDigitSymbol, /** Eight * @stable ICU 4.6 */ kEightDigitSymbol, /** Nine * @stable ICU 4.6 */ kNineDigitSymbol, /** Multiplication sign. * @stable ICU 54 */ kExponentMultiplicationSymbol, /** count symbol constants */ kFormatSymbolCount = kNineDigitSymbol + 2 }; /** * Create a DecimalFormatSymbols object for the given locale. * * @param locale The locale to get symbols for. * @param status Input/output parameter, set to success or * failure code upon return. * @stable ICU 2.0 */ DecimalFormatSymbols(const Locale& locale, UErrorCode& status); #ifndef U_HIDE_DRAFT_API /** * Creates a DecimalFormatSymbols instance for the given locale with digits and symbols * corresponding to the given NumberingSystem. * * This constructor behaves equivalently to the normal constructor called with a locale having a * "numbers=xxxx" keyword specifying the numbering system by name. * * In this constructor, the NumberingSystem argument will be used even if the locale has its own * "numbers=xxxx" keyword. * * @param locale The locale to get symbols for. * @param ns The numbering system. * @param status Input/output parameter, set to success or * failure code upon return. * @draft ICU 60 */ DecimalFormatSymbols(const Locale& locale, const NumberingSystem& ns, UErrorCode& status); #endif /* U_HIDE_DRAFT_API */ /** * Create a DecimalFormatSymbols object for the default locale. * This constructor will not fail. If the resource file data is * not available, it will use hard-coded last-resort data and * set status to U_USING_FALLBACK_ERROR. * * @param status Input/output parameter, set to success or * failure code upon return. * @stable ICU 2.0 */ DecimalFormatSymbols(UErrorCode& status); /** * Creates a DecimalFormatSymbols object with last-resort data. * Intended for callers who cache the symbols data and * set all symbols on the resulting object. * * The last-resort symbols are similar to those for the root data, * except that the grouping separators are empty, * the NaN symbol is U+FFFD rather than "NaN", * and the CurrencySpacing patterns are empty. * * @param status Input/output parameter, set to success or * failure code upon return. * @return last-resort symbols * @stable ICU 52 */ static DecimalFormatSymbols* createWithLastResortData(UErrorCode& status); /** * Copy constructor. * @stable ICU 2.0 */ DecimalFormatSymbols(const DecimalFormatSymbols&); /** * Assignment operator. * @stable ICU 2.0 */ DecimalFormatSymbols& operator=(const DecimalFormatSymbols&); /** * Destructor. * @stable ICU 2.0 */ virtual ~DecimalFormatSymbols(); /** * Return true if another object is semantically equal to this one. * * @param other the object to be compared with. * @return true if another object is semantically equal to this one. * @stable ICU 2.0 */ UBool operator==(const DecimalFormatSymbols& other) const; /** * Return true if another object is semantically unequal to this one. * * @param other the object to be compared with. * @return true if another object is semantically unequal to this one. * @stable ICU 2.0 */ UBool operator!=(const DecimalFormatSymbols& other) const { return !operator==(other); } /** * Get one of the format symbols by its enum constant. * Each symbol is stored as a string so that graphemes * (characters with modifier letters) can be used. * * @param symbol Constant to indicate a number format symbol. * @return the format symbols by the param 'symbol' * @stable ICU 2.0 */ inline UnicodeString getSymbol(ENumberFormatSymbol symbol) const; /** * Set one of the format symbols by its enum constant. * Each symbol is stored as a string so that graphemes * (characters with modifier letters) can be used. * * @param symbol Constant to indicate a number format symbol. * @param value value of the format symbol * @param propogateDigits If false, setting the zero digit will not automatically set 1-9. * The default behavior is to automatically set 1-9 if zero is being set and the value * it is being set to corresponds to a known Unicode zero digit. * @stable ICU 2.0 */ void setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits); /** * Returns the locale for which this object was constructed. * @stable ICU 2.6 */ inline Locale getLocale() const; /** * Returns the locale for this object. Two flavors are available: * valid and actual locale. * @stable ICU 2.8 */ Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const; /** * Get pattern string for 'CurrencySpacing' that can be applied to * currency format. * This API gets the CurrencySpacing data from ResourceBundle. The pattern can * be empty if there is no data from current locale and its parent locales. * * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. * @param beforeCurrency : true if the pattern is for before currency symbol. * false if the pattern is for after currency symbol. * @param status: Input/output parameter, set to success or * failure code upon return. * @return pattern string for currencyMatch, surroundingMatch or spaceInsert. * Return empty string if there is no data for this locale and its parent * locales. * @stable ICU 4.8 */ const UnicodeString& getPatternForCurrencySpacing(UCurrencySpacing type, UBool beforeCurrency, UErrorCode& status) const; /** * Set pattern string for 'CurrencySpacing' that can be applied to * currency format. * * @param type : UNUM_CURRENCY_MATCH, UNUM_CURRENCY_SURROUNDING_MATCH or UNUM_CURRENCY_INSERT. * @param beforeCurrency : true if the pattern is for before currency symbol. * false if the pattern is for after currency symbol. * @param pattern : pattern string to override current setting. * @stable ICU 4.8 */ void setPatternForCurrencySpacing(UCurrencySpacing type, UBool beforeCurrency, const UnicodeString& pattern); /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * * @stable ICU 2.2 */ virtual UClassID getDynamicClassID() const; /** * ICU "poor man's RTTI", returns a UClassID for this class. * * @stable ICU 2.2 */ static UClassID U_EXPORT2 getStaticClassID(); private: DecimalFormatSymbols(); /** * Initializes the symbols from the LocaleElements resource bundle. * Note: The organization of LocaleElements badly needs to be * cleaned up. * * @param locale The locale to get symbols for. * @param success Input/output parameter, set to success or * failure code upon return. * @param useLastResortData determine if use last resort data * @param ns The NumberingSystem to use; otherwise, fall * back to the locale. */ void initialize(const Locale& locale, UErrorCode& success, UBool useLastResortData = FALSE, const NumberingSystem* ns = nullptr); /** * Initialize the symbols with default values. */ void initialize(); void setCurrencyForSymbols(); public: #ifndef U_HIDE_INTERNAL_API /** * @internal For ICU use only */ inline UBool isCustomCurrencySymbol() const { return fIsCustomCurrencySymbol; } /** * @internal For ICU use only */ inline UBool isCustomIntlCurrencySymbol() const { return fIsCustomIntlCurrencySymbol; } #endif /* U_HIDE_INTERNAL_API */ /** * _Internal_ function - more efficient version of getSymbol, * returning a const reference to one of the symbol strings. * The returned reference becomes invalid when the symbol is changed * or when the DecimalFormatSymbols are destroyed. * ### TODO markus 2002oct11: Consider proposing getConstSymbol() to be really public. * Note: moved #ifndef U_HIDE_INTERNAL_API after this, since this is needed for inline in DecimalFormat * * @param symbol Constant to indicate a number format symbol. * @return the format symbol by the param 'symbol' * @internal */ inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const; #ifndef U_HIDE_INTERNAL_API /** * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API. * @internal */ inline const char16_t* getCurrencyPattern(void) const; #endif /* U_HIDE_INTERNAL_API */ private: /** * Private symbol strings. * They are either loaded from a resource bundle or otherwise owned. * setSymbol() clones the symbol string. * Readonly aliases can only come from a resource bundle, so that we can always * use fastCopyFrom() with them. * * If DecimalFormatSymbols becomes subclassable and the status of fSymbols changes * from private to protected, * or when fSymbols can be set any other way that allows them to be readonly aliases * to non-resource bundle strings, * then regular UnicodeString copies must be used instead of fastCopyFrom(). * * @internal */ UnicodeString fSymbols[kFormatSymbolCount]; /** * Non-symbol variable for getConstSymbol(). Always empty. * @internal */ UnicodeString fNoSymbol; Locale locale; char actualLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY]; const char16_t* currPattern; UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT]; UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT]; UBool fIsCustomCurrencySymbol; UBool fIsCustomIntlCurrencySymbol; }; // ------------------------------------- inline UnicodeString DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const { const UnicodeString *strPtr; if(symbol < kFormatSymbolCount) { strPtr = &fSymbols[symbol]; } else { strPtr = &fNoSymbol; } return *strPtr; } // See comments above for this function. Not hidden with #ifndef U_HIDE_INTERNAL_API inline const UnicodeString & DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { const UnicodeString *strPtr; if(symbol < kFormatSymbolCount) { strPtr = &fSymbols[symbol]; } else { strPtr = &fNoSymbol; } return *strPtr; } // ------------------------------------- inline void DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) { if (symbol == kCurrencySymbol) { fIsCustomCurrencySymbol = TRUE; } else if (symbol == kIntlCurrencySymbol) { fIsCustomIntlCurrencySymbol = TRUE; } if(symbol<kFormatSymbolCount) { fSymbols[symbol]=value; } // If the zero digit is being set to a known zero digit according to Unicode, // then we automatically set the corresponding 1-9 digits if ( propogateDigits && symbol == kZeroDigitSymbol && value.countChar32() == 1 ) { UChar32 sym = value.char32At(0); if ( u_charDigitValue(sym) == 0 ) { for ( int8_t i = 1 ; i<= 9 ; i++ ) { sym++; fSymbols[(int)kOneDigitSymbol+i-1] = UnicodeString(sym); } } } } // ------------------------------------- inline Locale DecimalFormatSymbols::getLocale() const { return locale; } #ifndef U_HIDE_INTERNAL_API inline const char16_t* DecimalFormatSymbols::getCurrencyPattern() const { return currPattern; } #endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // _DCFMTSYM //eof