Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-06-19 16:52:11


"Janek Kozicki" <janek_listy_at_[hidden]> wrote in message
news:20060618012322.3c3a0a29_at_absurd...
> Hello,
>
> Actually when I was writing a review I have written a leghty paragraph
> about unit scaling during serialization. But later I decided that review
> is not a good place to put it, so I'm pasting it now below:
>
>
>
> One of my first thoughts was about making it easier for the end user to
> perform serialization, more precisely, consider the first screenshot in
> following URL:
>
> http://yade.berlios.de/index.php?m=700:70

*Even* with t1_quantity (fixed units) you would get some 'free' units output ;-)

[cut user settable units]

> I presume that only t2_quantity gives what I need above. But if
> conversion from t2_quantity to t1_quantity is possible, then maybe all
> that t1_quantity -> t2_quantity -> t1_quantity conversions could be
> hidden from the user behind the interface? So that only those two
> interface functions I mentioned above will be used.

Yes. t2_quantity should be useful for that. Typically you can make a units
map<unit_string, quantity_w_unit>.
t1_quantity is useful to describe the quantity_w_unit, t2_quantity to hold
runtime unit and convert to t1_quantity
I had an example, but in a previous version of PQS. Not tried to make a GUI
widget of it yet though ;-)

> PS: please note that this comment is *old* so I'm still using here old
> names (t1, t2,...) and other stufff that likely is already decided that
> it will be modified to better suit the needs/suggestions/comments of all
> people. But the need for described above interface still remains.

Yep ... todo!

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk