|
@@ -3,14 +3,15 @@
|
|
* Company: Lynar Studios
|
|
* Company: Lynar Studios
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* Created: 2020-08-25
|
|
* Created: 2020-08-25
|
|
- * Changed: 2020-08-26
|
|
|
|
|
|
+ * Changed: 2020-09-04
|
|
*
|
|
*
|
|
* */
|
|
* */
|
|
|
|
|
|
#include "SerializableJSONLong.hpp"
|
|
#include "SerializableJSONLong.hpp"
|
|
|
|
|
|
-ls_std::SerializableJSONLong::SerializableJSONLong(std::shared_ptr<ls_std::Long> _longValue) : Class("SerializableJSONLong"),
|
|
|
|
-longValue(std::move(_longValue))
|
|
|
|
|
|
+ls_std::SerializableJSONLong::SerializableJSONLong(std::shared_ptr<ls_std::Long> _value) :
|
|
|
|
+Class("SerializableJSONLong"),
|
|
|
|
+value(std::move(_value))
|
|
{}
|
|
{}
|
|
|
|
|
|
ls_std::byte_field ls_std::SerializableJSONLong::marshal()
|
|
ls_std::byte_field ls_std::SerializableJSONLong::marshal()
|
|
@@ -25,14 +26,14 @@ void ls_std::SerializableJSONLong::unmarshal(const ls_std::byte_field& _data)
|
|
this->jsonObject = nlohmann::json::parse(jsonString);
|
|
this->jsonObject = nlohmann::json::parse(jsonString);
|
|
|
|
|
|
if(this->jsonObject.contains("value")) {
|
|
if(this->jsonObject.contains("value")) {
|
|
- *this->longValue = this->jsonObject["value"];
|
|
|
|
|
|
+ *this->value = this->jsonObject["value"];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void ls_std::SerializableJSONLong::_update()
|
|
void ls_std::SerializableJSONLong::_update()
|
|
{
|
|
{
|
|
this->jsonObject = {
|
|
this->jsonObject = {
|
|
- {"class", this->longValue->getClassName()},
|
|
|
|
- {"value", (ls_std::long_type) this->longValue->getValue()}
|
|
|
|
|
|
+ {"class", this->value->getClassName()},
|
|
|
|
+ {"value", (ls_std::long_type) this->value->getValue()}
|
|
};
|
|
};
|
|
}
|
|
}
|