decfmtst.h 1.9 KB

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