Home
last modified time | relevance | path

Searched refs:Formattable (Results 1 – 25 of 100) sorted by relevance

1234

/external/icu/icu4c/source/i18n/
Dfmtable.cpp41 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Formattable) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
78 static Formattable* createArrayCopy(const Formattable* array, int32_t count) { in createArrayCopy()
79 Formattable *result = new Formattable[count]; in createArrayCopy()
102 void Formattable::init() { in init()
114 Formattable::Formattable() { in Formattable() function in Formattable
121 Formattable::Formattable(UDate date, ISDATE /*isDate*/) in Formattable() function in Formattable
131 Formattable::Formattable(double value) in Formattable() function in Formattable
141 Formattable::Formattable(int32_t value) in Formattable() function in Formattable
150 Formattable::Formattable(int64_t value) in Formattable() function in Formattable
160 Formattable::Formattable(StringPiece number, UErrorCode &status) { in Formattable() function in Formattable
[all …]
Dumsg.cpp45 static const Formattable::Type* getArgTypeList(const MessageFormat& m,
51 const Formattable::Type*
408 const Formattable::Type* argTypes = in umsg_vformat()
412 Formattable* args = new Formattable[count ? count : 1]; in umsg_vformat()
423 case Formattable::kDate: in umsg_vformat()
428 case Formattable::kDouble: in umsg_vformat()
433 case Formattable::kLong: in umsg_vformat()
438 case Formattable::kInt64: in umsg_vformat()
443 case Formattable::kString: in umsg_vformat()
453 case Formattable::kArray: in umsg_vformat()
[all …]
Dmsgfmt.cpp203 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) { in formatAndAppend()
210 void formatAndAppend(const Format* formatter, const Formattable& arg, in formatAndAppend()
357 Formattable::Type* a = (Formattable::Type*) in allocateArgTypes()
871 MessageFormat::format(const Formattable* source, in format()
887 const Formattable* arguments, in format()
902 MessageFormat::format(const Formattable& source, in format()
909 if (source.getType() != Formattable::kArray) { in format()
914 const Formattable* tmpPtr = source.getArray(cnt); in format()
920 const Formattable* arguments, in format()
928 const Formattable* MessageFormat::getArgFromListByName(const Formattable* arguments, in getArgFromListByName()
[all …]
Dquantityformatter.h27 class Formattable; variable
105 const Formattable &number,
116 const Formattable &number,
Dquantityformatter.cpp116 const Formattable &number, in format()
142 const Formattable &number, in selectPlural()
162 if (number.getType() == Formattable::kDouble) { in selectPlural()
164 } else if (number.getType() == Formattable::kLong) { in selectPlural()
166 } else if (number.getType() == Formattable::kInt64) { in selectPlural()
Dnumfmt.cpp460 Formattable f; in format()
479 const Formattable* num;
484 ArgExtractor(const NumberFormat& nf, const Formattable& obj, UErrorCode& status);
487 const Formattable* number(void) const;
492 inline const Formattable*
507 ArgExtractor::ArgExtractor(const NumberFormat& /*nf*/, const Formattable& obj, UErrorCode& /*status… in ArgExtractor()
561 NumberFormat::format(const Formattable& obj, in format()
569 const Formattable *n = arg.number(); in format()
593 case Formattable::kDouble: in format()
596 case Formattable::kLong: in format()
[all …]
Ddatefmt.cpp197 DateFormat::format(const Formattable& obj, in format()
208 case Formattable::kDate: in format()
211 case Formattable::kDouble: in format()
214 case Formattable::kLong: in format()
232 DateFormat::format(const Formattable& obj, in format()
243 case Formattable::kDate: in format()
246 case Formattable::kDouble: in format()
249 case Formattable::kLong: in format()
381 Formattable& result, in parseObject()
/external/icu/icu4c/source/i18n/unicode/
Dfmtable.h68 class U_I18N_API Formattable : public UObject {
85 Formattable(); // Type kLong, value 0
93 Formattable(UDate d, ISDATE flag);
100 Formattable(double d);
107 Formattable(int32_t l);
114 Formattable(int64_t ll);
123 Formattable(const char* strToCopy);
139 Formattable(StringPiece number, UErrorCode &status);
146 Formattable(const UnicodeString& strToCopy);
153 Formattable(UnicodeString* strToAdopt);
[all …]
Dmsgfmt.h646 UnicodeString& format(const Formattable* source,
670 const Formattable* arguments,
695 virtual UnicodeString& format(const Formattable& obj,
719 const Formattable* arguments,
736 virtual Formattable* parse(const UnicodeString& source,
755 virtual Formattable* parse(const UnicodeString& source,
772 Formattable& result,
898 Formattable::Type* argTypes;
949 UnicodeString& format(const Formattable* arguments,
975 const Formattable* arguments,
[all …]
Dformat.h141 UnicodeString& format(const Formattable& obj,
161 virtual UnicodeString& format(const Formattable& obj,
181 virtual UnicodeString& format(const Formattable& obj,
226 Formattable& result,
242 Formattable& result,
Dmeasure.h55 Measure(const Formattable& number, MeasureUnit* adoptedUnit,
96 inline const Formattable& getNumber() const;
141 Formattable number;
150 inline const Formattable& Measure::getNumber() const { in getNumber()
/external/icu/icu4c/source/test/intltest/
Dtfsmalls.cpp167 Formattable* ftp = new Formattable(); in test_Formattable()
168 if (!ftp || !(ftp->getType() == Formattable::kLong) || !(ftp->getLong() == 0)) { in test_Formattable()
173 Formattable fta, ftb; in test_Formattable()
195 if ((fta.getType() == Formattable::kDouble) && (fta.getDouble() == 3.0)) { in test_Formattable()
206 if ((fta.getType() == Formattable::kDate) && (fta.getDate() == 4.0)) { in test_Formattable()
226 const Formattable ftc(fta); in test_Formattable()
231 t = (fta.getType() == Formattable::kString) in test_Formattable()
250 const Formattable ftarray[] = in test_Formattable()
252 Formattable( 1.0, Formattable::kIsDate ), in test_Formattable()
259 Formattable ft_arr( ftarray, ft_cnt ); in test_Formattable()
[all …]
Dtmsgfmt.cpp143 Formattable result; in testBug3()
202 std::ostream& operator<<(std::ostream& stream, const Formattable& obj);
210 const Formattable& obj)
216 case Formattable::kDate :
223 case Formattable::kDouble :
228 case Formattable::kLong :
231 case Formattable::kString:
234 case Formattable::kArray:
236 const Formattable* array;
252 Formattable testArgs[] = { in PatternTest()
[all …]
Dmsfmrgts.cpp100 Formattable params [] = { in Test4074764()
101 Formattable(UnicodeString("BUG")), in Test4074764()
102 Formattable(0, Formattable::kIsDate) in Test4074764()
195 Formattable params []= { in Test4031438()
196 Formattable((int32_t)7) in Test4031438()
206 Formattable *objs = messageFormatter->parse(tempBuffer, pp, count); in Test4031438()
216 Formattable obj = objs[i]; in Test4031438()
218 if(obj.getType() == Formattable::kString) in Test4031438()
223 case Formattable::kLong: fmt->format(obj.getLong(), temp); break; in Test4031438()
224 case Formattable::kInt64: fmt->format(obj.getInt64(), temp); break; in Test4031438()
[all …]
Dnumfmtst.h222 UBool testFormattableAsUFormattable(const char *file, int line, Formattable &f);
226 static UBool equalValue(const Formattable& a, const Formattable& b);
234 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
236 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
238 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2()
242 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
244 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2()
248 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
250 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect()
254 void expect(NumberFormat& fmt, const Formattable& n,
[all …]
Dnmfmtrt.h43 void test(NumberFormat *fmt, const Formattable& value);
46 static double proportionalError(const Formattable& a, const Formattable& b);
47 static UnicodeString& typeOf(const Formattable& n, UnicodeString& result);
51 isDouble(const Formattable& n) in isDouble()
52 { return (n.getType() == Formattable::kDouble); } in isDouble()
55 isLong(const Formattable& n) in isLong()
56 { return (n.getType() == Formattable::kLong); } in isLong()
Dtsnmfmt.cpp22 static const char * formattableTypeName(Formattable::Type t) in formattableTypeName()
25 case Formattable::kDate: return "kDate"; in formattableTypeName()
26 case Formattable::kDouble: return "kDouble"; in formattableTypeName()
27 case Formattable::kLong: return "kLong"; in formattableTypeName()
28 case Formattable::kString: return "kString"; in formattableTypeName()
29 case Formattable::kArray: return "kArray"; in formattableTypeName()
30 case Formattable::kInt64: return "kInt64"; in formattableTypeName()
287 Formattable number[DEPTH]; in tryIt()
311 if (number[i].getType() == Formattable::kLong) in tryIt()
313 else if (number[i].getType() == Formattable::kInt64) in tryIt()
[all …]
Dnmfmtrt.cpp222 test(fmt, Formattable(value)); in test()
228 test(fmt, Formattable(value)); in test()
232 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) in test()
246 Formattable n; in test()
294 … escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong()) in test()
301 NumberFormatRoundTripTest::proportionalError(const Formattable& a, const Formattable& b) in proportionalError()
323 NumberFormatRoundTripTest::typeOf(const Formattable& n, UnicodeString& result) in typeOf()
325 if(n.getType() == Formattable::kLong) { in typeOf()
328 else if(n.getType() == Formattable::kDouble) { in typeOf()
331 else if(n.getType() == Formattable::kString) { in typeOf()
Dnumfmtst.cpp387 Formattable result; in isParsePass()
443 Formattable resultFormattable(currAmt->getNumber()); in isParseCurrencyPass()
608 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI()
646 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
650 Formattable& , in parse() argument
653 Formattable& , in parse() argument
837 Formattable af; in TestExponential()
841 if (af.getType() == Formattable::kLong) in TestExponential()
843 else if (af.getType() == Formattable::kDouble) { in TestExponential()
885 Formattable af; in TestExponential()
[all …]
Ddcfmtest.cpp160 static const char *formattableType(Formattable::Type typ) { in formattableType()
169 if (typ<0 || typ>Formattable::kObject) { in formattableType()
328 Formattable result; in execParseTest()
348 Formattable::Type expectType = Formattable::kDate; in execParseTest()
350 case 'd': expectType = Formattable::kDouble; break; in execParseTest()
351 case 'i': expectType = Formattable::kLong; break; in execParseTest()
352 case 'l': expectType = Formattable::kInt64; break; in execParseTest()
432 Formattable fmtbl; in execFormatTest()
Ddtfmapts.cpp164 Formattable fD(d, Formattable::kIsDate); in testAPI()
189 Formattable result1; in testAPI()
193 if(result1.getType() != Formattable::kDate) { in testAPI()
286 Formattable dateObj(0, Formattable::kIsDate); in TestNameHiding()
287 Formattable numObj(3.1415926535897932384626433832795); in TestNameHiding()
288 Formattable obj; in TestNameHiding()
Dnumrgts.cpp43 virtual UnicodeString& format(const Formattable& obj, in format()
67 Formattable& result, in parse()
74 Formattable& result, in parse()
423 Formattable result; in assignFloatValue()
426 float floatResult = (float) (result.getType() == Formattable::kDouble in assignFloatValue()
446 Formattable result; in Test4059870()
600 Formattable d; in Test4068693()
755 Formattable d2; in Test4095713()
1340 Formattable num; in Test4052223()
1431 Formattable num; in Test4108738()
[all …]
Dtchcfmt.cpp54 Formattable f; in TestSimpleExample()
172 Formattable testArgs[] = {(int32_t)0, "Disk_A", (int32_t)0}; in TestComplexExample()
210 testArgs[0] = Formattable((int32_t)i); in TestComplexExample()
276 testArgs[0] = Formattable((int32_t)i); in TestComplexExample()
392 Formattable ft( (int32_t)3 ); in TestComplexExample()
406 Formattable fta[] = { (int32_t)3 }; in TestComplexExample()
421 Formattable result; in TestComplexExample()
424 double rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble(); in TestComplexExample()
432 rd = (result.getType() == Formattable::kLong) ? result.getLong() : result.getDouble(); in TestComplexExample()
/external/icu/icu4c/source/samples/numfmt/
Dutil.cpp84 UnicodeString formattableToString(const Formattable& f) { in formattableToString()
86 case Formattable::kDate: in formattableToString()
89 case Formattable::kDouble: in formattableToString()
95 case Formattable::kLong: in formattableToString()
96 case Formattable::kInt64: in formattableToString()
102 case Formattable::kString: in formattableToString()
104 case Formattable::kArray: in formattableToString()
107 const Formattable* array = f.getArray(count); in formattableToString()
/external/icu/icu4c/source/samples/plurfmtsample/
Dplurfmtsample.cpp51 Formattable argEn[]={Formattable(numbers[i]), Formattable(plfmtEn.format(numbers[i],status))}; in PluralFormatExample()
52 Formattable argSl[]={Formattable(numbers[i]), Formattable(plfmtSl.format(numbers[i],status))}; in PluralFormatExample()
70 Formattable arg[] = {numbers[i]}; in PluralFormatExample()

1234