}
};
-/**
- * A version of LocalPointer that allows for implicit copying.
- *
- * Inside the copy constructor, the pointer is new'd, and the resulting LocalPointer
- * adopts the new object. The original LocalPointer is unchanged and continues to own
- * its copy of the object.
- *
- * @see LocalPointer
- * @internal
- * @deprecated ICU 60 This API is a technical preview. It may change in an upcoming release.
- */
-template<typename T>
-class CopyableLocalPointer : public LocalPointer<T> {
- public:
- // Inherit constructors
- using LocalPointer<T>::LocalPointer;
-
- // Inherited constructors don't include default arguments. Define a default constructor.
- CopyableLocalPointer() : LocalPointer<T>(NULL) {};
-
- /**
- * Creates a new local pointer. This constructor calls T's copy constructor
- * and takes ownership of the new object.
- *
- * If memory allocation fails, the resulting pointer will be null.
- */
- CopyableLocalPointer(const CopyableLocalPointer<T>& other) {
- if (other.ptr == NULL) {
- LocalPointerBase<T>::ptr = NULL;
- } else {
- LocalPointerBase<T>::ptr = new T(*other.ptr);
- }
- }
-};
-
/**
* "Smart pointer" class, deletes objects via the C++ array delete[] operator.
* For most methods see the LocalPointerBase base class.
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "number_affixutils.h"
#include "unicode/utf16.h"
return tag.offset < string.length();
}
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_AFFIXPATTERNUTILS_H
-#define NUMBERFORMAT_AFFIXPATTERNUTILS_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_AFFIXUTILS_H__
+#define __NUMBER_AFFIXUTILS_H__
#include <cstdint>
#include "number_types.h"
U_NAMESPACE_END
-#endif //NUMBERFORMAT_AFFIXPATTERNUTILS_H
+#endif //__NUMBER_AFFIXUTILS_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "resource.h"
#include "number_compact.h"
#include "unicode/ustring.h"
#include "unicode/ures.h"
-#include <cstring>
-#include <charstr.h>
-#include <uresimp.h>
+#include "cstring.h"
+#include "charstr.h"
+#include "uresimp.h"
using namespace icu::number::impl;
// We already performed rounding. Do not perform it again.
micros.rounding = Rounder::constructPassThrough();
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_NUMFMTTER_COMPACT_H
-#define NUMBERFORMAT_NUMFMTTER_COMPACT_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_COMPACT_H__
+#define __NUMBER_COMPACT_H__
-#include <standardplural.h>
+#include "standardplural.h"
#include "number_types.h"
#include "unicode/unum.h"
#include "uvector.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_NUMFMTTER_COMPACT_H
+#endif //__NUMBER_COMPACT_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <uassert.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "uassert.h"
#include <cmath>
-#include <cmemory.h>
-#include <decNumber.h>
+#include "cmemory.h"
+#include "decNumber.h"
#include <limits>
#include "number_decimalquantity.h"
#include "decContext.h"
delete[] digits;
return ret;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_DECIMALQUANTITY_H
-#define NUMBERFORMAT_DECIMALQUANTITY_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_DECIMALQUANTITY_H__
+#define __NUMBER_DECIMALQUANTITY_H__
#include <cstdint>
-#include <unicode/umachine.h>
-#include <decNumber.h>
-#include <standardplural.h>
-#include <plurrule_impl.h>
+#include "unicode/umachine.h"
+#include "decNumber.h"
+#include "standardplural.h"
+#include "plurrule_impl.h"
#include "number_types.h"
U_NAMESPACE_BEGIN namespace number {
U_NAMESPACE_END
-#endif //NUMBERFORMAT_DECIMALQUANTITY_H
+#endif //__NUMBER_DECIMALQUANTITY_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "number_decimfmtprops.h"
using namespace icu::number::impl;
void DecimalFormatProperties::clear() {
compactStyle.nullify();
currency.nullify();
- currencyPluralInfo.adoptInstead(nullptr);
+ currencyPluralInfo.fPtr.adoptInstead(nullptr);
currencyUsage.nullify();
decimalPatternMatchRequired = false;
decimalSeparatorAlwaysShown = false;
bool eq = true;
eq = eq && compactStyle == other.compactStyle;
eq = eq && currency == other.currency;
- eq = eq && currencyPluralInfo.getAlias() == other.currencyPluralInfo.getAlias();
+ eq = eq && currencyPluralInfo.fPtr.getAlias() == other.currencyPluralInfo.fPtr.getAlias();
eq = eq && currencyUsage == other.currencyUsage;
eq = eq && decimalPatternMatchRequired == other.decimalPatternMatchRequired;
eq = eq && decimalSeparatorAlwaysShown == other.decimalSeparatorAlwaysShown;
eq = eq && signAlwaysShown == other.signAlwaysShown;
return eq;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_PROPERTIES_H
-#define NUMBERFORMAT_PROPERTIES_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_DECIMFMTPROPS_H__
+#define __NUMBER_DECIMFMTPROPS_H__
#include "unicode/unistr.h"
#include <cstdint>
-#include <unicode/plurrule.h>
-#include <unicode/currpinf.h>
+#include "unicode/plurrule.h"
+#include "unicode/currpinf.h"
#include "unicode/unum.h"
#include "number_types.h"
namespace number {
namespace impl {
+// TODO: Figure out a nicer way to deal with CurrencyPluralInfo.
+struct CurrencyPluralInfoWrapper {
+ LocalPointer<CurrencyPluralInfo> fPtr;
+
+ CurrencyPluralInfoWrapper() {}
+ CurrencyPluralInfoWrapper(const CurrencyPluralInfoWrapper& other) {
+ if (!other.fPtr.isNull()) {
+ fPtr.adoptInstead(new CurrencyPluralInfo(*other.fPtr));
+ }
+ }
+};
+
struct DecimalFormatProperties {
public:
NullableValue<UNumberCompactStyle> compactStyle;
NullableValue<CurrencyUnit> currency;
- CopyableLocalPointer <CurrencyPluralInfo> currencyPluralInfo;
+ CurrencyPluralInfoWrapper currencyPluralInfo;
NullableValue<UCurrencyUsage> currencyUsage;
bool decimalPatternMatchRequired;
bool decimalSeparatorAlwaysShown;
U_NAMESPACE_END
-#endif //NUMBERFORMAT_PROPERTIES_H
+#endif //__NUMBER_DECIMFMTPROPS_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <uassert.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "uassert.h"
#include "unicode/numberformatter.h"
#include "number_decimalquantity.h"
#include "number_formatimpl.h"
FormattedNumber::~FormattedNumber() {
delete fResults;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <cstring.h>
-#include <unicode/ures.h>
-#include <uresimp.h>
-#include <charstr.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "cstring.h"
+#include "unicode/ures.h"
+#include "uresimp.h"
+#include "charstr.h"
#include "number_formatimpl.h"
#include "unicode/numfmt.h"
#include "number_patternstring.h"
}
return length;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_NUMBERFORMATTERIMPL_H
-#define NUMBERFORMAT_NUMBERFORMATTERIMPL_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_FORMATIMPL_H__
+#define __NUMBER_FORMATIMPL_H__
#include "number_types.h"
#include "number_stringbuilder.h"
U_NAMESPACE_END
-#endif //NUMBERFORMAT_NUMBERFORMATTERIMPL_H
+#endif //__NUMBER_FORMATIMPL_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "unicode/numberformatter.h"
#include "number_patternstring.h"
return position >= 0 && (position % fGrouping2) == 0
&& value.getUpperDisplayMagnitude() - fGrouping1 + 1 >= (fMin2 ? 2 : 1);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "unicode/numberformatter.h"
#include "number_types.h"
#include "number_decimalquantity.h"
quantity.setIntegerLength(fUnion.minMaxInt.fMinInt, fUnion.minMaxInt.fMaxInt);
}
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <unicode/ures.h>
-#include <ureslocs.h>
-#include <charstr.h>
-#include <uresimp.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/ures.h"
+#include "ureslocs.h"
+#include "charstr.h"
+#include "uresimp.h"
#include "number_longnames.h"
#include <algorithm>
-#include <cstring.h>
+#include "cstring.h"
using namespace icu::number::impl;
micros.rounding.apply(copy, status);
micros.modOuter = &fModifiers[copy.getStandardPlural(rules)];
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_LONGNAMEHANDLER_H
-#define NUMBERFORMAT_LONGNAMEHANDLER_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_LONGNAMES_H__
+#define __NUMBER_LONGNAMES_H__
#include "unicode/uversion.h"
#include "number_utils.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_LONGNAMEHANDLER_H
+#endif //__NUMBER_LONGNAMES_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <umutex.h>
-#include <ucln_cmn.h>
-#include <ucln_in.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "umutex.h"
+#include "ucln_cmn.h"
+#include "ucln_in.h"
#include "number_modifiers.h"
using namespace icu::number::impl;
UErrorCode &status) {
return symbols.getPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, affix == SUFFIX, status);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_MODIFIERS_H
-#define NUMBERFORMAT_MODIFIERS_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_MODIFIERS_H__
+#define __NUMBER_MODIFIERS_H__
#include <algorithm>
#include <cstdint>
-#include <unicode/uniset.h>
-#include <unicode/simpleformatter.h>
-#include <standardplural.h>
+#include "unicode/uniset.h"
+#include "unicode/simpleformatter.h"
+#include "standardplural.h"
#include "number_stringbuilder.h"
#include "number_types.h"
U_NAMESPACE_END
-#endif //NUMBERFORMAT_MODIFIERS_H
+#endif //__NUMBER_MODIFIERS_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "unicode/numberformatter.h"
#include "number_types.h"
NotationUnion union_ = {settings};
return {NTN_SCIENTIFIC, union_};
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "unicode/numberformatter.h"
#include "number_types.h"
#include "number_stringbuilder.h"
return length;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <cstring.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "cstring.h"
#include "number_patternmodifier.h"
#include "unicode/dcfmtsym.h"
#include "unicode/ucurr.h"
U_ASSERT(false);
return UnicodeString();
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_MUTABLEPATTERNMODIFIER_H
-#define NUMBERFORMAT_MUTABLEPATTERNMODIFIER_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_PATTERNMODIFIER_H__
+#define __NUMBER_PATTERNMODIFIER_H__
-#include <standardplural.h>
+#include "standardplural.h"
#include "unicode/numberformatter.h"
#include "number_patternstring.h"
#include "number_types.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_MUTABLEPATTERNMODIFIER_H
+#endif //__NUMBER_PATTERNMODIFIER_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <uassert.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "uassert.h"
#include "number_patternstring.h"
#include "unicode/utf16.h"
#include "number_utils.h"
}
return output.length() - startLength;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_PATTERNPARSER_H
-#define NUMBERFORMAT_PATTERNPARSER_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_PATTERNSTRING_H__
+#define __NUMBER_PATTERNSTRING_H__
#include <cstdint>
-#include <unicode/unum.h>
-#include <unicode/unistr.h>
+#include "unicode/unum.h"
+#include "unicode/unistr.h"
#include "number_types.h"
#include "number_decimalquantity.h"
#include "number_decimfmtprops.h"
U_NAMESPACE_END
-#endif //NUMBERFORMAT_PATTERNPARSER_H
+#endif //__NUMBER_PATTERNSTRING_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <uassert.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "uassert.h"
#include "unicode/numberformatter.h"
#include "number_types.h"
#include "number_decimalquantity.h"
U_ASSERT(value.isZero());
value.setFractionLength(fUnion.fracSig.fMinSig - minInt, INT32_MAX);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_ROUNDINGUTILS_H
-#define NUMBERFORMAT_ROUNDINGUTILS_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_ROUNDINGUTILS_H__
+#define __NUMBER_ROUNDINGUTILS_H__
#include "number_types.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_ROUNDINGUTILS_H
+#endif //__NUMBER_ROUNDINGUTILS_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include <cstdlib>
#include "number_scientific.h"
#include "number_utils.h"
}
return digitsShown - magnitude - 1;
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_NUMFMTTER_SCIENTIFIC_H
-#define NUMBERFORMAT_NUMFMTTER_SCIENTIFIC_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_SCIENTIFIC_H__
+#define __NUMBER_SCIENTIFIC_H__
#include "number_types.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_NUMFMTTER_SCIENTIFIC_H
+#endif //__NUMBER_SCIENTIFIC_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "number_stringbuilder.h"
-#include <unicode/utf16.h>
-#include <uvectr32.h>
+#include "unicode/utf16.h"
+#include "uvectr32.h"
using namespace icu::number::impl;
// Give uvec to the FieldPositionIterator, which adopts it.
fpi.setData(uvec.orphan(), status);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_NUMBERSTRINGBUILDER_H
-#define NUMBERFORMAT_NUMBERSTRINGBUILDER_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_STRINGBUILDER_H__
+#define __NUMBER_STRINGBUILDER_H__
#include <cstdint>
-#include <unicode/numfmt.h>
-#include <unicode/ustring.h>
-#include <cstring>
-#include <uassert.h>
+#include "unicode/numfmt.h"
+#include "unicode/ustring.h"
+#include "cstring.h"
+#include "uassert.h"
#include "number_types.h"
U_NAMESPACE_BEGIN namespace number {
U_NAMESPACE_END
-#endif //NUMBERFORMAT_NUMBERSTRINGBUILDER_H
+#endif //__NUMBER_STRINGBUILDER_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_INTERNALS_H
-#define NUMBERFORMAT_INTERNALS_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_TYPES_H__
+#define __NUMBER_TYPES_H__
#include <cstdint>
-#include <unicode/decimfmt.h>
-#include <unicode/unum.h>
-#include <unicode/numsys.h>
+#include "unicode/decimfmt.h"
+#include "unicode/unum.h"
+#include "unicode/numsys.h"
#include "unicode/numberformatter.h"
-#include <unicode/utf16.h>
-#include <uassert.h>
+#include "unicode/utf16.h"
+#include "uassert.h"
U_NAMESPACE_BEGIN
namespace number {
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_INTERNALS_H
+#endif //__NUMBER_TYPES_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_NUMFMTTER_UTILS_H
-#define NUMBERFORMAT_NUMFMTTER_UTILS_H
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBER_UTILS_H__
+#define __NUMBER_UTILS_H__
#include "unicode/numberformatter.h"
#include "number_types.h"
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_NUMFMTTER_UTILS_H
+#endif //__NUMBER_UTILS_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
class UVector32;
+// Forward declaration for number formatting:
+namespace number {
+namespace impl {
+class NumberStringBuilder;
+}
+}
+
/**
* FieldPositionIterator returns the field ids and their start/limit positions generated
* by a call to Format::format. See Format, NumberFormat, DecimalFormat.
*/
UBool next(FieldPosition& fp);
+private:
/**
* Sets the data used by the iterator, and resets the position.
* Returns U_ILLEGAL_ARGUMENT_ERROR in status if the data is not valid
*/
void setData(UVector32 *adopt, UErrorCode& status);
-private:
friend class FieldPositionIteratorHandler;
+ friend class number::impl::NumberStringBuilder;
UVector32 *data;
int32_t pos;
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#ifndef NUMBERFORMAT_HEADERS_H
-#define NUMBERFORMAT_HEADERS_H
-
-#include <unicode/decimfmt.h>
-#include <unicode/measunit.h>
-#include <unicode/measfmt.h>
-#include <unicode/ucurr.h>
-#include <unicode/appendable.h>
-#include <unicode/nounit.h>
+#if !UCONFIG_NO_FORMATTING
+#ifndef __NUMBERFORMATTER_H__
+#define __NUMBERFORMATTER_H__
+
#include <atomic>
+#include "unicode/appendable.h"
+#include "unicode/dcfmtsym.h"
+#include "unicode/currunit.h"
+#include "unicode/fieldpos.h"
+#include "unicode/fpositer.h"
+#include "unicode/measunit.h"
+#include "unicode/nounit.h"
+#include "unicode/plurrule.h"
+#include "unicode/ucurr.h"
+#include "unicode/unum.h"
+
/**
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
* meters in <em>en-CA</em>:
} // namespace number
U_NAMESPACE_END
-#endif //NUMBERFORMAT_HEADERS_H
+#endif // __NUMBERFORMATTER_H__
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
#pragma once
#include "number_stringbuilder.h"
}
}
};
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "putilimp.h"
#include "unicode/dcfmtsym.h"
#include "numbertest.h"
assertEquals("Return value of unescape", nsb.length(), length);
return nsb.toUnicodeString();
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#define TEMP_TEST_HELPERS_NO_PRINT_PASS 1
+#if !UCONFIG_NO_FORMATTING
-#include <charstr.h>
+#include "charstr.h"
#include <cstdarg>
#include "unicode/unum.h"
#include "unicode/numberformatter.h"
assertSuccess(message + u": Safe Path", status);
assertEquals(message + u": Safe Path", expected, actual2);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "number_decimalquantity.h"
#include "math.h"
#include <cmath>
}
}
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
-#include <putilimp.h>
+#if !UCONFIG_NO_FORMATTING
+
+#include "putilimp.h"
#include "intltest.h"
#include "number_stringbuilder.h"
#include "number_modifiers.h"
debugString.append(u"]>");
assertEquals("Debug string", debugString, sb.toDebugString());
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "numbertest.h"
#include "number_patternmodifier.h"
int32_t prefixLength = mod.getPrefixLength(status);
return UnicodeString(nsb.toUnicodeString(), prefixLength, nsb.length() - prefixLength);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "numbertest.h"
#include "number_patternstring.h"
assertSuccess("Spot 1", status);
assertTrue("Should not consume negative subpattern", expected == actual);
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#if !UCONFIG_NO_FORMATTING
+
#include "putilimp.h"
#include "numbertest.h"
UnicodeString(" in string ") + a, a.charAt(i), b.charAt(i));
}
}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */