aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/i18n/numparse_currency.h
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:16 +0300
commit1312621288956f199a5bd5342b0133d4395fa725 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/icu/i18n/numparse_currency.h
parente9d19cec64684c9c1e6b0c98297e5b895cf904fe (diff)
downloadydb-1312621288956f199a5bd5342b0133d4395fa725.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/i18n/numparse_currency.h')
-rw-r--r--contrib/libs/icu/i18n/numparse_currency.h148
1 files changed, 74 insertions, 74 deletions
diff --git a/contrib/libs/icu/i18n/numparse_currency.h b/contrib/libs/icu/i18n/numparse_currency.h
index 812c6b4b04..a94943312f 100644
--- a/contrib/libs/icu/i18n/numparse_currency.h
+++ b/contrib/libs/icu/i18n/numparse_currency.h
@@ -1,74 +1,74 @@
-// © 2018 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-
-#include "unicode/utypes.h"
-
-#if !UCONFIG_NO_FORMATTING
-#ifndef __NUMPARSE_CURRENCY_H__
-#define __NUMPARSE_CURRENCY_H__
-
-#include "numparse_types.h"
-#include "numparse_compositions.h"
-#include "charstr.h"
-#include "number_currencysymbols.h"
-#include "unicode/uniset.h"
-
-U_NAMESPACE_BEGIN namespace numparse {
-namespace impl {
-
-using ::icu::number::impl::CurrencySymbols;
-
-/**
- * Matches a currency, either a custom currency or one from the data bundle. The class is called
- * "combined" to emphasize that the currency string may come from one of multiple sources.
- *
- * Will match currency spacing either before or after the number depending on whether we are currently in
- * the prefix or suffix.
- *
- * The implementation of this class is slightly different between J and C. See #13584 for a follow-up.
- *
- * @author sffc
- */
-// Exported as U_I18N_API for tests
-class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMemory {
- public:
- CombinedCurrencyMatcher() = default; // WARNING: Leaves the object in an unusable state
-
- CombinedCurrencyMatcher(const CurrencySymbols& currencySymbols, const DecimalFormatSymbols& dfs,
- parse_flags_t parseFlags, UErrorCode& status);
-
- bool match(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const override;
-
- bool smokeTest(const StringSegment& segment) const override;
-
- UnicodeString toString() const override;
-
- private:
- UChar fCurrencyCode[4];
- UnicodeString fCurrency1;
- UnicodeString fCurrency2;
-
- bool fUseFullCurrencyData;
- UnicodeString fLocalLongNames[StandardPlural::COUNT];
-
- UnicodeString afterPrefixInsert;
- UnicodeString beforeSuffixInsert;
-
- // We could use Locale instead of CharString here, but
- // Locale has a non-trivial default constructor.
- CharString fLocaleName;
-
- // TODO: See comments in constructor in numparse_currency.cpp
- // UnicodeSet fLeadCodePoints;
-
- /** Matches the currency string without concern for currency spacing. */
- bool matchCurrency(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const;
-};
-
-
-} // namespace impl
-} // namespace numparse
-U_NAMESPACE_END
-
-#endif //__NUMPARSE_CURRENCY_H__
-#endif /* #if !UCONFIG_NO_FORMATTING */
+// © 2018 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMPARSE_CURRENCY_H__
+#define __NUMPARSE_CURRENCY_H__
+
+#include "numparse_types.h"
+#include "numparse_compositions.h"
+#include "charstr.h"
+#include "number_currencysymbols.h"
+#include "unicode/uniset.h"
+
+U_NAMESPACE_BEGIN namespace numparse {
+namespace impl {
+
+using ::icu::number::impl::CurrencySymbols;
+
+/**
+ * Matches a currency, either a custom currency or one from the data bundle. The class is called
+ * "combined" to emphasize that the currency string may come from one of multiple sources.
+ *
+ * Will match currency spacing either before or after the number depending on whether we are currently in
+ * the prefix or suffix.
+ *
+ * The implementation of this class is slightly different between J and C. See #13584 for a follow-up.
+ *
+ * @author sffc
+ */
+// Exported as U_I18N_API for tests
+class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMemory {
+ public:
+ CombinedCurrencyMatcher() = default; // WARNING: Leaves the object in an unusable state
+
+ CombinedCurrencyMatcher(const CurrencySymbols& currencySymbols, const DecimalFormatSymbols& dfs,
+ parse_flags_t parseFlags, UErrorCode& status);
+
+ bool match(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const override;
+
+ bool smokeTest(const StringSegment& segment) const override;
+
+ UnicodeString toString() const override;
+
+ private:
+ UChar fCurrencyCode[4];
+ UnicodeString fCurrency1;
+ UnicodeString fCurrency2;
+
+ bool fUseFullCurrencyData;
+ UnicodeString fLocalLongNames[StandardPlural::COUNT];
+
+ UnicodeString afterPrefixInsert;
+ UnicodeString beforeSuffixInsert;
+
+ // We could use Locale instead of CharString here, but
+ // Locale has a non-trivial default constructor.
+ CharString fLocaleName;
+
+ // TODO: See comments in constructor in numparse_currency.cpp
+ // UnicodeSet fLeadCodePoints;
+
+ /** Matches the currency string without concern for currency spacing. */
+ bool matchCurrency(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const;
+};
+
+
+} // namespace impl
+} // namespace numparse
+U_NAMESPACE_END
+
+#endif //__NUMPARSE_CURRENCY_H__
+#endif /* #if !UCONFIG_NO_FORMATTING */