diff --git a/docs/framework.rst b/docs/framework.rst index 085e0692..1c94f436 100644 --- a/docs/framework.rst +++ b/docs/framework.rst @@ -14,6 +14,7 @@ Framework Basics framework/basic_concepts framework/quantities framework/quantity_points + framework/quantity_kinds framework/dimensions framework/units framework/constants diff --git a/docs/framework/quantity_kinds.rst b/docs/framework/quantity_kinds.rst index 3ebb8a43..df347c7f 100644 --- a/docs/framework/quantity_kinds.rst +++ b/docs/framework/quantity_kinds.rst @@ -12,7 +12,7 @@ It is represented in the library with a `quantity_kind` class template. Kind creation ------------- -We need a `kind` to represent the more specific usage of a quantity. +We need a `kind` to represent the more specific usage of a quantity:: struct radius : kind {}; @@ -46,11 +46,11 @@ Differences to quantity Unlike `quantity`, the library provides: - no kinds, such as ``radius`` or ``width``, therefore - * no UDLs or unit constants, - * no kind-specific concepts, such as ``Radius``, - (there's the generic `QuantityKind` and kind-specifiable `QuantityKindOf`), + * no UDLs or unit constants, + * no kind-specific concepts, such as ``Radius``, + (there's the generic `QuantityKind` and kind-specifiable `QuantityKindOf`), - a slightly different set of operations on quantity kinds - (see the :ref:`Dimensions` chapter) + (see the :ref:`Dimensions` chapter). Quantity point kind ------------------- @@ -60,13 +60,13 @@ A quantity point kind is the analogous of a quantity point for quantity kinds. They are represented in the library with a `quantity_point_kind` class template. -First, we need a `point_kind` for a `kind`. +First, we need a `point_kind` for a `kind`:: struct width : kind {}; struct x_coordinate : point_kind {}; -Now x coordinates can be constructed: +Now ``x`` coordinates can be constructed:: quantity_point_kind auto x_pos(123 * m); - // `QuantityPointKindOf` with `x_pos.relative()` - // equal to `quantity_kind(123 * m)` + // `QuantityPointKindOf` with `x_pos.relative()` + // equal to `quantity_kind(123 * m)`