AMCAX Kernel 1.0.0.0
AMCAX::AmountOfSubstanceUnit Class Reference

Class for SI Base Units. More...

#include <misc/AmountOfSubstanceUnit.hpp>

Inheritance diagram for AMCAX::AmountOfSubstanceUnit:
Collaboration diagram for AMCAX::AmountOfSubstanceUnit:

Public Member Functions

AMCAX_API AmountOfSubstanceUnit ()
 Default constructor.
 
AMCAX_API AmountOfSubstanceUnit (const double multiplication)
 Construct a new AmountOfSubstanceUnit object with a multiplication. More...
 
AMCAX_API AmountOfSubstanceUnit (const UnitPrefix prefix)
 Construct a new AmountOfSubstanceUnit object with a prefix. More...
 
AMCAX_API AmountOfSubstanceUnit (const AmountOfSubstanceUnit &other)
 Copy constructor. More...
 
AMCAX_API AmountOfSubstanceUnit (const AmountOfSubstanceUnit &&other) noexcept
 Move constructor. More...
 
AMCAX_API AmountOfSubstanceUnitoperator= (const AmountOfSubstanceUnit &other)
 Copy assignment operator. More...
 
AMCAX_API AmountOfSubstanceUnitoperator= (const AmountOfSubstanceUnit &&other) noexcept
 Move assignment operator. More...
 
AMCAX_API ~AmountOfSubstanceUnit () override
 Destructor.
 
AMCAX_API AmountOfSubstanceUnitSetPrefix (const UnitPrefix prefix)
 Set the prefix of the unit. More...
 
AMCAX_API AmountOfSubstanceUnitSetMultiplication (const double multiplication)
 Set the multiplication of the unit. More...
 
AMCAX_API bool operator== (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit same as the other AmountOfSubstanceUnit. More...
 
AMCAX_API bool operator!= (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit different from the other AmountOfSubstanceUnit. More...
 
AMCAX_API bool operator< (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit less than the other AmountOfSubstanceUnit. More...
 
AMCAX_API bool operator> (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit greater than the other AmountOfSubstanceUnit. More...
 
AMCAX_API bool operator<= (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit less than or equal to the other AmountOfSubstanceUnit. More...
 
AMCAX_API bool operator>= (const AmountOfSubstanceUnit &other) const
 If the AmountOfSubstanceUnit greater than or equal to the other AmountOfSubstanceUnit. More...
 
- Public Member Functions inherited from AMCAX::AbstructUnit
AMCAX_API const UnitPrefixGetPrefix () 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...
 

Detailed Description

Class for SI Base Units.

Constructor & Destructor Documentation

◆ AmountOfSubstanceUnit() [1/4]

AMCAX_API AMCAX::AmountOfSubstanceUnit::AmountOfSubstanceUnit ( const double  multiplication)

Construct a new AmountOfSubstanceUnit object with a multiplication.

Parameters
multiplicationHow many base units are in the multiplication unit
Note
This constructor should only be used to create a non-SI unit

◆ AmountOfSubstanceUnit() [2/4]

AMCAX_API AMCAX::AmountOfSubstanceUnit::AmountOfSubstanceUnit ( const UnitPrefix  prefix)

Construct a new AmountOfSubstanceUnit object with a prefix.

Parameters
prefixThe prefix of the unit

◆ AmountOfSubstanceUnit() [3/4]

AMCAX_API AMCAX::AmountOfSubstanceUnit::AmountOfSubstanceUnit ( const AmountOfSubstanceUnit other)

Copy constructor.

Parameters
otherThe other AmountOfSubstanceUnit object

◆ AmountOfSubstanceUnit() [4/4]

AMCAX_API AMCAX::AmountOfSubstanceUnit::AmountOfSubstanceUnit ( const AmountOfSubstanceUnit &&  other)
noexcept

Move constructor.

Parameters
otherThe other AmountOfSubstanceUnit object

Member Function Documentation

◆ operator!=()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator!= ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit different from the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is different from the other AmountOfSubstanceUnit, false otherwise

◆ operator<()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator< ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit less than the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is less than the other AmountOfSubstanceUnit, false otherwise

◆ operator<=()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator<= ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit less than or equal to the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is less than or equal to the other AmountOfSubstanceUnit, false otherwise

◆ operator=() [1/2]

AMCAX_API AmountOfSubstanceUnit & AMCAX::AmountOfSubstanceUnit::operator= ( const AmountOfSubstanceUnit &&  other)
noexcept

Move assignment operator.

Parameters
otherThe other AmountOfSubstanceUnit object
Returns
The AmountOfSubstanceUnit object

◆ operator=() [2/2]

AMCAX_API AmountOfSubstanceUnit & AMCAX::AmountOfSubstanceUnit::operator= ( const AmountOfSubstanceUnit other)

Copy assignment operator.

Parameters
otherThe other AmountOfSubstanceUnit object
Returns
The AmountOfSubstanceUnit object

◆ operator==()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator== ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit same as the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is the same as the other AmountOfSubstanceUnit, false otherwise

◆ operator>()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator> ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit greater than the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is greater than the other AmountOfSubstanceUnit, false otherwise

◆ operator>=()

AMCAX_API bool AMCAX::AmountOfSubstanceUnit::operator>= ( const AmountOfSubstanceUnit other) const

If the AmountOfSubstanceUnit greater than or equal to the other AmountOfSubstanceUnit.

Parameters
otherThe other AmountOfSubstanceUnit to compare with
Returns
True if the AmountOfSubstanceUnit is greater than or equal to the other AmountOfSubstanceUnit, false otherwise

◆ SetMultiplication()

AMCAX_API AmountOfSubstanceUnit & AMCAX::AmountOfSubstanceUnit::SetMultiplication ( const double  multiplication)

Set the multiplication of the unit.

Parameters
multiplicationHow many base units are in the multiplication unit
Returns
The AmountOfSubstanceUnit object

◆ SetPrefix()

AMCAX_API AmountOfSubstanceUnit & AMCAX::AmountOfSubstanceUnit::SetPrefix ( const UnitPrefix  prefix)

Set the prefix of the unit.

Parameters
prefixThe prefix of the unit
Returns
The AmountOfSubstanceUnit object

The documentation for this class was generated from the following file: