AMCAX Kernel 1.0.0.0
|
Class for SI Base Units. More...
#include <misc/LengthUnit.hpp>
Public Member Functions | |
AMCAX_API | LengthUnit () |
Default constructor. | |
AMCAX_API | LengthUnit (const LengthUnitType type) |
Construct a new LengthUnit object with a pre-defined non-SI unit. More... | |
AMCAX_API | LengthUnit (const double multiplication) |
Construct a new LengthUnit object with a multiplication. More... | |
AMCAX_API | LengthUnit (const UnitPrefix &prefix) |
Construct a new LengthUnit object with a prefix. More... | |
AMCAX_API | LengthUnit (const LengthUnit &unit) |
Copy constructor. More... | |
AMCAX_API | LengthUnit (const LengthUnit &&unit) noexcept |
Move constructor. More... | |
AMCAX_API LengthUnit & | operator= (const LengthUnit &unit) |
Copy assignment operator. More... | |
AMCAX_API LengthUnit & | operator= (const LengthUnit &&unit) noexcept |
Move assignment operator. More... | |
AMCAX_API | ~LengthUnit () override |
Destructor. | |
AMCAX_API LengthUnit & | SetPrefix (const UnitPrefix prefix) |
Set the prefix of the unit. More... | |
AMCAX_API LengthUnit & | SetMultiplication (const double multiplication) |
Set the multiplication of the unit. More... | |
AMCAX_API bool | operator== (const LengthUnit &other) const |
If the LengthUnit same as the other LengthUnit. More... | |
AMCAX_API bool | operator!= (const LengthUnit &other) const |
If the LengthUnit different from the other LengthUnit. More... | |
AMCAX_API bool | operator< (const LengthUnit &other) const |
If the LengthUnit less than the other LengthUnit. More... | |
AMCAX_API bool | operator> (const LengthUnit &other) const |
If the LengthUnit greater than the other LengthUnit. More... | |
AMCAX_API bool | operator<= (const LengthUnit &other) const |
If the LengthUnit less than or equal to the other LengthUnit. More... | |
AMCAX_API bool | operator>= (const LengthUnit &other) const |
If the LengthUnit greater than or equal to the other LengthUnit. More... | |
AMCAX_API LengthUnit & | UseMicroMeter () |
Set the unit to be a metric micro meter. | |
AMCAX_API LengthUnit & | UseMilliMeter () |
Set the unit to be a metric milli meter. | |
AMCAX_API LengthUnit & | UseCentiMeter () |
Set the unit to be a metric centi meter. | |
AMCAX_API LengthUnit & | UseDeciMeter () |
Set the unit to be a metric deci meter. | |
AMCAX_API LengthUnit & | UseMeter () |
Set the unit to be a metric meter. | |
AMCAX_API LengthUnit & | UseDecaMeter () |
Set the unit to be a metric deca meter. | |
AMCAX_API LengthUnit & | UseHectoMeter () |
Set the unit to be a metric hecto meter. | |
AMCAX_API LengthUnit & | UseKiloMeter () |
Set the unit to be a metric kilo meter. | |
AMCAX_API LengthUnit & | UseFoot () |
Set the unit to be a foot. | |
AMCAX_API LengthUnit & | UseInch () |
Set the unit to be an inch. | |
AMCAX_API LengthUnit & | UseYard () |
Set the unit to be a yard. | |
AMCAX_API LengthUnit & | UseMile () |
Set the unit to be a mile. | |
Public Member Functions inherited from AMCAX::AbstructUnit | |
AMCAX_API const UnitPrefix & | GetPrefix () const |
Get an immutable reference to the prefix of the unit. More... | |
AMCAX_API const double & | GetMultiplication () const |
Get the derived prefix of the unit. More... | |
virtual AMCAX_API double | ToBase (const double value=1.0) const |
Get the derived value of the unit. More... | |
AMCAX_API bool | IsEqual (const AbstructUnit &other, const double tol=1E-12) const |
If the AbstructUnit same as the other AbstructUnit within a tolerance. More... | |
AMCAX_API bool | IsEqualE (const AbstructUnit &other) const |
If the AbstructUnit same as the other AbstructUnit within the epsilon. More... | |
Class for SI Base Units.
AMCAX_API AMCAX::LengthUnit::LengthUnit | ( | const LengthUnitType | type | ) |
Construct a new LengthUnit object with a pre-defined non-SI unit.
type | The predefined non-SI unit |
AMCAX_API AMCAX::LengthUnit::LengthUnit | ( | const double | multiplication | ) |
Construct a new LengthUnit object with a multiplication.
multiplication | How many base units are in the multiplication unit |
AMCAX_API AMCAX::LengthUnit::LengthUnit | ( | const UnitPrefix & | prefix | ) |
Construct a new LengthUnit object with a prefix.
prefix | The prefix of the unit |
AMCAX_API AMCAX::LengthUnit::LengthUnit | ( | const LengthUnit & | unit | ) |
Copy constructor.
other | The other LengthUnit object |
|
noexcept |
Move constructor.
other | The other LengthUnit object |
AMCAX_API bool AMCAX::LengthUnit::operator!= | ( | const LengthUnit & | other | ) | const |
If the LengthUnit different from the other LengthUnit.
other | The other LengthUnit to compare with |
AMCAX_API bool AMCAX::LengthUnit::operator< | ( | const LengthUnit & | other | ) | const |
If the LengthUnit less than the other LengthUnit.
other | The other LengthUnit to compare with |
AMCAX_API bool AMCAX::LengthUnit::operator<= | ( | const LengthUnit & | other | ) | const |
If the LengthUnit less than or equal to the other LengthUnit.
other | The other LengthUnit to compare with |
|
noexcept |
AMCAX_API LengthUnit & AMCAX::LengthUnit::operator= | ( | const LengthUnit & | unit | ) |
AMCAX_API bool AMCAX::LengthUnit::operator== | ( | const LengthUnit & | other | ) | const |
If the LengthUnit same as the other LengthUnit.
other | The other LengthUnit to compare with |
AMCAX_API bool AMCAX::LengthUnit::operator> | ( | const LengthUnit & | other | ) | const |
If the LengthUnit greater than the other LengthUnit.
other | The other LengthUnit to compare with |
AMCAX_API bool AMCAX::LengthUnit::operator>= | ( | const LengthUnit & | other | ) | const |
If the LengthUnit greater than or equal to the other LengthUnit.
other | The other LengthUnit to compare with |
AMCAX_API LengthUnit & AMCAX::LengthUnit::SetMultiplication | ( | const double | multiplication | ) |
Set the multiplication of the unit.
multiplication | How many base units are in the multiplication unit |
AMCAX_API LengthUnit & AMCAX::LengthUnit::SetPrefix | ( | const UnitPrefix | prefix | ) |