|
@@ -3,18 +3,18 @@
|
|
|
* Company: Lynar Studios
|
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
|
* Created: 2020-08-17
|
|
|
- * Changed: 2020-11-25
|
|
|
+ * Changed: 2020-11-26
|
|
|
*
|
|
|
* */
|
|
|
|
|
|
#include <ls_std/boxing/Long.hpp>
|
|
|
#include <ls_std/exception/IllegalArithmeticOperationException.hpp>
|
|
|
|
|
|
-ls_std::Long::Long(ls_std::long_type _value) : Class("Long"),
|
|
|
+ls_std::Long::Long(ls_std::long_type _value) : ls_std::Class("Long"),
|
|
|
value(_value)
|
|
|
{}
|
|
|
|
|
|
-ls_std::Long::Long() : Class("Long")
|
|
|
+ls_std::Long::Long() : ls_std::Class("Long")
|
|
|
{}
|
|
|
|
|
|
ls_std::Long::operator ls_std::long_type() const
|
|
@@ -33,7 +33,7 @@ ls_std::long_type ls_std::Long::operator-() const
|
|
|
return -this->value;
|
|
|
}
|
|
|
|
|
|
-ls_std::long_type ls_std::Long::operator+(const Long &_long) const
|
|
|
+ls_std::long_type ls_std::Long::operator+(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value + _long;
|
|
|
}
|
|
@@ -43,7 +43,7 @@ ls_std::long_type ls_std::Long::operator+(ls_std::long_type _value) const
|
|
|
return this->value + _value;
|
|
|
}
|
|
|
|
|
|
-ls_std::long_type ls_std::Long::operator*(const Long &_long) const
|
|
|
+ls_std::long_type ls_std::Long::operator*(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value * _long;
|
|
|
}
|
|
@@ -53,7 +53,7 @@ ls_std::long_type ls_std::Long::operator*(ls_std::long_type _value) const
|
|
|
return this->value * _value;
|
|
|
}
|
|
|
|
|
|
-ls_std::long_type ls_std::Long::operator-(const Long &_long) const
|
|
|
+ls_std::long_type ls_std::Long::operator-(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value - _long;
|
|
|
}
|
|
@@ -63,7 +63,7 @@ ls_std::long_type ls_std::Long::operator-(ls_std::long_type _value) const
|
|
|
return this->value - _value;
|
|
|
}
|
|
|
|
|
|
-ls_std::long_type ls_std::Long::operator/(const Long &_long) const
|
|
|
+ls_std::long_type ls_std::Long::operator/(const ls_std::Long &_long) const
|
|
|
{
|
|
|
if(_long == (ls_std::long_type) 0) {
|
|
|
throw ls_std::IllegalArithmeticOperationException {};
|
|
@@ -81,7 +81,7 @@ ls_std::long_type ls_std::Long::operator/(ls_std::long_type _value) const
|
|
|
return this->value / _value;
|
|
|
}
|
|
|
|
|
|
-ls_std::long_type ls_std::Long::operator%(const Long &_long) const
|
|
|
+ls_std::long_type ls_std::Long::operator%(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value % _long;
|
|
|
}
|
|
@@ -91,7 +91,7 @@ ls_std::long_type ls_std::Long::operator%(ls_std::long_type _value) const
|
|
|
return this->value % _value;
|
|
|
}
|
|
|
|
|
|
-ls_std::Long & ls_std::Long::operator+=(const Long &_long)
|
|
|
+ls_std::Long & ls_std::Long::operator+=(const ls_std::Long &_long)
|
|
|
{
|
|
|
this->value += _long;
|
|
|
return *this;
|
|
@@ -103,7 +103,7 @@ ls_std::Long & ls_std::Long::operator+=(ls_std::long_type _value)
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
-ls_std::Long & ls_std::Long::operator-=(const Long &_long)
|
|
|
+ls_std::Long & ls_std::Long::operator-=(const ls_std::Long &_long)
|
|
|
{
|
|
|
this->value -= _long;
|
|
|
return *this;
|
|
@@ -115,7 +115,7 @@ ls_std::Long & ls_std::Long::operator-=(ls_std::long_type _value)
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
-ls_std::Long & ls_std::Long::operator*=(const Long &_long)
|
|
|
+ls_std::Long & ls_std::Long::operator*=(const ls_std::Long &_long)
|
|
|
{
|
|
|
this->value *= _long;
|
|
|
return *this;
|
|
@@ -127,7 +127,7 @@ ls_std::Long & ls_std::Long::operator*=(ls_std::long_type _value)
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
-ls_std::Long & ls_std::Long::operator/=(const Long &_long)
|
|
|
+ls_std::Long & ls_std::Long::operator/=(const ls_std::Long &_long)
|
|
|
{
|
|
|
if(_long == (ls_std::long_type) 0) {
|
|
|
throw ls_std::IllegalArithmeticOperationException {};
|
|
@@ -147,7 +147,7 @@ ls_std::Long & ls_std::Long::operator/=(ls_std::long_type _value)
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator==(const Long &_long) const
|
|
|
+bool ls_std::Long::operator==(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value == _long;
|
|
|
}
|
|
@@ -157,7 +157,7 @@ bool ls_std::Long::operator==(ls_std::long_type _value) const
|
|
|
return this->value == _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator!=(const Long &_long) const
|
|
|
+bool ls_std::Long::operator!=(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value != _long;
|
|
|
}
|
|
@@ -167,7 +167,7 @@ bool ls_std::Long::operator!=(ls_std::long_type _value) const
|
|
|
return this->value != _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator>(const Long &_long) const
|
|
|
+bool ls_std::Long::operator>(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value > _long;
|
|
|
}
|
|
@@ -177,7 +177,7 @@ bool ls_std::Long::operator>(ls_std::long_type _value) const
|
|
|
return this->value > _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator>=(const Long &_long) const
|
|
|
+bool ls_std::Long::operator>=(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value >= _long;
|
|
|
}
|
|
@@ -187,7 +187,7 @@ bool ls_std::Long::operator>=(ls_std::long_type _value) const
|
|
|
return this->value >= _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator<(const Long &_long) const
|
|
|
+bool ls_std::Long::operator<(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value < _long;
|
|
|
}
|
|
@@ -197,7 +197,7 @@ bool ls_std::Long::operator<(ls_std::long_type _value) const
|
|
|
return this->value < _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator<=(const Long &_long) const
|
|
|
+bool ls_std::Long::operator<=(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value <= _long;
|
|
|
}
|
|
@@ -207,7 +207,7 @@ bool ls_std::Long::operator<=(ls_std::long_type _value) const
|
|
|
return this->value <= _value;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator&&(const Long &_long) const
|
|
|
+bool ls_std::Long::operator&&(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value && _long;
|
|
|
}
|
|
@@ -222,7 +222,7 @@ bool ls_std::Long::operator&&(bool _expression) const
|
|
|
return this->value && _expression;
|
|
|
}
|
|
|
|
|
|
-bool ls_std::Long::operator||(const Long &_long) const
|
|
|
+bool ls_std::Long::operator||(const ls_std::Long &_long) const
|
|
|
{
|
|
|
return this->value || _long;
|
|
|
}
|