Skip to content

Commit

Permalink
refactor: 💥 header files with the entire system definitions moved up …
Browse files Browse the repository at this point in the history
…in the directory tree
  • Loading branch information
mpusz committed Apr 25, 2024
1 parent dbc2259 commit 8ea346b
Show file tree
Hide file tree
Showing 62 changed files with 134 additions and 134 deletions.
8 changes: 4 additions & 4 deletions docs/getting_started/look_and_feel.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here is a small example of operations possible on scalar quantities:
=== "Header files"

```cpp
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>

using namespace mp_units;
using namespace mp_units::si::unit_symbols;
Expand Down Expand Up @@ -111,9 +111,9 @@ performed without sacrificing accuracy. Please see the below example for a quick
```cpp
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#include <format>
#include <iomanip>
#include <iostream>
Expand Down
12 changes: 6 additions & 6 deletions docs/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ a number with a predefined unit:
=== "Header files"

```cpp
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>

using namespace mp_units;

Expand All @@ -59,7 +59,7 @@ a number with a predefined unit:
=== "Header files"

```cpp
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>

using namespace mp_units;

Expand All @@ -83,7 +83,7 @@ The same can be obtained using optional unit symbols:
=== "Header files"

```cpp
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>

using namespace mp_units;
using namespace mp_units::si::unit_symbols;
Expand Down Expand Up @@ -193,7 +193,7 @@ Quantities of the same kind can be added, subtracted, and compared to each other
=== "Header files"

```cpp
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>

using namespace mp_units;
using namespace mp_units::si::unit_symbols;
Expand Down Expand Up @@ -249,8 +249,8 @@ This introduces an additional type-safety.
```cpp
#include <mp-units/format.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/usc/usc.h>
#include <mp-units/systems/si.h>
#include <mp-units/systems/usc.h>
#include <print>
int main()
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ The library source code is hosted on [GitHub](https://github.com/mpusz/mp-units)

```cpp
#include <mp-units/format.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/usc/usc.h>
#include <mp-units/systems/si.h>
#include <mp-units/systems/usc.h>
#include <print>

using namespace mp_units;
Expand Down
12 changes: 6 additions & 6 deletions docs/users_guide/framework_basics/simple_and_typed_quantities.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Here is a simple example showing how to deal with such quantities:

```cpp
#include <mp-units/format.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#include <print>

using namespace mp_units;
Expand Down Expand Up @@ -203,8 +203,8 @@ The previous example can be re-typed using typed quantities in the following way

```cpp
#include <mp-units/format.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#include <print>

using namespace mp_units;
Expand Down Expand Up @@ -373,7 +373,7 @@ Let's see another example:

```cpp hl_lines="42"
#include <mp-units/math.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#include <numbers>

using namespace mp_units;
Expand Down Expand Up @@ -422,8 +422,8 @@ Let's see another example:

```cpp hl_lines="53 54 55"
#include <mp-units/math.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#include <numbers>

using namespace mp_units;
Expand Down
18 changes: 9 additions & 9 deletions docs/users_guide/use_cases/wide_compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ your code using **mp-units**:
```cpp
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#include <format>
#include <iostream>

Expand All @@ -77,9 +77,9 @@ your code using **mp-units**:
```cpp
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#include <fmt/format.h>
#include <iostream>

Expand All @@ -102,9 +102,9 @@ your code using **mp-units**:
#else
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#endif

// ...
Expand Down
8 changes: 4 additions & 4 deletions example/avg_speed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
import mp_units;
#else
#include <mp-units/ostream.h>
#include <mp-units/systems/cgs/cgs.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/cgs.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#endif

