xo-unit: refactor: ++ docs
This commit is contained in:
parent
d767675dd9
commit
5fd6bd3148
11 changed files with 225 additions and 151 deletions
|
|
@ -5,6 +5,8 @@ xo_docdir_doxygen_config()
|
|||
xo_docdir_sphinx_config(
|
||||
index.rst examples.rst glossary.rst install.rst implementation.rst
|
||||
quantity-reference.rst quantity-class.rst quantity-factoryfunctions.rst quantity-unitvars.rst
|
||||
unit-reference.rst unit-concept.rst unit-quantities.rst basis-unit-class.rst dimension-enum.rst
|
||||
unit-reference.rst unit-concept.rst unit-quantities.rst basis-unit-reference.rst
|
||||
basis-unit-class.rst basis-unit-constants.rst
|
||||
dimension-enum.rst
|
||||
)
|
||||
#xo_utest_coverage_config2()
|
||||
|
|
|
|||
|
|
@ -10,14 +10,11 @@ Basis Unit
|
|||
A :code:`basis_unit` represents a unit belonging to a single native dimension.
|
||||
For example :code:`bu::meter` representing a distance of 1 meter.
|
||||
|
||||
Class
|
||||
-----
|
||||
|
||||
.. doxygenclass:: xo::qty::basis_unit
|
||||
|
||||
Constants
|
||||
---------
|
||||
|
||||
.. doxygengroup:: basis-unit-mass-units
|
||||
.. doxygengroup:: basis-unit-distance-units
|
||||
|
||||
Member Variables
|
||||
----------------
|
||||
|
||||
|
|
|
|||
34
docs/basis-unit-constants.rst
Normal file
34
docs/basis-unit-constants.rst
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
.. _basis-unit-constants:
|
||||
|
||||
Basis Unit Constants
|
||||
====================
|
||||
|
||||
These constants represent low-level building blocks.
|
||||
Relative scalefactors for each unit are chosen here.
|
||||
|
||||
Application code will not use this class directly;
|
||||
instead it's expected to use units from the :code:`xo::qty::u` namespace.
|
||||
Those units are implemented on top of the basis units described here.
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include <xo/unit/basis_unit.hpp>
|
||||
|
||||
using xo::qty::detail::bu;
|
||||
|
||||
Mass Units
|
||||
----------
|
||||
|
||||
.. doxygenfunction:: xo::qty::abbrev::mass_unit2_abbrev
|
||||
|
||||
.. doxygengroup:: basis-unit-mass-units
|
||||
|
||||
Distance Units
|
||||
--------------
|
||||
|
||||
.. doxygengroup:: basis-unit-distance-units
|
||||
|
||||
Time Units
|
||||
----------
|
||||
|
||||
.. doxygengroup:: basis-unit-time-units
|
||||
11
docs/basis-unit-reference.rst
Normal file
11
docs/basis-unit-reference.rst
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.. _basis-unit-reference:
|
||||
|
||||
Basis Unit Reference
|
||||
====================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Basis-Unit Reference
|
||||
|
||||
basis-unit-class
|
||||
basis-unit-constants
|
||||
|
|
@ -50,7 +50,7 @@ Abstraction tower for *xo-unit* components.
|
|||
|
||||
A power of a basis unit. Has a single dimension.
|
||||
|
||||
- basis_unit: see :doc:`basis-unit-class`.
|
||||
- basis_unit: see :doc:`basis-unit-reference`.
|
||||
|
||||
A unit with a single dimension and scale.
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ runtime (since we can't construct new c++ types at runtime).
|
|||
unit-quantities
|
||||
quantity-reference
|
||||
unit-reference
|
||||
basis-unit-class
|
||||
basis-unit-reference
|
||||
dimension-enum
|
||||
|
||||
Indices and Tables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue