]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/dcfmtimp.h
ICU-531.31.tar.gz
[apple/icu.git] / icuSources / i18n / dcfmtimp.h
1 /*
2 ********************************************************************************
3 * Copyright (C) 2012-2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ********************************************************************************/
6
7 #ifndef DCFMTIMP_H
8 #define DCFMTIMP_H
9
10 #include "unicode/utypes.h"
11
12
13 #if UCONFIG_FORMAT_FASTPATHS_49
14
15 U_NAMESPACE_BEGIN
16
17 enum EDecimalFormatFastpathStatus {
18 kFastpathNO = 0,
19 kFastpathYES = 1,
20 kFastpathUNKNOWN = 2 /* not yet set */
21 };
22
23 /**
24 * Must be smaller than DecimalFormat::fReserved
25 */
26 struct DecimalFormatInternal {
27 uint8_t fFastFormatStatus;
28 uint8_t fFastParseStatus;
29
30 DecimalFormatInternal &operator=(const DecimalFormatInternal& rhs) {
31 fFastParseStatus = rhs.fFastParseStatus;
32 fFastFormatStatus = rhs.fFastFormatStatus;
33 return *this;
34 }
35 #ifdef FMT_DEBUG
36 void dump() const {
37 printf("DecimalFormatInternal: fFastFormatStatus=%c, fFastParseStatus=%c\n",
38 "NY?"[(int)fFastFormatStatus&3],
39 "NY?"[(int)fFastParseStatus&3]
40 );
41 }
42 #endif
43 };
44
45
46
47 U_NAMESPACE_END
48
49 #endif
50
51 #endif