xo-unit: kitchen-sink doc + build improvements + 1 bug fix
This commit is contained in:
parent
0664af34c5
commit
412a0ba163
45 changed files with 1712 additions and 472 deletions
|
|
@ -3,26 +3,70 @@
|
|||
Quantity
|
||||
========
|
||||
|
||||
.. ditaa::
|
||||
|
||||
+----------------+---------------+
|
||||
|cYEL quantity | xquantity |
|
||||
+----------------+---------------+
|
||||
| scaled_unit |
|
||||
+--------------------------------+
|
||||
| natural_unit |
|
||||
+--------------------------------+
|
||||
| bpu |
|
||||
+----------------+ |
|
||||
| bu_store | |
|
||||
+----------------+---------------+
|
||||
| basis_unit |
|
||||
+--------------------------------+
|
||||
| dimension |
|
||||
+--------------------------------+
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include <xo/unit/quantity.hpp>
|
||||
|
||||
.. uml::
|
||||
:scale: 99%
|
||||
:align: center
|
||||
|
||||
allowmixing
|
||||
|
||||
object qty1<<quantity>>
|
||||
qty1 : scale = 1.23
|
||||
|
||||
rectangle constexpr #e0f0ff {
|
||||
|
||||
object unit<<natural_unit>>
|
||||
|
||||
qty1 o-- unit : s_unit (static constexpr)
|
||||
|
||||
}
|
||||
|
||||
Arithmetic on :doc:`xo::qty::quantity<quantity-reference>` instances
|
||||
does *not* use ``xo::qty::quantity::s_scaled_unit`` at runtime;
|
||||
instead gets everything it needs at compile time.
|
||||
|
||||
Class
|
||||
-----
|
||||
|
||||
The primary data structure for interacting with xo-unit is the
|
||||
template class ``xo::qty::quantity``.
|
||||
A quantity is a compile-time wrapper around a single arithmetic value,
|
||||
with type taken from the ``Repr`` parameter in ``quantity<Unit, Repr>``.
|
||||
|
||||
.. doxygenclass:: xo::qty::quantity
|
||||
|
||||
Type Traits
|
||||
-----------
|
||||
|
||||
.. doxygengroup:: quantity-type-traits
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
.. doxygengroup:: quantity-static-vars
|
||||
.. doxygengroup:: quantity-instance-vars
|
||||
|
||||
Type Traits
|
||||
-----------
|
||||
|
||||
.. doxygengroup:: quantity-type-traits
|
||||
|
||||
Constructors
|
||||
------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue