xo-unit ++ docs ++ quantity arithmetic + example
This commit is contained in:
parent
412a0ba163
commit
b0ce5eaee9
34 changed files with 713 additions and 173 deletions
|
|
@ -3,13 +3,73 @@
|
|||
Xquantity
|
||||
=========
|
||||
|
||||
Polymorphic dimensioned quantity with runtime unit checking/conversion
|
||||
|
||||
Context
|
||||
-------
|
||||
|
||||
.. ditaa::
|
||||
:--scale: 0.85
|
||||
|
||||
+----------------+---------------+
|
||||
| quantity |cBLU xquantity |
|
||||
+----------------+---------------+
|
||||
| scaled_unit |
|
||||
+--------------------------------+
|
||||
| natural_unit |
|
||||
+--------------------------------+
|
||||
| bpu |
|
||||
+----------------+ |
|
||||
| bu_store | |
|
||||
+----------------+---------------+
|
||||
| basis_unit |
|
||||
+--------------------------------+
|
||||
| dimension |
|
||||
+--------------------------------+
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include <xo/unit/xquantity.hpp>
|
||||
|
||||
.. uml::
|
||||
:scale: 99%
|
||||
:align: center
|
||||
|
||||
allowmixing
|
||||
|
||||
object qty1<<xquantity>>
|
||||
qty1 : scale = 1.23
|
||||
qty1 : unit = unit
|
||||
|
||||
object unit<<scaled_unit>>
|
||||
unit : is_natural() = true
|
||||
|
||||
qty1 o-- unit
|
||||
|
||||
|
||||
Class
|
||||
-----
|
||||
|
||||
Class with run-time unit representation.
|
||||
|
||||
.. doxygenclass:: xo::qty::xquantity
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
.. doxygengroup:: xquantity-instance-vars
|
||||
|
||||
Constructors
|
||||
------------
|
||||
|
||||
.. doxygengroup:: xquantity-ctors
|
||||
|
||||
Access Methods
|
||||
--------------
|
||||
|
||||
.. doxygengroup:: xquantity-access-methods
|
||||
|
||||
General Methods
|
||||
---------------
|
||||
|
||||
.. doxygengroup:: xquantity-methods
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue