]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/dcfmtimp.h
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / dcfmtimp.h
CommitLineData
51004dcb
A
1/*
2********************************************************************************
57a6839d 3* Copyright (C) 2012-2014, International Business Machines
51004dcb
A
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
15U_NAMESPACE_BEGIN
16
17enum EDecimalFormatFastpathStatus {
18 kFastpathNO = 0,
19 kFastpathYES = 1,
b331163b
A
20 kFastpathUNKNOWN = 2, /* not yet set */
21 kFastpathMAYBE = 3 /* depends on value being formatted. */
51004dcb
A
22};
23
24/**
25 * Must be smaller than DecimalFormat::fReserved
26 */
27struct DecimalFormatInternal {
28 uint8_t fFastFormatStatus;
29 uint8_t fFastParseStatus;
57a6839d
A
30
31 DecimalFormatInternal &operator=(const DecimalFormatInternal& rhs) {
32 fFastParseStatus = rhs.fFastParseStatus;
33 fFastFormatStatus = rhs.fFastFormatStatus;
34 return *this;
35 }
51004dcb
A
36#ifdef FMT_DEBUG
37 void dump() const {
38 printf("DecimalFormatInternal: fFastFormatStatus=%c, fFastParseStatus=%c\n",
39 "NY?"[(int)fFastFormatStatus&3],
40 "NY?"[(int)fFastParseStatus&3]
41 );
42 }
57a6839d 43#endif
51004dcb
A
44};
45
46
47
48U_NAMESPACE_END
49
50#endif
51
52#endif