Skip to content

Commit

Permalink
refactor: 💥 iec80000 system renamed to iec
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Sep 20, 2024
1 parent e6c65d6 commit e92178a
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/users_guide/framework_basics/design_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For example:
_luminous intensity_ ($\mathsf{J}$) are the base dimensions of the [ISQ](../../appendix/glossary.md#isq).
- A derived dimension of _force_ in the [ISQ](../../appendix/glossary.md#isq) is denoted by
$\textsf{dim }F = \mathsf{LMT}^{–2}$.
- The implementation of IEC 80000 in this library provides `iec80000::dim_traffic_intensity`
- The implementation of IEC 80000 in this library provides `iec::dim_traffic_intensity`
base dimension to extend ISQ with strong information technology quantities.

[Base dimensions](../../appendix/glossary.md#base-dimension) can be defined by the user in
Expand Down
10 changes: 5 additions & 5 deletions src/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ add_mp_units_module(
systems mp-units-systems
DEPENDENCIES mp-units::core
HEADERS include/mp-units/systems/angular/units.h
include/mp-units/systems/iec80000/binary_prefixes.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/iec/binary_prefixes.h
include/mp-units/systems/iec/quantities.h
include/mp-units/systems/iec/unit_symbols.h
include/mp-units/systems/iec/units.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
Expand All @@ -44,7 +44,7 @@ add_mp_units_module(
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/iec.h
include/mp-units/systems/imperial.h
include/mp-units/systems/international.h
include/mp-units/systems/isq.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#pragma once

// IWYU pragma: begin_exports
#include <mp-units/systems/iec80000/binary_prefixes.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/iec/binary_prefixes.h>
#include <mp-units/systems/iec/quantities.h>
#include <mp-units/systems/iec/unit_symbols.h>
#include <mp-units/systems/iec/units.h>

#ifndef MP_UNITS_IN_MODULE_INTERFACE
#include <mp-units/framework.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <mp-units/framework/unit.h>
#endif

namespace mp_units::iec80000 {
namespace mp_units::iec {

// clang-format off
template<PrefixableUnit U> struct kibi_ final : prefixed_unit<"Ki", mag_power<2, 10>, U{}> {};
Expand All @@ -54,4 +54,4 @@ template<PrefixableUnit auto U> constexpr yobi_<MP_UNITS_REMOVE_CONST(decltype(U

MP_UNITS_EXPORT_END

} // namespace mp_units::iec80000
} // namespace mp_units::iec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#endif

MP_UNITS_EXPORT
namespace mp_units::iec80000 {
namespace mp_units::iec {

// dimensions of base quantities
// clang-format off
Expand Down Expand Up @@ -75,4 +75,4 @@ QUANTITY_SPEC(decision_content, dimensionless);
// TODO how to model information_content and the following quantities???
// QUANTITY_SPEC(information_content, ...);

} // namespace mp_units::iec80000
} // namespace mp_units::iec
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
#pragma once

#include <mp-units/bits/module_macros.h>
#include <mp-units/systems/iec80000/binary_prefixes.h>
#include <mp-units/systems/iec80000/units.h>
#include <mp-units/systems/iec/binary_prefixes.h>
#include <mp-units/systems/iec/units.h>
#include <mp-units/systems/si/prefixes.h>

MP_UNITS_EXPORT
namespace mp_units::iec80000::unit_symbols {
namespace mp_units::iec::unit_symbols {

// bit
inline constexpr auto kbit = si::kilo<bit>;
Expand Down Expand Up @@ -108,4 +108,4 @@ inline constexpr auto QBd = si::quetta<baud>;
// TODO do we need prefixed versions of Erlang?
inline constexpr auto E = erlang;

} // namespace mp_units::iec80000::unit_symbols
} // namespace mp_units::iec::unit_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
#pragma once

#include <mp-units/bits/module_macros.h>
#include <mp-units/systems/iec80000/quantities.h>
#include <mp-units/systems/iec/quantities.h>
#include <mp-units/systems/si/units.h>

#ifndef MP_UNITS_IN_MODULE_INTERFACE
#include <mp-units/framework/unit.h>
#endif

MP_UNITS_EXPORT
namespace mp_units::iec80000 {
namespace mp_units::iec {

// clang-format off
inline constexpr struct erlang final : named_unit<"E", kind_of<traffic_intensity>> {} erlang;
Expand All @@ -41,4 +41,4 @@ inline constexpr struct byte final : named_unit<"B", mag<8> * bit> {} byte;
inline constexpr struct baud final : named_unit<"Bd", one / si::second, kind_of<modulation_rate>> {} baud;
// clang-format on

} // namespace mp_units::iec80000
} // namespace mp_units::iec
2 changes: 1 addition & 1 deletion src/systems/mp-units-systems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import std;
#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/iec.h>
#include <mp-units/systems/imperial.h>
#include <mp-units/systems/international.h>
#include <mp-units/systems/isq.h>
Expand Down
2 changes: 1 addition & 1 deletion test/static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ add_library(
fixed_string_test.cpp
hep_test.cpp
iau_test.cpp
iec80000_test.cpp
iec_test.cpp
imperial_test.cpp
international_test.cpp
isq_test.cpp
Expand Down
6 changes: 3 additions & 3 deletions test/static/iec80000_test.cpp → test/static/iec_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#include <mp-units/systems/iec80000.h>
#include <mp-units/systems/iec.h>
#include <mp-units/systems/isq/base_quantities.h>
#include <mp-units/systems/si.h>

Expand All @@ -29,8 +29,8 @@
namespace {

using namespace mp_units;
using namespace mp_units::iec80000;
using namespace mp_units::iec80000::unit_symbols;
using namespace mp_units::iec;
using namespace mp_units::iec::unit_symbols;
using namespace mp_units::si::unit_symbols;
using enum mp_units::quantity_character;

Expand Down
4 changes: 2 additions & 2 deletions test/static/unit_symbol_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.

#include <mp-units/systems/iau.h>
#include <mp-units/systems/iec80000.h>
#include <mp-units/systems/iec.h>
#include <mp-units/systems/si.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
Expand All @@ -33,7 +33,7 @@ namespace {

using namespace mp_units;
using namespace mp_units::si;
using namespace mp_units::iec80000;
using namespace mp_units::iec;

using enum text_encoding;
using enum unit_symbol_solidus;
Expand Down

0 comments on commit e92178a

Please sign in to comment.