Commit Graph

49 Commits

Author SHA1 Message Date
Shane Carr
35b182767f ICU-20409 Additional refactoring of FormattedValue implementations.
- Migrates Number[Range] formatter to helper macros.
- Adds additional macros.
- Syncs docstrings between subclasses.
2019-02-15 16:50:22 -08:00
Shane Carr
8c196b6f89 ICU-20380 Adding error code to DecimalFormat::toNumberFormatter(). 2019-02-15 14:37:12 -08:00
Shane Carr
1f85e94068 ICU-13839 Adding FormattedNumber API to PluralRules.
- Makes new dependency class for PluralRules+FormattedNumber.
2019-01-28 11:46:00 -08:00
Shane Carr
db94f46377 ICU-13800 Adding clone() on [Un]LocalizedNumber[Range]Formatter.
- Returns a LocalPointer that can be converted to std::unique_ptr.
2019-01-25 15:29:21 -08:00
Shane Carr
7507f5322f ICU-13657 Adding NumberFormatter skeleton factory method with UParseError.
- Includes small fixes to StringSegment and to tests.
2019-01-24 16:33:00 -08:00
Shane Carr
c31fec6b14 ICU-13746 Removing number formatting APIs deprecated in ICU 62.
Includes both ICU4C and ICU4J.
2019-01-24 14:50:03 -08:00
Shane Carr
768b577e6a ICU-20138 Adding FormattedValue APIs in C, C++, and Java.
- Wires up FormattedNumber[Range] in applicable languages.
- Adds new header files and tests, with minor cleanup to old tests.
- Adds code to guarantee terminating NUL in FormattedNumber[Range].
- Cleanup of API docs for inherited methods in FormattedNumber[Range].
2019-01-10 17:02:49 -06:00
Shane Carr
cab92db338
ICU-20050 Fixing memory leaks in move and copy assignment in Number*Formatter. 2018-09-27 14:27:40 -07:00
Shane Carr
d4e8ed7ed0
ICU-11276 Replying to Andy review feedback. 2018-09-27 14:27:40 -07:00
Shane Carr
aa276d18f8
ICU-11276 Wiring new NumberRangeFormatterImpl code into the API. 2018-09-27 14:27:40 -07:00
Shane Carr
083fe73d6b
ICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeFormatter. 2018-09-27 14:27:39 -07:00
Shane Carr
dbd9065c69
ICU-20110 Adding const to FormattedNumber#appendTo 2018-09-27 14:27:39 -07:00
Markus Scherer
d8f9a47637 ICU-13667 update/fix/improve dependencies; better layering formatting->numberparser->numberformatter->number_representation
X-SVN-Rev: 41461
2018-05-25 17:57:30 +00:00
Shane Carr
2af33b7796 ICU-13763 Makes FieldPositionIterator offset by input string length in DecimalFormat, restoring ICU 61 behavior.
X-SVN-Rev: 41442
2018-05-23 21:08:53 +00:00
Shane Carr
d7f3471733 ICU-13757 Renaming skeleton methods fromSkeleton -> forSkeleton
X-SVN-Rev: 41393
2018-05-17 00:43:12 +00:00
Shane Carr
b347a140ec ICU-13742 Implementing number skeletons in MessageFormat.
X-SVN-Rev: 41377
2018-05-15 00:05:04 +00:00
Shane Carr
f86a35be55 ICU-13644 Returning bogus string when toSkeleton() fails.
X-SVN-Rev: 41367
2018-05-09 02:26:14 +00:00
Shane Carr
3eb414943e ICU-13662 Minor fixes after r41365.
X-SVN-Rev: 41366
2018-05-09 02:04:21 +00:00
Shane Carr
3275a9c5d3 ICU-13437 Adding makeBogusString() utility function and returning bogus strings on failed FormattedNumber toString() calls.
X-SVN-Rev: 41361
2018-05-08 21:52:26 +00:00
Shane Carr
e27cf9ce39 ICU-13677 Changing NumberFormatter rounding setting to precision and roundingMode.
X-SVN-Rev: 41330
2018-05-05 06:32:29 +00:00
Shane Carr
0a0d99ebc8 ICU-13662 Improving NumberFormatter field position method names and behavior.
X-SVN-Rev: 41313
2018-05-03 01:34:19 +00:00
Shane Carr
3d0bf4b9c7 ICU-13644 Replying to review feedback. Changing enum methods on NumberFormatter to take by value instead of const reference.
X-SVN-Rev: 41304
2018-05-02 03:49:35 +00:00
Shane Carr
215417117e ICU-13437 Adding error codes to NumberFormatter terminal methods.
X-SVN-Rev: 41296
2018-04-30 21:07:35 +00:00
Shane Carr
c13e7785c2 ICU-13725 Fixing NumberFormatter std::move test failure on MSVC.
X-SVN-Rev: 41282
2018-04-26 03:38:17 +00:00
Shane Carr
a256316990 ICU-13725 Additional MSVC compatibility fixes.
X-SVN-Rev: 41272
2018-04-25 00:39:22 +00:00
Shane Carr
607a60bc3b ICU-13393 Removing the UPRV_INCOMPLETE_CPP11_SUPPORT flag since the number formatting code is no longer isolated from the rest of ICU.
X-SVN-Rev: 41266
2018-04-23 23:02:26 +00:00
Shane Carr
e59eb48314 ICU-13634 Refactoring getPrefixSuffix methods. In ICU4C, the pattern modifier is now accessed directly. In ICU4J, they use the same detour through the pipeline code path as before with a TODO to improve to be closer to ICU4C. In addition, in both ICU4C and ICU4J, getPrefixSuffix now uses the compiled formatter when available.
X-SVN-Rev: 41258
2018-04-21 08:01:19 +00:00
Shane Carr
ce846b6b34 ICU-13678 Renaming Multiplier to Scale.
X-SVN-Rev: 41231
2018-04-14 09:45:39 +00:00
Shane Carr
2c6bf0d77e ICU-13634 Refactoring affix-getting code to avoid the need to save the micro-props. Other assorted minor changes.
X-SVN-Rev: 41216
2018-04-11 11:10:52 +00:00
Shane Carr
fe0725cd2a ICU-13678 Changing Multiplier to use decNumber instead of double, in order to fix some unit tests. Refactored call sites to use a common DecNum wrapper class with constructors for string, double, and BCD.
X-SVN-Rev: 41198
2018-04-05 21:54:04 +00:00
Shane Carr
8ea876aadb ICU-13678 Cleaning up multiplier implementation and adding public API.
X-SVN-Rev: 41188
2018-04-03 04:38:16 +00:00
Shane Carr
3a55650b8c ICU-13597 Adding initial C API for NumberFormatter. Not yet fully featured.
X-SVN-Rev: 41156
2018-03-27 01:58:26 +00:00
Shane Carr
a8f2471248 ICU-8610 Adding tests for number skeletons in C++. Adding error code handling to the setToDecNumber setter on DecimalQuantity. Refactoring char-to-uchar conversion in skeleton implementation code.
X-SVN-Rev: 41152
2018-03-24 05:46:28 +00:00
Shane Carr
c940df09e7 ICU-13644 Adds move operators and related boilerplate to NumberFormatter classes. Includes a handful of other changes made to these files on my branch for ICU-13634 .
X-SVN-Rev: 41121
2018-03-17 07:24:02 +00:00
Shane Carr
f5d2257d34 ICU-13634 Implementing localized pattern converter and other pieces.
X-SVN-Rev: 41104
2018-03-14 10:41:27 +00:00
Shane Carr
b30a6f0df1 ICU-13634 Filling in more methods in decimfmt.cpp
X-SVN-Rev: 41100
2018-03-13 10:11:36 +00:00
Shane Carr
8a50c335fa ICU-13634 Adding new field structure to DecimalFormat and wiring up constructors.
X-SVN-Rev: 41099
2018-03-13 09:25:41 +00:00
Shane Carr
c8d0e34905 ICU-13587 Changing NumberFormatter adoption methods to take non-const pointers, and updating documentation strings according to feedback.
X-SVN-Rev: 40886
2018-02-09 22:52:42 +00:00
Shane Carr
e5cc630590 ICU-13568 ICU-13400 ICU-13389 ICU-13075 NumberFormatter assorted fixes: Adding custom pattern support for currencies. Upgrading grouping API. Adding narrow currency symbol support to ICU4C and API. Fixing behavior when pattern does not have a number placeholder.
X-SVN-Rev: 40838
2018-02-06 03:08:17 +00:00
Shane Carr
4d10bf03f5 ICU-13520 Adds compound unit support to NumberFormatter.
X-SVN-Rev: 40747
2017-12-22 00:02:01 +00:00
Shane Carr
1ba7875371 ICU-13415 Setting error code in terminal NumberFormatter methods when applicable. Renaming unproposed error codes for consistency with existing error codes in utypes.h.
X-SVN-Rev: 40632
2017-10-25 01:26:48 +00:00
Norbert Runge
b96966a131 ICU-13358 No-data test fixes (cf. BRS task).
X-SVN-Rev: 40599
2017-10-06 23:11:11 +00:00
Shane Carr
25fed96c72 ICU-13093 Disabling number formatting code on AIX and z/OS due to C++11 compatibility issues.
X-SVN-Rev: 40560
2017-10-05 00:47:38 +00:00
Norbert Runge
b536a39a74 ICU-13384 Adds #include unicode/utypes.h
X-SVN-Rev: 40557
2017-10-04 22:51:06 +00:00
Shane Carr
ca350d8a82 ICU-13177 Removing public dependency on std::atomic from unicode/numberformatter.h and casting to ICU's atomic type internally.
X-SVN-Rev: 40540
2017-10-04 01:15:54 +00:00
Andy Heninger
511ebeaa92 ICU-13177 add 'using namespace icu' where needed for build with -DU_USING_ICU_NAMESPACE=0
X-SVN-Rev: 40485
2017-09-27 21:43:09 +00:00
Shane Carr
2d49e73b8a ICU-13177 Cleanup before merge to trunk.
X-SVN-Rev: 40471
2017-09-27 05:31:57 +00:00
Shane Carr
0a31ef3eb5 ICU-13177 Removing unused file number_results.h.
X-SVN-Rev: 40468
2017-09-27 03:07:35 +00:00
Shane Carr
a01fc429cb ICU-13177 Initial commit of ICU4C NumberFormatter
X-SVN-Rev: 40465
2017-09-27 00:25:20 +00:00