/external/icu/icu4c/source/i18n/ |
D | fmtable.cpp | 39 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Formattable) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument 76 static Formattable* createArrayCopy(const Formattable* array, int32_t count) { in createArrayCopy() 77 Formattable *result = new Formattable[count]; in createArrayCopy() 100 void Formattable::init() { in init() 112 Formattable::Formattable() { in Formattable() function in Formattable 119 Formattable::Formattable(UDate date, ISDATE /*isDate*/) in Formattable() function in Formattable 129 Formattable::Formattable(double value) in Formattable() function in Formattable 139 Formattable::Formattable(int32_t value) in Formattable() function in Formattable 148 Formattable::Formattable(int64_t value) in Formattable() function in Formattable 158 Formattable::Formattable(const StringPiece &number, UErrorCode &status) { in Formattable() function in Formattable [all …]
|
D | umsg.cpp | 43 static const Formattable::Type* getArgTypeList(const MessageFormat& m, 49 const Formattable::Type* 406 const Formattable::Type* argTypes = in umsg_vformat() 410 Formattable* args = new Formattable[count ? count : 1]; in umsg_vformat() 421 case Formattable::kDate: in umsg_vformat() 426 case Formattable::kDouble: in umsg_vformat() 431 case Formattable::kLong: in umsg_vformat() 436 case Formattable::kInt64: in umsg_vformat() 441 case Formattable::kString: in umsg_vformat() 451 case Formattable::kArray: in umsg_vformat() [all …]
|
D | msgfmt.cpp | 201 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) { in formatAndAppend() 208 void formatAndAppend(const Format* formatter, const Formattable& arg, in formatAndAppend() 355 Formattable::Type* a = (Formattable::Type*) in allocateArgTypes() 869 MessageFormat::format(const Formattable* source, in format() 885 const Formattable* arguments, in format() 900 MessageFormat::format(const Formattable& source, in format() 907 if (source.getType() != Formattable::kArray) { in format() 912 const Formattable* tmpPtr = source.getArray(cnt); in format() 918 const Formattable* arguments, in format() 926 const Formattable* MessageFormat::getArgFromListByName(const Formattable* arguments, in getArgFromListByName() [all …]
|
D | quantityformatter.h | 25 class Formattable; variable 103 const Formattable &number, 114 const Formattable &number,
|
D | quantityformatter.cpp | 114 const Formattable &number, in format() 140 const Formattable &number, in selectPlural() 160 if (number.getType() == Formattable::kDouble) { in selectPlural() 162 } else if (number.getType() == Formattable::kLong) { in selectPlural() 164 } else if (number.getType() == Formattable::kInt64) { in selectPlural()
|
D | numfmt.cpp | 457 Formattable f; in format() 476 const Formattable* num; 481 ArgExtractor(const NumberFormat& nf, const Formattable& obj, UErrorCode& status); 484 const Formattable* number(void) const; 489 inline const Formattable* 504 ArgExtractor::ArgExtractor(const NumberFormat& /*nf*/, const Formattable& obj, UErrorCode& /*status… in ArgExtractor() 558 NumberFormat::format(const Formattable& obj, in format() 566 const Formattable *n = arg.number(); in format() 590 case Formattable::kDouble: in format() 593 case Formattable::kLong: in format() [all …]
|
D | datefmt.cpp | 195 DateFormat::format(const Formattable& obj, in format() 206 case Formattable::kDate: in format() 209 case Formattable::kDouble: in format() 212 case Formattable::kLong: in format() 230 DateFormat::format(const Formattable& obj, in format() 241 case Formattable::kDate: in format() 244 case Formattable::kDouble: in format() 247 case Formattable::kLong: in format() 379 Formattable& result, in parseObject()
|
/external/icu/icu4c/source/i18n/unicode/ |
D | fmtable.h | 66 class U_I18N_API Formattable : public UObject { 83 Formattable(); // Type kLong, value 0 91 Formattable(UDate d, ISDATE flag); 98 Formattable(double d); 105 Formattable(int32_t l); 112 Formattable(int64_t ll); 121 Formattable(const char* strToCopy); 137 Formattable(const StringPiece &number, UErrorCode &status); 144 Formattable(const UnicodeString& strToCopy); 151 Formattable(UnicodeString* strToAdopt); [all …]
|
D | msgfmt.h | 644 UnicodeString& format(const Formattable* source, 668 const Formattable* arguments, 693 virtual UnicodeString& format(const Formattable& obj, 717 const Formattable* arguments, 734 virtual Formattable* parse(const UnicodeString& source, 753 virtual Formattable* parse(const UnicodeString& source, 770 Formattable& result, 896 Formattable::Type* argTypes; 947 UnicodeString& format(const Formattable* arguments, 973 const Formattable* arguments, [all …]
|
D | format.h | 139 UnicodeString& format(const Formattable& obj, 159 virtual UnicodeString& format(const Formattable& obj, 179 virtual UnicodeString& format(const Formattable& obj, 224 Formattable& result, 240 Formattable& result,
|
D | measure.h | 53 Measure(const Formattable& number, MeasureUnit* adoptedUnit, 94 inline const Formattable& getNumber() const; 139 Formattable number; 148 inline const Formattable& Measure::getNumber() const { in getNumber()
|
/external/icu/icu4c/source/test/intltest/ |
D | tfsmalls.cpp | 166 Formattable* ftp = new Formattable(); in test_Formattable() 167 if (!ftp || !(ftp->getType() == Formattable::kLong) || !(ftp->getLong() == 0)) { in test_Formattable() 172 Formattable fta, ftb; in test_Formattable() 194 if ((fta.getType() == Formattable::kDouble) && (fta.getDouble() == 3.0)) { in test_Formattable() 205 if ((fta.getType() == Formattable::kDate) && (fta.getDate() == 4.0)) { in test_Formattable() 225 const Formattable ftc(fta); in test_Formattable() 230 t = (fta.getType() == Formattable::kString) in test_Formattable() 249 const Formattable ftarray[] = in test_Formattable() 251 Formattable( 1.0, Formattable::kIsDate ), in test_Formattable() 258 Formattable ft_arr( ftarray, ft_cnt ); in test_Formattable() [all …]
|
D | tmsgfmt.cpp | 140 Formattable result; in testBug3() 199 std::ostream& operator<<(std::ostream& stream, const Formattable& obj); 207 const Formattable& obj) 213 case Formattable::kDate : 220 case Formattable::kDouble : 225 case Formattable::kLong : 228 case Formattable::kString: 231 case Formattable::kArray: 233 const Formattable* array; 249 Formattable testArgs[] = { in PatternTest() [all …]
|
D | msfmrgts.cpp | 97 Formattable params [] = { in Test4074764() 98 Formattable(UnicodeString("BUG")), in Test4074764() 99 Formattable(0, Formattable::kIsDate) in Test4074764() 192 Formattable params []= { in Test4031438() 193 Formattable((int32_t)7) in Test4031438() 203 Formattable *objs = messageFormatter->parse(tempBuffer, pp, count); in Test4031438() 213 Formattable obj = objs[i]; in Test4031438() 215 if(obj.getType() == Formattable::kString) in Test4031438() 220 case Formattable::kLong: fmt->format(obj.getLong(), temp); break; in Test4031438() 221 case Formattable::kInt64: fmt->format(obj.getInt64(), temp); break; in Test4031438() [all …]
|
D | numfmtst.h | 218 UBool testFormattableAsUFormattable(const char *file, int line, Formattable &f); 222 static UBool equalValue(const Formattable& a, const Formattable& b); 230 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 232 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 234 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2() 238 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec); 240 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2() 244 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n); 246 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect() 250 void expect(NumberFormat& fmt, const Formattable& n, [all …]
|
D | nmfmtrt.h | 41 void test(NumberFormat *fmt, const Formattable& value); 44 static double proportionalError(const Formattable& a, const Formattable& b); 45 static UnicodeString& typeOf(const Formattable& n, UnicodeString& result); 49 isDouble(const Formattable& n) in isDouble() 50 { return (n.getType() == Formattable::kDouble); } in isDouble() 53 isLong(const Formattable& n) in isLong() 54 { return (n.getType() == Formattable::kLong); } in isLong()
|
D | tsnmfmt.cpp | 20 static const char * formattableTypeName(Formattable::Type t) in formattableTypeName() 23 case Formattable::kDate: return "kDate"; in formattableTypeName() 24 case Formattable::kDouble: return "kDouble"; in formattableTypeName() 25 case Formattable::kLong: return "kLong"; in formattableTypeName() 26 case Formattable::kString: return "kString"; in formattableTypeName() 27 case Formattable::kArray: return "kArray"; in formattableTypeName() 28 case Formattable::kInt64: return "kInt64"; in formattableTypeName() 285 Formattable number[DEPTH]; in tryIt() 309 if (number[i].getType() == Formattable::kLong) in tryIt() 311 else if (number[i].getType() == Formattable::kInt64) in tryIt() [all …]
|
D | nmfmtrt.cpp | 220 test(fmt, Formattable(value)); in test() 226 test(fmt, Formattable(value)); in test() 230 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) in test() 244 Formattable n; in test() 292 … escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong()) in test() 299 NumberFormatRoundTripTest::proportionalError(const Formattable& a, const Formattable& b) in proportionalError() 321 NumberFormatRoundTripTest::typeOf(const Formattable& n, UnicodeString& result) in typeOf() 323 if(n.getType() == Formattable::kLong) { in typeOf() 326 else if(n.getType() == Formattable::kDouble) { in typeOf() 329 else if(n.getType() == Formattable::kString) { in typeOf()
|
D | numfmtst.cpp | 384 Formattable result; in isParsePass() 440 Formattable resultFormattable(currAmt->getNumber()); in isParseCurrencyPass() 605 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI() 643 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument 647 Formattable& , in parse() argument 650 Formattable& , in parse() argument 834 Formattable af; in TestExponential() 838 if (af.getType() == Formattable::kLong) in TestExponential() 840 else if (af.getType() == Formattable::kDouble) { in TestExponential() 882 Formattable af; in TestExponential() [all …]
|
D | dcfmtest.cpp | 158 static const char *formattableType(Formattable::Type typ) { in formattableType() 167 if (typ<0 || typ>Formattable::kObject) { in formattableType() 326 Formattable result; in execParseTest() 346 Formattable::Type expectType = Formattable::kDate; in execParseTest() 348 case 'd': expectType = Formattable::kDouble; break; in execParseTest() 349 case 'i': expectType = Formattable::kLong; break; in execParseTest() 350 case 'l': expectType = Formattable::kInt64; break; in execParseTest() 430 Formattable fmtbl; in execFormatTest()
|
D | dtfmapts.cpp | 162 Formattable fD(d, Formattable::kIsDate); in testAPI() 187 Formattable result1; in testAPI() 191 if(result1.getType() != Formattable::kDate) { in testAPI() 284 Formattable dateObj(0, Formattable::kIsDate); in TestNameHiding() 285 Formattable numObj(3.1415926535897932384626433832795); in TestNameHiding() 286 Formattable obj; in TestNameHiding()
|
D | numrgts.cpp | 40 virtual UnicodeString& format(const Formattable& obj, in format() 64 Formattable& result, in parse() 71 Formattable& result, in parse() 420 Formattable result; in assignFloatValue() 423 float floatResult = (float) (result.getType() == Formattable::kDouble in assignFloatValue() 443 Formattable result; in Test4059870() 597 Formattable d; in Test4068693() 752 Formattable d2; in Test4095713() 1337 Formattable num; in Test4052223() 1428 Formattable num; in Test4108738() [all …]
|
D | tchcfmt.cpp | 53 Formattable f; in TestSimpleExample() 171 Formattable testArgs[] = {(int32_t)0, "Disk_A", (int32_t)0}; in TestComplexExample() 209 testArgs[0] = Formattable((int32_t)i); in TestComplexExample() 275 testArgs[0] = Formattable((int32_t)i); in TestComplexExample() 391 Formattable ft( (int32_t)3 ); in TestComplexExample() 405 Formattable fta[] = { (int32_t)3 }; in TestComplexExample() 420 Formattable result; in TestComplexExample() 423 double rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble(); in TestComplexExample() 431 rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble(); in TestComplexExample()
|
/external/icu/icu4c/source/samples/numfmt/ |
D | util.cpp | 80 UnicodeString formattableToString(const Formattable& f) { in formattableToString() 82 case Formattable::kDate: in formattableToString() 85 case Formattable::kDouble: in formattableToString() 91 case Formattable::kLong: in formattableToString() 92 case Formattable::kInt64: in formattableToString() 98 case Formattable::kString: in formattableToString() 100 case Formattable::kArray: in formattableToString() 103 const Formattable* array = f.getArray(count); in formattableToString()
|
/external/icu/icu4c/source/samples/plurfmtsample/ |
D | plurfmtsample.cpp | 47 Formattable argEn[]={Formattable(numbers[i]), Formattable(plfmtEn.format(numbers[i],status))}; in PluralFormatExample() 48 Formattable argSl[]={Formattable(numbers[i]), Formattable(plfmtSl.format(numbers[i],status))}; in PluralFormatExample() 66 Formattable arg[] = {numbers[i]}; in PluralFormatExample()
|