Home
last modified time | relevance | path

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

1234

/external/icu4c/i18n/
Dfmtable.cpp37 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Formattable) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
73 static Formattable* createArrayCopy(const Formattable* array, int32_t count) { in createArrayCopy()
74 Formattable *result = new Formattable[count]; in createArrayCopy()
97 void Formattable::init() { in init()
109 Formattable::Formattable() { in Formattable() function in Formattable
116 Formattable::Formattable(UDate date, ISDATE /*isDate*/) in Formattable() function in Formattable
126 Formattable::Formattable(double value) in Formattable() function in Formattable
136 Formattable::Formattable(int32_t value) in Formattable() function in Formattable
145 Formattable::Formattable(int64_t value) in Formattable() function in Formattable
155 Formattable::Formattable(const StringPiece &number, UErrorCode &status) { in Formattable() function in Formattable
[all …]
Dumsg.cpp43 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 …]
Dmsgfmt.cpp198 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) { in formatAndAppend()
338 Formattable::Type* a = (Formattable::Type*) in allocateArgTypes()
859 MessageFormat::format(const Formattable* source, in format()
875 const Formattable* arguments, in format()
890 MessageFormat::format(const Formattable& source, in format()
897 if (source.getType() != Formattable::kArray) { in format()
902 const Formattable* tmpPtr = source.getArray(cnt); in format()
908 const Formattable* arguments, in format()
916 const Formattable* MessageFormat::getArgFromListByName(const Formattable* arguments, in getArgFromListByName()
929 MessageFormat::format(const Formattable* arguments, in format()
[all …]
Ddatefmt.cpp110 DateFormat::format(const Formattable& obj, in format()
121 case Formattable::kDate: in format()
124 case Formattable::kDouble: in format()
127 case Formattable::kLong: in format()
145 DateFormat::format(const Formattable& obj, in format()
156 case Formattable::kDate: in format()
159 case Formattable::kDouble: in format()
162 case Formattable::kLong: in format()
289 Formattable& result, in parseObject()
Dnumfmt.cpp385 Formattable f; in format()
400 const Formattable* num;
405 ArgExtractor(const NumberFormat& nf, const Formattable& obj, UErrorCode& status);
408 const Formattable* number(void) const;
411 inline const Formattable*
416 ArgExtractor::ArgExtractor(const NumberFormat& nf, const Formattable& obj, UErrorCode& status) in ArgExtractor()
475 NumberFormat::format(const Formattable& obj, in format()
483 const Formattable *n = arg.number(); in format()
497 case Formattable::kDouble: in format()
500 case Formattable::kLong: in format()
[all …]
/external/icu4c/i18n/unicode/
Dfmtable.h52 class U_I18N_API Formattable : public UObject {
69 Formattable(); // Type kLong, value 0
77 Formattable(UDate d, ISDATE flag);
84 Formattable(double d);
91 Formattable(int32_t l);
98 Formattable(int64_t ll);
107 Formattable(const char* strToCopy);
123 Formattable(const StringPiece &number, UErrorCode &status);
130 Formattable(const UnicodeString& strToCopy);
137 Formattable(UnicodeString* strToAdopt);
[all …]
Dmsgfmt.h637 UnicodeString& format(const Formattable* source,
661 const Formattable* arguments,
686 virtual UnicodeString& format(const Formattable& obj,
705 UnicodeString& format(const Formattable& obj,
729 const Formattable* arguments,
746 virtual Formattable* parse(const UnicodeString& source,
765 virtual Formattable* parse(const UnicodeString& source,
782 Formattable& result,
903 Formattable::Type* argTypes;
953 UnicodeString& format(const Formattable* arguments,
[all …]
Dformat.h139 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,
Dmeasure.h57 Measure(const Formattable& number, MeasureUnit* adoptedUnit,
98 inline const Formattable& getNumber() const;
117 Formattable number;
126 inline const Formattable& Measure::getNumber() const { in getNumber()
Dnumfmt.h233 virtual UnicodeString& format(const Formattable& obj,
254 virtual UnicodeString& format(const Formattable& obj,
288 Formattable& result,
509 UnicodeString& format(const Formattable& obj,
535 Formattable& result,
554 Formattable& result,
576 virtual Formattable& parseCurrency(const UnicodeString& text,
577 Formattable& result,
1051 NumberFormat::format(const Formattable& obj, in format()
Dchoicfmt.h415 virtual UnicodeString& format(const Formattable* objs,
434 virtual UnicodeString& format(const Formattable& obj,
450 UnicodeString& format(const Formattable& obj,
497 Formattable& result,
513 Formattable& result,
661 ChoiceFormat::format(const Formattable& obj, in format()
Drbnf.h820 virtual UnicodeString& format(const Formattable& obj,
832 UnicodeString& format(const Formattable& obj,
871 Formattable& result,
883 Formattable& result,
1009 RuleBasedNumberFormat::format(const Formattable& obj, in format()
1034 RuleBasedNumberFormat::parse(const UnicodeString& text, Formattable& result, UErrorCode& status) co… in parse()
Dsmpdtfmt.h436 virtual UnicodeString& format( const Formattable& obj,
461 virtual UnicodeString& format( const Formattable& obj,
506 UnicodeString& format(const Formattable& obj,
954 Formattable& number,
960 Formattable& number,
1179 SimpleDateFormat::format(const Formattable& obj, in format()
1188 SimpleDateFormat::format(const Formattable& obj, in format()
1199 SimpleDateFormat::format(const Formattable& obj, in format()
/external/icu4c/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.cpp137 Formattable result; in testBug3()
197 std::ostream& operator<<(std::ostream& stream, const Formattable& obj);
200 ostream& operator<<(ostream& stream, const Formattable& obj);
209 const Formattable& obj)
215 case Formattable::kDate :
222 case Formattable::kDouble :
227 case Formattable::kLong :
230 case Formattable::kString:
233 case Formattable::kArray:
235 const Formattable* array;
[all …]
Dmsfmrgts.cpp97 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 …]
Dnumfmtst.h158 static UBool equalValue(const Formattable& a, const Formattable& b);
166 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
168 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
170 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2()
174 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
176 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2()
180 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
182 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect()
186 void expect(NumberFormat& fmt, const Formattable& n,
189 void expect(NumberFormat& fmt, const Formattable& n,
[all …]
Dnmfmtrt.h41 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()
Dtsnmfmt.cpp20 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 …]
Dnmfmtrt.cpp220 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()
Dnumfmtst.cpp143 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI()
180 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
184 Formattable& , in parse() argument
187 Formattable& , in parse() argument
371 Formattable af; in TestExponential()
375 if (af.getType() == Formattable::kLong) in TestExponential()
377 else if (af.getType() == Formattable::kDouble) { in TestExponential()
419 Formattable af; in TestExponential()
421 if (af.getType() == Formattable::kLong || in TestExponential()
422 af.getType() == Formattable::kInt64) { in TestExponential()
[all …]
Ddcfmtest.cpp154 static const char *formattableType(Formattable::Type typ) { in formattableType()
163 if (typ<0 || typ>Formattable::kObject) { in formattableType()
313 Formattable result; in execParseTest()
333 Formattable::Type expectType = Formattable::kDate; in execParseTest()
335 case 'd': expectType = Formattable::kDouble; break; in execParseTest()
336 case 'i': expectType = Formattable::kLong; break; in execParseTest()
337 case 'l': expectType = Formattable::kInt64; break; in execParseTest()
412 Formattable fmtbl; in execFormatTest()
Ddtfmapts.cpp162 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()
/external/icu4c/samples/numfmt/
Dutil.cpp80 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/icu4c/test/perf/DateFmtPerf/
DDateFmtPerf.h267 Formattable result; in call()
296 UnicodeString formattableToString(const Formattable& f) { in formattableToString()
298 case Formattable::kDate: in formattableToString()
301 case Formattable::kDouble: in formattableToString()
307 case Formattable::kLong: in formattableToString()
308 case Formattable::kInt64: in formattableToString()
314 case Formattable::kString: in formattableToString()
316 case Formattable::kArray: in formattableToString()
319 const Formattable* array = f.getArray(count); in formattableToString()

1234