1 /* 2 ******************************************************************************* 3 * Copyright (C) 2009-2013, International Business Machines Corporation and * 4 * others. All Rights Reserved. * 5 ******************************************************************************* 6 * 7 * This file contains declarations for the class DecimalFormatStaticSets 8 * 9 * DecimalFormatStaticSets holds the UnicodeSets that are needed for lenient 10 * parsing of decimal and group separators. 11 ******************************************************************************** 12 */ 13 14 #ifndef DECFMTST_H 15 #define DECFMTST_H 16 17 #include "unicode/utypes.h" 18 19 #if !UCONFIG_NO_FORMATTING 20 21 U_NAMESPACE_BEGIN 22 23 class UnicodeSet; 24 25 26 class DecimalFormatStaticSets : public UMemory 27 { 28 public: 29 // Constructor and Destructor not for general use. 30 // Public to permit access from plain C implementation functions. 31 DecimalFormatStaticSets(UErrorCode &status); 32 ~DecimalFormatStaticSets(); 33 34 /** 35 * Return a pointer to a lazy-initialized singleton instance of this class. 36 */ 37 static const DecimalFormatStaticSets *getStaticSets(UErrorCode &status); 38 39 static const UnicodeSet *getSimilarDecimals(UChar32 decimal, UBool strictParse); 40 41 UnicodeSet *fDotEquivalents; 42 UnicodeSet *fCommaEquivalents; 43 UnicodeSet *fOtherGroupingSeparators; 44 UnicodeSet *fDashEquivalents; 45 46 UnicodeSet *fStrictDotEquivalents; 47 UnicodeSet *fStrictCommaEquivalents; 48 UnicodeSet *fStrictOtherGroupingSeparators; 49 UnicodeSet *fStrictDashEquivalents; 50 51 UnicodeSet *fDefaultGroupingSeparators; 52 UnicodeSet *fStrictDefaultGroupingSeparators; 53 54 UnicodeSet *fMinusSigns; 55 UnicodeSet *fPlusSigns; 56 private: 57 void cleanup(); 58 59 }; 60 61 62 U_NAMESPACE_END 63 64 #endif // !UCONFIG_NO_FORMATTING 65 #endif // DECFMTST_H 66