Boost logo

Boost :

From: vladimir josef sykora (vladimir.sykora_at_[hidden])
Date: 2003-02-26 10:32:12


Hello Alexander,
The issue regarding physical unit types has been raised a couple of times on
this newsgroup; however no agreement has been reached so far concerning the
functionalities such a library should provide, nor on its design.
I developed a small library for that purpose (new version under:
http://groups.yahoo.com/group/boost/files/physical_units_library.tar.gz )
which provides compile-time safety for physical units and functionality for
run-time conversions, though it has no proper documentation (its on the
way.) This library so far has covered my needs. Some examples on how to
define units' types with the library:

type_list_canonizer<boost::mpl::vector< dimension_type_generator<
meterPolicy<>,1>::type > >::type meter_typelist;
type_list_canonizer<boost::mpl::vector< dimension_type_generator<
meterPolicy<kilo>,1>::type > >::type kilometer_typelist;
type_list_canonizer<boost::mpl::vector< dimension_type_generator<
my_unit<>,1>::type > >::type self_defined_unit_typelist;

unit<double, kilometer_typelist> km(1.0);
unit<float, meter_typelist> m(km);

std::cout << m << '\t';

// output: 1000 m

Regards,

--
vladimir josef sykora
morphochem AG
gmunder str. 37-37a
81379 muenchen
tel. ++49-89-78005-0
fax  ++49-89-78005-555
vladimir.sykora_at_[hidden]
http://www.morphochem.de
"Alexander Dz" <alexanderdz_at_[hidden]> wrote in message
news:20030226135704.19174.qmail_at_web13901.mail.yahoo.com...
> Hi All,
>
> I'm participating in pretty complicated scientific
> project. I'm thinking to deploy a library which helps
> me to deal with measurement units. As far as I see,
> SIunits from Walter E. Brown is the most advanced one.
>
> Do anybody has experience with SIunits? Where to
> download it today? Do other units libraries from
> http://groups.yahoo.com/group/boost/files/ alive?
>
> Thanks in advance,
> Alexander Dzjuba
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>

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