Boost logo

Boost :

From: Martin Adrian (adrianm_at_[hidden])
Date: 2006-06-08 09:22:28


Andy Little <andy <at> servocomm.freeserve.co.uk> writes:

> I must admit that both the ouput format and the quantity typedef names, I
> frankly havent done much work on, beyond getting something that works. I
would
> welcome help from anyone regarding writing a specification in both areas.
>
> In the output area one think lacking is going beyond ASCII. It would be nice
to
> output Ohms as Ω rather than R for example. Any help with that would be
> appreciated too. I dont really know where to start with that.

Why not facets pqs_put, pqs_get, pqs_punct

pqs_punct could contain members like

virtual string multiplication() const { return ""; }
virtual string division() const { return "/"; }
virtual string power() const { return "^"; }
virtual string greeksymbol(some enum) const { ... }
  
If you want to use other separators or symbols, just create your own pqs_facet.

If you want to format the units in a completly different way (e.g. multiple
lines), create your own pqs_put facet.


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