]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
51004dcb A |
3 | /* |
4 | ******************************************************************************** | |
57a6839d | 5 | * Copyright (C) 2012-2014, International Business Machines |
51004dcb A |
6 | * Corporation and others. All Rights Reserved. |
7 | ********************************************************************************/ | |
8 | ||
9 | #ifndef DCFMTIMP_H | |
10 | #define DCFMTIMP_H | |
11 | ||
12 | #include "unicode/utypes.h" | |
13 | ||
14 | ||
15 | #if UCONFIG_FORMAT_FASTPATHS_49 | |
16 | ||
17 | U_NAMESPACE_BEGIN | |
18 | ||
19 | enum EDecimalFormatFastpathStatus { | |
20 | kFastpathNO = 0, | |
21 | kFastpathYES = 1, | |
b331163b A |
22 | kFastpathUNKNOWN = 2, /* not yet set */ |
23 | kFastpathMAYBE = 3 /* depends on value being formatted. */ | |
51004dcb A |
24 | }; |
25 | ||
26 | /** | |
27 | * Must be smaller than DecimalFormat::fReserved | |
28 | */ | |
29 | struct DecimalFormatInternal { | |
30 | uint8_t fFastFormatStatus; | |
31 | uint8_t fFastParseStatus; | |
57a6839d A |
32 | |
33 | DecimalFormatInternal &operator=(const DecimalFormatInternal& rhs) { | |
34 | fFastParseStatus = rhs.fFastParseStatus; | |
35 | fFastFormatStatus = rhs.fFastFormatStatus; | |
36 | return *this; | |
37 | } | |
51004dcb A |
38 | #ifdef FMT_DEBUG |
39 | void dump() const { | |
40 | printf("DecimalFormatInternal: fFastFormatStatus=%c, fFastParseStatus=%c\n", | |
41 | "NY?"[(int)fFastFormatStatus&3], | |
42 | "NY?"[(int)fFastParseStatus&3] | |
43 | ); | |
44 | } | |
57a6839d | 45 | #endif |
51004dcb A |
46 | }; |
47 | ||
48 | ||
49 | ||
50 | U_NAMESPACE_END | |
51 | ||
52 | #endif | |
53 | ||
54 | #endif |