Boost logo

Boost Users :

Subject: [Boost-users] [units] setting up a derived dimensionless with a custom name/symbol
From: Michael Powell (mwpowellnm_at_[hidden])
Date: 2011-08-02 12:34:04


Boost::Units users,

How would we go about setting up a custom unit with its own name/symbol? We
would derive another unit that incorporates this one and probably one of the
built-in ones. So we might have something like "volume per custom units", or
"custom units per time".

* From the sounds of things, we would need to setup a custom base unit with
its own info struct defining name() and symbol()?

* Probably starting out included in the SI system to get the thing working;
plausibly extending into other systems/views as we get further along.

I'm making an effort to keep our local usages/extensions to the boost::units
framework in the same style/structure, so as to keep things flowing well
into our application.

I am also using meter as a template, but I'm not sure that's quite the
template which would get us what we need?

Yes, no, maybe? Any insights?

Thank you...

Regards,

Michael



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net