Home
last modified time | relevance | path

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

123456

/external/icu/icu4c/source/i18n/
Dfmtable.cpp41 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Formattable)
80 static Formattable* createArrayCopy(const Formattable* array, int32_t count) { in createArrayCopy()
81 Formattable *result = new Formattable[count]; in createArrayCopy()
104 void Formattable::init() { in init()
116 Formattable::Formattable() { in Formattable() function in Formattable
123 Formattable::Formattable(UDate date, ISDATE /*isDate*/) in Formattable() function in Formattable
133 Formattable::Formattable(double value) in Formattable() function in Formattable
143 Formattable::Formattable(int32_t value) in Formattable() function in Formattable
152 Formattable::Formattable(int64_t value) in Formattable() function in Formattable
162 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*
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.cpp204 void formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) { in formatAndAppend()
211 void formatAndAppend(const Format* formatter, const Formattable& arg, in formatAndAppend()
358 Formattable::Type* a = (Formattable::Type*) in allocateArgTypes()
877 MessageFormat::format(const Formattable* source, in format()
893 const Formattable* arguments, in format()
908 MessageFormat::format(const Formattable& source, in format()
915 if (source.getType() != Formattable::kArray) { in format()
920 const Formattable* tmpPtr = source.getArray(cnt); in format()
926 const Formattable* arguments, in format()
934 const Formattable* MessageFormat::getArgFromListByName(const Formattable* arguments, in getArgFromListByName()
[all …]
Dnumber_asformat.h53 UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPosition& pos,
60 …UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPositionIterator* posI…
66 void parseObject(const UnicodeString& source, Formattable& result,
/external/icu/libicu/cts_headers/unicode/
Dfmtable.h64 class U_I18N_API Formattable : public UObject {
81 Formattable(); // Type kLong, value 0
89 Formattable(UDate d, ISDATE flag);
96 Formattable(double d);
103 Formattable(int32_t l);
110 Formattable(int64_t ll);
119 Formattable(const char* strToCopy);
135 Formattable(StringPiece number, UErrorCode &status);
142 Formattable(const UnicodeString& strToCopy);
149 Formattable(UnicodeString* strToAdopt);
[all …]
Dmsgfmt.h666 UnicodeString& format(const Formattable* source,
690 const Formattable* arguments,
715 virtual UnicodeString& format(const Formattable& obj,
739 const Formattable* arguments,
756 virtual Formattable* parse(const UnicodeString& source,
775 virtual Formattable* parse(const UnicodeString& source,
792 Formattable& result,
918 Formattable::Type* argTypes;
969 UnicodeString& format(const Formattable* arguments,
995 const Formattable* arguments,
[all …]
Dformat.h143 UnicodeString& format(const Formattable& obj,
163 virtual UnicodeString& format(const Formattable& obj,
183 virtual UnicodeString& format(const Formattable& obj,
228 Formattable& result,
244 Formattable& result,
Dmeasure.h57 Measure(const Formattable& number, MeasureUnit* adoptedUnit,
98 inline const Formattable& getNumber() const;
143 Formattable number;
152 inline const Formattable& Measure::getNumber() const { in getNumber()
/external/icu/icu4c/source/i18n/unicode/
Dfmtable.h64 class U_I18N_API Formattable : public UObject {
81 Formattable(); // Type kLong, value 0
89 Formattable(UDate d, ISDATE flag);
96 Formattable(double d);
103 Formattable(int32_t l);
110 Formattable(int64_t ll);
119 Formattable(const char* strToCopy);
135 Formattable(StringPiece number, UErrorCode &status);
142 Formattable(const UnicodeString& strToCopy);
149 Formattable(UnicodeString* strToAdopt);
[all …]
Dmsgfmt.h666 UnicodeString& format(const Formattable* source,
690 const Formattable* arguments,
715 virtual UnicodeString& format(const Formattable& obj,
739 const Formattable* arguments,
756 virtual Formattable* parse(const UnicodeString& source,
775 virtual Formattable* parse(const UnicodeString& source,
792 Formattable& result,
918 Formattable::Type* argTypes;
969 UnicodeString& format(const Formattable* arguments,
995 const Formattable* arguments,
[all …]
Dformat.h143 UnicodeString& format(const Formattable& obj,
163 virtual UnicodeString& format(const Formattable& obj,
183 virtual UnicodeString& format(const Formattable& obj,
228 Formattable& result,
244 Formattable& result,
Dmeasure.h57 Measure(const Formattable& number, MeasureUnit* adoptedUnit,
98 inline const Formattable& getNumber() const;
143 Formattable number;
152 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.cpp148 Formattable result; in testBug3()
206 std::ostream& operator<<(std::ostream& stream, const Formattable& obj);
214 const Formattable& obj)
220 case Formattable::kDate :
227 case Formattable::kDouble :
232 case Formattable::kLong :
235 case Formattable::kString:
238 case Formattable::kArray:
240 const Formattable* array;
256 Formattable testArgs[] = { in PatternTest()
[all …]
Dmsfmrgts.cpp101 Formattable params [] = { in Test4074764()
102 Formattable(UnicodeString("BUG")), in Test4074764()
103 Formattable(0, Formattable::kIsDate) in Test4074764()
196 Formattable params []= { in Test4031438()
197 Formattable((int32_t)7) in Test4031438()
207 Formattable *objs = messageFormatter->parse(tempBuffer, pp, count); in Test4031438()
217 Formattable obj = objs[i]; in Test4031438()
219 if(obj.getType() == Formattable::kString) in Test4031438()
224 case Formattable::kLong: fmt->format(obj.getLong(), temp); break; in Test4031438()
225 case Formattable::kInt64: fmt->format(obj.getInt64(), temp); break; in Test4031438()
[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()
Dnumfmtst.h309 UBool testFormattableAsUFormattable(const char *file, int line, Formattable &f);
313 static UBool equalValue(const Formattable& a, const Formattable& b);
321 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
323 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
325 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2()
329 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
331 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2()
335 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
337 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect()
341 void expect(NumberFormat& fmt, const Formattable& n,
[all …]
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.cpp223 test(fmt, Formattable(value)); in test()
229 test(fmt, Formattable(value)); in test()
233 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) in test()
247 Formattable n; in test()
300 … escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong()) in test()
307 NumberFormatRoundTripTest::proportionalError(const Formattable& a, const Formattable& b) in proportionalError()
329 NumberFormatRoundTripTest::typeOf(const Formattable& n, UnicodeString& result) in typeOf()
331 if(n.getType() == Formattable::kLong) { in typeOf()
334 else if(n.getType() == Formattable::kDouble) { in typeOf()
337 else if(n.getType() == Formattable::kString) { in typeOf()
Dnumfmtst.cpp275 Formattable bla("Paja Patak"); // Donald Duck for non Serbian speakers in TestAPI()
318 …virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErro… in format() argument
322 Formattable& , in parse() argument
325 Formattable& , in parse() argument
580 Formattable af; in TestExponential()
584 if (af.getType() == Formattable::kLong) in TestExponential()
586 else if (af.getType() == Formattable::kDouble) { in TestExponential()
629 Formattable af; in TestExponential()
631 if (af.getType() == Formattable::kLong || in TestExponential()
632 af.getType() == Formattable::kInt64) { in TestExponential()
[all …]
/external/libchrome/base/i18n/
Dmessage_formatter.cc31 : formattable(new icu::Formattable(UnicodeStringFromStringPiece(s))) {} in MessageArg()
34 : formattable(new icu::Formattable(UnicodeStringFromStringPiece(s))) {} in MessageArg()
37 : formattable(new icu::Formattable(UnicodeString::fromUTF8(s))) {} in MessageArg()
40 : formattable(new icu::Formattable(UnicodeString(s.data(), s.size()))) {} in MessageArg()
42 MessageArg::MessageArg(int i) : formattable(new icu::Formattable(i)) {} in MessageArg()
44 MessageArg::MessageArg(int64_t i) : formattable(new icu::Formattable(i)) {} in MessageArg()
46 MessageArg::MessageArg(double d) : formattable(new icu::Formattable(d)) {} in MessageArg()
49 : formattable(new icu::Formattable(static_cast<UDate>(t.ToJsTime()))) {} in MessageArg()
74 icu::Formattable args[] = { in FormatWithNumberedArgs()
75 arg0.has_value(&args_count) ? *arg0.formattable : icu::Formattable(), in FormatWithNumberedArgs()
[all …]
/external/icu/icu4c/source/samples/numfmt/
Dutil.cpp89 UnicodeString formattableToString(const Formattable& f) { in formattableToString()
91 case Formattable::kDate: in formattableToString()
94 case Formattable::kDouble: in formattableToString()
100 case Formattable::kLong: in formattableToString()
106 case Formattable::kInt64: in formattableToString()
112 case Formattable::kString: in formattableToString()
114 case Formattable::kArray: in formattableToString()
117 const Formattable* array = f.getArray(count); in formattableToString()
/external/icu/icu4c/source/samples/plurfmtsample/
Dplurfmtsample.cpp53 Formattable argEn[]={Formattable(numbers[i]), Formattable(plfmtEn.format(numbers[i],status))}; in PluralFormatExample()
54 Formattable argSl[]={Formattable(numbers[i]), Formattable(plfmtSl.format(numbers[i],status))}; in PluralFormatExample()
72 Formattable arg[] = {numbers[i]}; in PluralFormatExample()
/external/cldr/tools/c/genldml/
Dgenldml.cpp300 Formattable args[] = {UnicodeString(XML_END_SLASH), ""}; in closeXMLDocument()
306 Formattable args[] ={ argument}; in formatString()
319 UnicodeString GenerateXML::formatString(UnicodeString& str,const Formattable* args,int32_t num,Unic… in formatString()
435 Formattable arguments[] = {"", (isDraft==TRUE)? " draft=\"true\"" : ""}; in writeXMLVersionAndComments()
456 Formattable args[] = {indentOffset,""}; in writeVersion()
478 Formattable args[]={indentOffset,"",""}; in writeIdentity()
502 Formattable args1[] = {indentOffset, tempStr2,""}; in writeIdentity()
514 Formattable args1[] = {indentOffset, tempStr}; in writeIdentity()
525 Formattable args1[] = {indentOffset,tempStr1,tempStr2}; in writeIdentity()
536 Formattable args1[] = {indentOffset, tempStr}; in writeIdentity()
[all …]
/external/icu/libicu/cts_headers/
Dnumber_asformat.h53 UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPosition& pos,
60 …UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPositionIterator* posI…
66 void parseObject(const UnicodeString& source, Formattable& result,

123456