namespace {
Expand Down
2 changes: 1 addition & 1 deletion example/capacitor_time_curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import mp_units;
#include <mp-units/math.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/isq/electromagnetism.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#endif

int main()
Expand Down
12 changes: 6 additions & 6 deletions example/clcpp_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/iau/iau.h>
#include <mp-units/systems/imperial/imperial.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/iau.h>
#include <mp-units/systems/imperial.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/typographic/typographic.h>
#include <mp-units/systems/usc/usc.h>
#include <mp-units/systems/si.h>
#include <mp-units/systems/typographic.h>
#include <mp-units/systems/usc.h>
#endif

namespace {
Expand Down
2 changes: 1 addition & 1 deletion example/conversion_factor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#endif

/*
Expand Down
4 changes: 2 additions & 2 deletions example/foot_pound_second.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/systems/imperial/imperial.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/imperial.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq/mechanics.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/unit_symbols.h>
Expand Down
4 changes: 2 additions & 2 deletions example/glide_computer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import mp_units;
#else
#include <mp-units/math.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/si.h>
#endif

namespace {
Expand Down
6 changes: 3 additions & 3 deletions example/hello_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#endif

using namespace mp_units;
Expand Down
2 changes: 1 addition & 1 deletion example/include/geographic.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import mp_units;
#include <mp-units/format.h>
#include <mp-units/framework.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#endif

namespace geographic {
Expand Down
2 changes: 1 addition & 1 deletion example/measurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import mp_units;
#include <mp-units/framework.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#endif

namespace {
Expand Down
2 changes: 1 addition & 1 deletion example/si_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#endif

template<class T>
Expand Down
4 changes: 2 additions & 2 deletions example/spectroscopy_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#endif

// This example implements a table of units provided in the following article
Expand Down
4 changes: 2 additions & 2 deletions example/storage_tank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import mp_units;
#else
#include <mp-units/format.h>
#include <mp-units/math.h>
#include <mp-units/systems/isq/isq.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/isq.h>
#include <mp-units/systems/si.h>
#endif

// allows standard gravity (acceleration) and weight (force) to be expressed with scalar representation
Expand Down
4 changes: 2 additions & 2 deletions example/strong_angular_quantities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import mp_units;
#else
#include <mp-units/ostream.h>
#include <mp-units/systems/isq_angle/isq_angle.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/isq_angle.h>
#include <mp-units/systems/si.h>
#endif

template<class T>
Expand Down
4 changes: 2 additions & 2 deletions example/total_energy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import mp_units;
#include <mp-units/ostream.h>
#include <mp-units/systems/isq/mechanics.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/natural/natural.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/natural.h>
#include <mp-units/systems/si.h>
#endif

template<class T>
Expand Down
4 changes: 2 additions & 2 deletions example/unmanned_aerial_vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import mp_units;
#else
#include <mp-units/framework/quantity_point.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/unit_symbols.h>
#include <mp-units/systems/si.h>
#endif

using namespace mp_units;
Expand Down
28 changes: 14 additions & 14 deletions src/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,38 @@ cmake_minimum_required(VERSION 3.23)
add_mp_units_module(
systems mp-units-systems
DEPENDENCIES mp-units::core
HEADERS include/mp-units/systems/angular/angular.h
include/mp-units/systems/angular/math.h
HEADERS include/mp-units/systems/angular/math.h
include/mp-units/systems/angular/units.h
include/mp-units/systems/cgs/cgs.h
include/mp-units/systems/hep/hep.h
include/mp-units/systems/iau/iau.h
include/mp-units/systems/iec80000/binary_prefixes.h
include/mp-units/systems/iec80000/iec80000.h
include/mp-units/systems/iec80000/quantities.h
include/mp-units/systems/iec80000/unit_symbols.h
include/mp-units/systems/iec80000/units.h
include/mp-units/systems/imperial/imperial.h
include/mp-units/systems/international/international.h
include/mp-units/systems/isq/atomic_and_nuclear_physics.h
include/mp-units/systems/isq/base_quantities.h
include/mp-units/systems/isq/electromagnetism.h
include/mp-units/systems/isq/isq.h
include/mp-units/systems/isq/light_and_radiation.h
include/mp-units/systems/isq/mechanics.h
include/mp-units/systems/isq/si_quantities.h
include/mp-units/systems/isq/space_and_time.h
include/mp-units/systems/isq/thermodynamics.h
include/mp-units/systems/isq_angle/isq_angle.h
include/mp-units/systems/natural/natural.h
include/mp-units/systems/si/chrono.h
include/mp-units/systems/si/constants.h
include/mp-units/systems/si/math.h
include/mp-units/systems/si/prefixes.h
include/mp-units/systems/si/si.h
include/mp-units/systems/si/unit_symbols.h
include/mp-units/systems/si/units.h
include/mp-units/systems/typographic/typographic.h
include/mp-units/systems/usc/usc.h
include/mp-units/systems/angular.h
include/mp-units/systems/cgs.h
include/mp-units/systems/hep.h
include/mp-units/systems/iau.h
include/mp-units/systems/iec80000.h
include/mp-units/systems/imperial.h
include/mp-units/systems/international.h
include/mp-units/systems/isq.h
include/mp-units/systems/isq_angle.h
include/mp-units/systems/natural.h
include/mp-units/systems/si.h
include/mp-units/systems/typographic.h
include/mp-units/systems/usc.h
MODULE_INTERFACE_UNIT mp-units-systems.cpp
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#pragma once

#include <mp-units/bits/module_macros.h>
#include <mp-units/systems/si/si.h>
#include <mp-units/systems/si.h>
#include <cstdint>

// IWYU pragma: begin_exports
Expand Down
File renamed without changes.
Loading

0 comments on commit 8ea346b

Please sign in to comment.