Skip to content

Commit f024bbd

Browse files
committed
Update main to output generated at b7927f0
1 parent 66d40e1 commit f024bbd

33 files changed

+1248
-386
lines changed

include/unit_system.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@
55

66
//all of the constatns that are generated
77
#include "unit_system/constants.hpp"
8-
9-
//all of the conbinations that are generated
10-
#include "unit_system/combinations.hpp"

include/unit_system/acceleration.hpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313

1414
namespace sakurajin{
1515
namespace unit_system{
16+
17+
18+
class time_si;
19+
20+
class speed;
21+
22+
class mass;
23+
24+
class force;
25+
26+
27+
1628
class UNIT_SYSTEM_EXPORT_MACRO acceleration {
1729
public:
1830
const long double multiplier;
@@ -49,6 +61,10 @@ namespace sakurajin{
4961

5062
explicit operator long double() const;
5163

64+
acceleration convert_multiplier(long double new_multiplier = 1) const;
65+
acceleration convert_offset(long double new_offset = 0) const;
66+
acceleration convert_copy(long double new_multiplier = 1, long double new_offset = 0) const;
67+
5268
#if __cplusplus >= 202002L
5369
int operator<=>(const acceleration& other) const;
5470
#else
@@ -59,6 +75,24 @@ namespace sakurajin{
5975
bool operator==(const acceleration& other) const;
6076
bool operator!=(const acceleration& other) const;
6177
#endif
78+
79+
80+
81+
82+
83+
84+
speed operator*(const time_si& other) const;
85+
86+
87+
88+
89+
90+
force operator*(const mass& other) const;
91+
92+
93+
94+
95+
6296
};
6397

6498
UNIT_SYSTEM_EXPORT_MACRO acceleration unit_cast(const acceleration& unit, long double new_multiplier = 1, long double new_offset = 0);

include/unit_system/amount.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
namespace sakurajin{
1515
namespace unit_system{
16+
17+
1618
class UNIT_SYSTEM_EXPORT_MACRO amount {
1719
public:
1820
const long double multiplier;
@@ -49,6 +51,10 @@ namespace sakurajin{
4951

5052
explicit operator long double() const;
5153

54+
amount convert_multiplier(long double new_multiplier = 1) const;
55+
amount convert_offset(long double new_offset = 0) const;
56+
amount convert_copy(long double new_multiplier = 1, long double new_offset = 0) const;
57+
5258
#if __cplusplus >= 202002L
5359
int operator<=>(const amount& other) const;
5460
#else
@@ -59,6 +65,8 @@ namespace sakurajin{
5965
bool operator==(const amount& other) const;
6066
bool operator!=(const amount& other) const;
6167
#endif
68+
69+
6270
};
6371

6472
UNIT_SYSTEM_EXPORT_MACRO amount unit_cast(const amount& unit, long double new_multiplier = 1, long double new_offset = 0);

include/unit_system/area.hpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313

1414
namespace sakurajin{
1515
namespace unit_system{
16+
17+
18+
class length;
19+
20+
21+
1622
class UNIT_SYSTEM_EXPORT_MACRO area {
1723
public:
1824
const long double multiplier;
@@ -49,6 +55,10 @@ namespace sakurajin{
4955

5056
explicit operator long double() const;
5157

58+
area convert_multiplier(long double new_multiplier = 1) const;
59+
area convert_offset(long double new_offset = 0) const;
60+
area convert_copy(long double new_multiplier = 1, long double new_offset = 0) const;
61+
5262
#if __cplusplus >= 202002L
5363
int operator<=>(const area& other) const;
5464
#else
@@ -59,6 +69,18 @@ namespace sakurajin{
5969
bool operator==(const area& other) const;
6070
bool operator!=(const area& other) const;
6171
#endif
72+
73+
74+
75+
76+
length sqrt() const;
77+
78+
79+
80+
length operator/(const length& other) const;
81+
82+
83+
6284
};
6385

6486
UNIT_SYSTEM_EXPORT_MACRO area unit_cast(const area& unit, long double new_multiplier = 1, long double new_offset = 0);

include/unit_system/combinations.hpp

Lines changed: 0 additions & 82 deletions
This file was deleted.

include/unit_system/electric_current.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
namespace sakurajin{
1515
namespace unit_system{
16+
17+
1618
class UNIT_SYSTEM_EXPORT_MACRO electric_current {
1719
public:
1820
const long double multiplier;
@@ -49,6 +51,10 @@ namespace sakurajin{
4951

5052
explicit operator long double() const;
5153

54+
electric_current convert_multiplier(long double new_multiplier = 1) const;
55+
electric_current convert_offset(long double new_offset = 0) const;
56+
electric_current convert_copy(long double new_multiplier = 1, long double new_offset = 0) const;
57+
5258
#if __cplusplus >= 202002L
5359
int operator<=>(const electric_current& other) const;
5460
#else
@@ -59,6 +65,8 @@ namespace sakurajin{
5965
bool operator==(const electric_current& other) const;
6066
bool operator!=(const electric_current& other) const;
6167
#endif
68+
69+
6270
};
6371

6472
UNIT_SYSTEM_EXPORT_MACRO electric_current unit_cast(const electric_current& unit, long double new_multiplier = 1, long double new_offset = 0);

include/unit_system/energy.hpp

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@
1313

1414
namespace sakurajin{
1515
namespace unit_system{
16+
17+
18+
class force;
19+
20+
class length;
21+
22+
class power;
23+
24+
class time_si;
25+
26+
class momentum;
27+
28+
class speed;
29+
30+
31+
1632
class UNIT_SYSTEM_EXPORT_MACRO energy {
1733
public:
1834
const long double multiplier;
@@ -49,6 +65,10 @@ namespace sakurajin{
4965

5066
explicit operator long double() const;
5167

68+
energy convert_multiplier(long double new_multiplier = 1) const;
69+
energy convert_offset(long double new_offset = 0) const;
70+
energy convert_copy(long double new_multiplier = 1, long double new_offset = 0) const;
71+
5272
#if __cplusplus >= 202002L
5373
int operator<=>(const energy& other) const;
5474
#else
@@ -59,6 +79,38 @@ namespace sakurajin{
5979
bool operator==(const energy& other) const;
6080
bool operator!=(const energy& other) const;
6181
#endif
82+
83+
84+
85+
86+
length operator/(const force& other) const;
87+
88+
89+
90+
force operator/(const length& other) const;
91+
92+
93+
94+
95+
96+
time_si operator/(const power& other) const;
97+
98+
99+
100+
power operator/(const time_si& other) const;
101+
102+
103+
104+
105+
106+
speed operator/(const momentum& other) const;
107+
108+
109+
110+
momentum operator/(const speed& other) const;
111+
112+
113+
62114
};
63115

64116
UNIT_SYSTEM_EXPORT_MACRO energy unit_cast(const energy& unit, long double new_multiplier = 1, long double new_offset = 0);

0 commit comments

Comments
 (0)