|
From: Shane C. <sf...@go...> - 2018-02-19 23:49:34
|
Hi Andi, I'm not sure I follow? The existing *formatMeasures* method accepts a *const Measure** parameter, not *Measure[]*: 186 UnicodeString <http://icu-project.org/apiref/icu4c/classicu_1_1UnicodeString.html> &formatMeasures( 187 const Measure <http://icu-project.org/apiref/icu4c/classicu_1_1Measure.html> *measures, 188 int32_t measureCount, 189 UnicodeString <http://icu-project.org/apiref/icu4c/classicu_1_1UnicodeString.html> &appendTo, 190 FieldPosition <http://icu-project.org/apiref/icu4c/classicu_1_1FieldPosition.html> &pos, 191 UErrorCode <http://icu-project.org/apiref/icu4c/utypes_8h.html#a3343c1c8a8377277046774691c98d78c> &status) const; http://icu-project.org/apiref/icu4c/classicu_1_1MeasureFormat.html#a38ea881ad05c1b81bb5ade8449e44544 What is the full signature of the method you are proposing? Shane On Wed, Jan 24, 2018 at 12:47 PM, Andi Vajda <va...@ov...> wrote: > > Hi, > > I hope this is the right place for a feature request ? > > I'd like to propose that ICU add an overload for > MeasureFormat.formatMeasures() > that takes an array of const Measure * instead of Measure[]. > > It is currently hard to create a Measure[] via 'new' since the Measure() > constructor is protected. It is also difficult to copy existing Measure > objects (I suspect there is something odd with the unit * it owns). > > Seeing that there are subclasses of Measure makes it a bit scary to copy > these instances into a Measure[] anyway... > > In PyICU, the wrapper objects own a Measure *, a formatMeasures() method > accepting an array for const Measure * would be much simpler to write a > wrapper for. > > As it stands, in PyICU's HEAD version, I added formatMeasure(Measure) and > formatMeasures(array of 1) only. > > Thanks ! > > Andi.. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > icu-design mailing list > icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design > |