From 6b0ef1848db10fa0186c0dd48cf6316e49da6afd Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Wed, 27 Sep 2017 18:50:44 +0000 Subject: [PATCH] ICU-13177 Windows build, add U_I18N_API to exported classes. Builds, some warnings. Tests crash. X-SVN-Rev: 40482 --- icu4c/source/i18n/number_affixutils.h | 2 +- icu4c/source/i18n/number_decimalquantity.h | 2 +- icu4c/source/i18n/number_decimfmtprops.h | 2 +- icu4c/source/i18n/number_modifiers.h | 12 ++++---- icu4c/source/i18n/number_patternmodifier.h | 4 +-- icu4c/source/i18n/number_patternstring.h | 6 ++-- icu4c/source/i18n/number_scientific.h | 4 +-- icu4c/source/i18n/number_stringbuilder.h | 2 +- icu4c/source/i18n/number_types.h | 6 ++-- icu4c/source/i18n/unicode/numberformatter.h | 32 ++++++++++----------- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/icu4c/source/i18n/number_affixutils.h b/icu4c/source/i18n/number_affixutils.h index 9f169fe3a1f..1e3c30d2719 100644 --- a/icu4c/source/i18n/number_affixutils.h +++ b/icu4c/source/i18n/number_affixutils.h @@ -89,7 +89,7 @@ class SymbolProvider { * } * */ -class AffixUtils { +class U_I18N_API AffixUtils { public: diff --git a/icu4c/source/i18n/number_decimalquantity.h b/icu4c/source/i18n/number_decimalquantity.h index dbba35bf8e7..86a5c2d56fb 100644 --- a/icu4c/source/i18n/number_decimalquantity.h +++ b/icu4c/source/i18n/number_decimalquantity.h @@ -26,7 +26,7 @@ namespace impl { * *

Java has multiple implementations for testing, but C++ has only one implementation. */ -class DecimalQuantity : public IFixedDecimal, public UMemory { +class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory { public: /** Copy constructor. */ DecimalQuantity(const DecimalQuantity &other); diff --git a/icu4c/source/i18n/number_decimfmtprops.h b/icu4c/source/i18n/number_decimfmtprops.h index e5f405aa0a1..3afd0078de9 100644 --- a/icu4c/source/i18n/number_decimfmtprops.h +++ b/icu4c/source/i18n/number_decimfmtprops.h @@ -28,7 +28,7 @@ struct CurrencyPluralInfoWrapper { } }; -struct DecimalFormatProperties { +struct U_I18N_API DecimalFormatProperties { public: NullableValue compactStyle; diff --git a/icu4c/source/i18n/number_modifiers.h b/icu4c/source/i18n/number_modifiers.h index 2701f1cf2d7..9d2f1975b9f 100644 --- a/icu4c/source/i18n/number_modifiers.h +++ b/icu4c/source/i18n/number_modifiers.h @@ -20,7 +20,7 @@ namespace impl { * The canonical implementation of {@link Modifier}, containing a prefix and suffix string. * TODO: This is not currently being used by real code and could be removed. */ -class ConstantAffixModifier : public Modifier, public UObject { +class U_I18N_API ConstantAffixModifier : public Modifier, public UObject { public: ConstantAffixModifier(const UnicodeString &prefix, const UnicodeString &suffix, Field field, bool strong) @@ -46,7 +46,7 @@ class ConstantAffixModifier : public Modifier, public UObject { * The second primary implementation of {@link Modifier}, this one consuming a {@link SimpleFormatter} * pattern. */ -class SimpleModifier : public Modifier, public UMemory { +class U_I18N_API SimpleModifier : public Modifier, public UMemory { public: SimpleModifier(const SimpleFormatter &simpleFormatter, Field field, bool strong); @@ -99,7 +99,7 @@ class SimpleModifier : public Modifier, public UMemory { * An implementation of {@link Modifier} that allows for multiple types of fields in the same modifier. Constructed * based on the contents of two {@link NumberStringBuilder} instances (one for the prefix, one for the suffix). */ -class ConstantMultiFieldModifier : public Modifier, public UMemory { +class U_I18N_API ConstantMultiFieldModifier : public Modifier, public UMemory { public: ConstantMultiFieldModifier(const NumberStringBuilder &prefix, const NumberStringBuilder &suffix, bool strong) : fPrefix(prefix), fSuffix(suffix), fStrong(strong) {} @@ -122,7 +122,7 @@ class ConstantMultiFieldModifier : public Modifier, public UMemory { }; /** Identical to {@link ConstantMultiFieldModifier}, but supports currency spacing. */ -class CurrencySpacingEnabledModifier : public ConstantMultiFieldModifier { +class U_I18N_API CurrencySpacingEnabledModifier : public ConstantMultiFieldModifier { public: /** Safe code path */ CurrencySpacingEnabledModifier(const NumberStringBuilder &prefix, const NumberStringBuilder &suffix, @@ -164,7 +164,7 @@ class CurrencySpacingEnabledModifier : public ConstantMultiFieldModifier { }; /** A Modifier that does not do anything. */ -class EmptyModifier : public Modifier, public UMemory { +class U_I18N_API EmptyModifier : public Modifier, public UMemory { public: explicit EmptyModifier(bool isStrong) : fStrong(isStrong) {} @@ -199,7 +199,7 @@ class EmptyModifier : public Modifier, public UMemory { * A ParameterizedModifier by itself is NOT a Modifier. Rather, it wraps a data structure containing two or more * Modifiers and returns the modifier appropriate for the current situation. */ -class ParameterizedModifier : public UMemory { +class U_I18N_API ParameterizedModifier : public UMemory { public: // NOTE: mods is zero-initialized (to nullptr) ParameterizedModifier() : mods() { diff --git a/icu4c/source/i18n/number_patternmodifier.h b/icu4c/source/i18n/number_patternmodifier.h index 0dd26b94c26..45f9dc352ea 100644 --- a/icu4c/source/i18n/number_patternmodifier.h +++ b/icu4c/source/i18n/number_patternmodifier.h @@ -16,7 +16,7 @@ U_NAMESPACE_BEGIN namespace number { namespace impl { -class ImmutablePatternModifier : public MicroPropsGenerator { +class U_I18N_API ImmutablePatternModifier : public MicroPropsGenerator { public: ImmutablePatternModifier(ParameterizedModifier *pm, const PluralRules *rules, const MicroPropsGenerator *parent); @@ -52,7 +52,7 @@ class ImmutablePatternModifier : public MicroPropsGenerator { * {@link MutablePatternModifier#createImmutable}, in effect treating this instance as a builder for the immutable * variant. */ -class MutablePatternModifier +class U_I18N_API MutablePatternModifier : public MicroPropsGenerator, public Modifier, public SymbolProvider, public CharSequence { public: diff --git a/icu4c/source/i18n/number_patternstring.h b/icu4c/source/i18n/number_patternstring.h index 29fd2d6edd7..03f08cdf341 100644 --- a/icu4c/source/i18n/number_patternstring.h +++ b/icu4c/source/i18n/number_patternstring.h @@ -52,7 +52,7 @@ struct ParsedSubpatternInfo { Endpoints paddingEndpoints; }; -struct ParsedPatternInfo : public AffixPatternProvider { +struct U_I18N_API ParsedPatternInfo : public AffixPatternProvider { UnicodeString pattern; ParsedSubpatternInfo positive; ParsedSubpatternInfo negative; @@ -130,7 +130,7 @@ struct ParsedPatternInfo : public AffixPatternProvider { friend class PatternParser; }; -class PatternParser { +class U_I18N_API PatternParser { public: /** * Runs the recursive descent parser on the given pattern string, returning a data structure with raw information @@ -196,7 +196,7 @@ class PatternParser { IgnoreRounding _ignoreRounding, UErrorCode &status); }; -class PatternStringUtils { +class U_I18N_API PatternStringUtils { public: /** * Creates a pattern string from a property bag. diff --git a/icu4c/source/i18n/number_scientific.h b/icu4c/source/i18n/number_scientific.h index 6b43a484a83..6bdd24aa3c3 100644 --- a/icu4c/source/i18n/number_scientific.h +++ b/icu4c/source/i18n/number_scientific.h @@ -13,7 +13,7 @@ namespace impl { // Forward-declare class ScientificHandler; -class ScientificModifier : public UMemory, public Modifier { +class U_I18N_API ScientificModifier : public UMemory, public Modifier { public: ScientificModifier(); @@ -33,7 +33,7 @@ class ScientificModifier : public UMemory, public Modifier { const ScientificHandler *fHandler; }; -class ScientificHandler : public UMemory, public MicroPropsGenerator, public MultiplierProducer { +class U_I18N_API ScientificHandler : public UMemory, public MicroPropsGenerator, public MultiplierProducer { public: ScientificHandler(const Notation *notation, const DecimalFormatSymbols *symbols, const MicroPropsGenerator *parent); diff --git a/icu4c/source/i18n/number_stringbuilder.h b/icu4c/source/i18n/number_stringbuilder.h index ea5da12ab3c..6be4959d8d4 100644 --- a/icu4c/source/i18n/number_stringbuilder.h +++ b/icu4c/source/i18n/number_stringbuilder.h @@ -16,7 +16,7 @@ U_NAMESPACE_BEGIN namespace number { namespace impl { -class NumberStringBuilder : public UMemory { +class U_I18N_API NumberStringBuilder : public UMemory { private: static const int32_t DEFAULT_CAPACITY = 40; diff --git a/icu4c/source/i18n/number_types.h b/icu4c/source/i18n/number_types.h index eaedb00ad0e..f84b6a93cad 100644 --- a/icu4c/source/i18n/number_types.h +++ b/icu4c/source/i18n/number_types.h @@ -116,7 +116,7 @@ public: virtual UnicodeString toUnicodeString() const = 0; }; -class AffixPatternProvider { +class U_I18N_API AffixPatternProvider { public: static const int32_t AFFIX_PLURAL_MASK = 0xff; static const int32_t AFFIX_PREFIX = 0x100; @@ -148,7 +148,7 @@ class AffixPatternProvider { * A Modifier is usually immutable, except in cases such as {@link MurkyModifier}, which are mutable for performance * reasons. */ -class Modifier { +class U_I18N_API Modifier { public: virtual ~Modifier() = default; @@ -208,7 +208,7 @@ class Modifier { * @author sffc * */ -class MicroPropsGenerator { +class U_I18N_API MicroPropsGenerator { public: virtual ~MicroPropsGenerator() = default; diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h index 097d47423cd..5b6719fc0fb 100644 --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@ -324,7 +324,7 @@ typedef Notation SimpleNotation; * * @draft ICU 60 */ -class Notation : public UMemory { +class U_I18N_API Notation : public UMemory { public: /** * Print the number using scientific notation (also known as scientific form, standard index form, or standard form @@ -526,7 +526,7 @@ class Notation : public UMemory { * * @draft ICU 60 */ -class ScientificNotation : public Notation { +class U_I18N_API ScientificNotation : public Notation { public: /** * Sets the minimum number of digits to show in the exponent of scientific notation, padding with zeros if @@ -576,7 +576,7 @@ typedef Rounder DigitRounder; * * @draft ICU 60 */ -class Rounder : public UMemory { +class U_I18N_API Rounder : public UMemory { public: /** @@ -889,7 +889,7 @@ class Rounder : public UMemory { * * @draft ICU 60 */ -class FractionRounder : public Rounder { +class U_I18N_API FractionRounder : public Rounder { public: /** * Ensure that no less than this number of significant digits are retained when rounding according to fraction @@ -945,7 +945,7 @@ class FractionRounder : public Rounder { * * @draft ICU 60 */ -class CurrencyRounder : public Rounder { +class U_I18N_API CurrencyRounder : public Rounder { public: /** * Associates a currency with this rounding strategy. @@ -983,7 +983,7 @@ class CurrencyRounder : public Rounder { * * @draft ICU 60 */ -class IncrementRounder : public Rounder { +class U_I18N_API IncrementRounder : public Rounder { public: /** * Specifies the minimum number of fraction digits to render after the decimal separator, padding with zeros if @@ -1012,7 +1012,7 @@ class IncrementRounder : public Rounder { /** * @internal This API is a technical preview. It is likely to change in an upcoming release. */ -class Grouper : public UMemory { +class U_I18N_API Grouper : public UMemory { public: /** * @internal This API is a technical preview. It is likely to change in an upcoming release. @@ -1065,7 +1065,7 @@ class Grouper : public UMemory { * @draft ICU 60 * @see NumberFormatter */ -class IntegerWidth : public UMemory { +class U_I18N_API IntegerWidth : public UMemory { public: /** * Pad numbers at the beginning with zeros to guarantee a certain number of numerals before the decimal separator. @@ -1149,7 +1149,7 @@ namespace impl { static uint32_t DEFAULT_THRESHOLD = 3; /** @internal */ -class SymbolsWrapper : public UMemory { +class U_I18N_API SymbolsWrapper : public UMemory { public: /** @internal */ SymbolsWrapper() : fType(SYMPTR_NONE), fPtr{nullptr} {} @@ -1227,7 +1227,7 @@ class SymbolsWrapper : public UMemory { }; /** @internal */ -class Padder : public UMemory { +class U_I18N_API Padder : public UMemory { public: /** @internal */ static Padder none(); @@ -1284,7 +1284,7 @@ class Padder : public UMemory { }; /** @internal */ -struct MacroProps : public UMemory { +struct U_I18N_API MacroProps : public UMemory { /** @internal */ Notation notation; @@ -1343,7 +1343,7 @@ struct MacroProps : public UMemory { * {@link UnlocalizedNumberFormatter} and {@link LocalizedNumberFormatter}. */ template -class NumberFormatterSettings { +class U_I18N_API NumberFormatterSettings { public: /** * Specifies the notation style (simple, scientific, or compact) for rendering numbers. @@ -1737,7 +1737,7 @@ class NumberFormatterSettings { * @see NumberFormatter * @draft ICU 60 */ -class UnlocalizedNumberFormatter +class U_I18N_API UnlocalizedNumberFormatter : public NumberFormatterSettings, public UMemory { public: @@ -1766,7 +1766,7 @@ class UnlocalizedNumberFormatter * @see NumberFormatter * @draft ICU 60 */ -class LocalizedNumberFormatter +class U_I18N_API LocalizedNumberFormatter : public NumberFormatterSettings, public UMemory { public: /** @@ -1854,7 +1854,7 @@ class LocalizedNumberFormatter * * @draft ICU 60 */ -class FormattedNumber : public UMemory { +class U_I18N_API FormattedNumber : public UMemory { public: /** * Returns a UnicodeString representation of the the formatted number. @@ -1932,7 +1932,7 @@ class FormattedNumber : public UMemory { * * @draft ICU 60 */ -class NumberFormatter final { +class U_I18N_API NumberFormatter final { public: /** * Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not currently known at