Browse Source

Merge remote-tracking branch 'origin/master' into dev

# Conflicts:
#	include/ls_std/boxing/Boolean.hpp
#	include/ls_std/boxing/Double.hpp
#	include/ls_std/boxing/Float.hpp
#	include/ls_std/boxing/Integer.hpp
#	include/ls_std/boxing/Long.hpp
#	include/ls_std/boxing/String.hpp
#	include/ls_std/io/File.hpp
#	include/ls_std/io/FileReader.hpp
#	include/ls_std/io/FileWriter.hpp
#	include/ls_std/io/logging/LogLevel.hpp
#	include/ls_std/io/logging/Logger.hpp
#	include/ls_std/io/xml/XMLAttribute.hpp
#	include/ls_std/io/xml/XMLDeclaration.hpp
#	include/ls_std/io/xml/XMLDocument.hpp
#	include/ls_std/io/xml/XMLNode.hpp
#	include/ls_std/io/xml/XMLReader.hpp
#	include/ls_std/logic/State.hpp
#	include/ls_std/logic/StateConnection.hpp
#	include/ls_std/logic/StateMachine.hpp
#	include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp
#	include/ls_std/serialization/boxing/SerializableJSONDouble.hpp
#	include/ls_std/serialization/boxing/SerializableJSONFloat.hpp
#	include/ls_std/serialization/boxing/SerializableJSONInteger.hpp
#	include/ls_std/serialization/boxing/SerializableJSONLong.hpp
#	include/ls_std/serialization/boxing/SerializableJSONString.hpp
#	include/ls_std/serialization/logic/SerializableJSONState.hpp
#	include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp
#	include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp
#	include/ls_std/time/Date.hpp
Patrick-Christopher Mattulat 3 years ago
parent
commit
09a2a33e0a
73 changed files with 437 additions and 325 deletions
  1. 7 2
      CMakeLists.txt
  2. 19 7
      README.md
  3. 2 2
      include/ls_std/base/Version.hpp
  4. 5 5
      include/ls_std/boxing/Boolean.hpp
  5. 5 5
      include/ls_std/boxing/Double.hpp
  6. 5 5
      include/ls_std/boxing/Float.hpp
  7. 5 5
      include/ls_std/boxing/Integer.hpp
  8. 6 6
      include/ls_std/boxing/Long.hpp
  9. 5 5
      include/ls_std/boxing/String.hpp
  10. 3 3
      include/ls_std/io/File.hpp
  11. 2 2
      include/ls_std/io/FileOutputStream.hpp
  12. 3 3
      include/ls_std/io/FileReader.hpp
  13. 3 3
      include/ls_std/io/FileWriter.hpp
  14. 2 2
      include/ls_std/io/IReader.hpp
  15. 2 2
      include/ls_std/io/IStorable.hpp
  16. 2 2
      include/ls_std/io/IWriter.hpp
  17. 3 3
      include/ls_std/io/logging/LogLevel.hpp
  18. 6 6
      include/ls_std/io/logging/Logger.hpp
  19. 3 3
      include/ls_std/io/xml/XMLAttribute.hpp
  20. 3 3
      include/ls_std/io/xml/XMLDeclaration.hpp
  21. 3 3
      include/ls_std/io/xml/XMLDocument.hpp
  22. 3 3
      include/ls_std/io/xml/XMLNode.hpp
  23. 5 5
      include/ls_std/io/xml/XMLReader.hpp
  24. 3 3
      include/ls_std/logic/State.hpp
  25. 3 3
      include/ls_std/logic/StateConnection.hpp
  26. 3 3
      include/ls_std/logic/StateMachine.hpp
  27. 2 2
      include/ls_std/serialization/ISerializable.hpp
  28. 8 7
      include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp
  29. 8 7
      include/ls_std/serialization/boxing/SerializableJSONDouble.hpp
  30. 8 7
      include/ls_std/serialization/boxing/SerializableJSONFloat.hpp
  31. 8 7
      include/ls_std/serialization/boxing/SerializableJSONInteger.hpp
  32. 8 7
      include/ls_std/serialization/boxing/SerializableJSONLong.hpp
  33. 7 6
      include/ls_std/serialization/boxing/SerializableJSONString.hpp
  34. 9 10
      include/ls_std/serialization/logic/SerializableJSONState.hpp
  35. 9 8
      include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp
  36. 8 7
      include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp
  37. 3 3
      include/ls_std/time/Date.hpp
  38. 2 2
      source/ls_std/base/Class.cpp
  39. 2 2
      source/ls_std/base/Version.cpp
  40. 3 3
      source/ls_std/boxing/Boolean.cpp
  41. 2 2
      source/ls_std/boxing/Double.cpp
  42. 2 2
      source/ls_std/boxing/Float.cpp
  43. 3 3
      source/ls_std/boxing/Integer.cpp
  44. 3 3
      source/ls_std/boxing/Long.cpp
  45. 2 2
      source/ls_std/boxing/String.cpp
  46. 4 4
      source/ls_std/io/File.cpp
  47. 4 4
      source/ls_std/io/FileOutputStream.cpp
  48. 4 4
      source/ls_std/io/FileReader.cpp
  49. 4 4
      source/ls_std/io/FileWriter.cpp
  50. 2 2
      source/ls_std/io/StandardOutputWriter.cpp
  51. 4 4
      source/ls_std/io/StorableFile.cpp
  52. 2 2
      source/ls_std/io/logging/LogLevel.cpp
  53. 6 6
      source/ls_std/io/logging/Logger.cpp
  54. 2 2
      source/ls_std/io/xml/XMLAttribute.cpp
  55. 2 2
      source/ls_std/io/xml/XMLDeclaration.cpp
  56. 2 2
      source/ls_std/io/xml/XMLDocument.cpp
  57. 3 3
      source/ls_std/io/xml/XMLNode.cpp
  58. 5 5
      source/ls_std/io/xml/XMLReader.cpp
  59. 2 2
      source/ls_std/io/xml/XMLReaderMock.cpp
  60. 2 2
      source/ls_std/logic/State.cpp
  61. 2 2
      source/ls_std/logic/StateConnection.cpp
  62. 2 2
      source/ls_std/logic/StateMachine.cpp
  63. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONBoolean.cpp
  64. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONDouble.cpp
  65. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONFloat.cpp
  66. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONInteger.cpp
  67. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONLong.cpp
  68. 17 6
      source/ls_std/serialization/json/boxing/SerializableJSONString.cpp
  69. 29 32
      source/ls_std/serialization/json/logic/SerializableJSONState.cpp
  70. 19 8
      source/ls_std/serialization/json/logic/SerializableJSONStateConnection.cpp
  71. 23 9
      source/ls_std/serialization/json/logic/SerializableJSONStateMachine.cpp
  72. 2 2
      source/ls_std/time/Date.cpp
  73. 2 2
      test/cases/serialization/json/JSONTest.cpp

+ 7 - 2
CMakeLists.txt

@@ -4,7 +4,7 @@
 
 cmake_minimum_required(VERSION 3.17)
 set(PROJECT_NAME ls_std)
-set(RELEASE_VERSION 2020.2.0)
+set(RELEASE_VERSION 2020.2.3)
 project(${PROJECT_NAME})
 
 ##########################################################
@@ -23,7 +23,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 message("${PROJECT_NAME}: Adding include directories...")
 
 include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googletest/include)
-include_directories(${CMAKE_CURRENT_LIST_DIR}/include/ls_std/lib/nlohmann_json/include/nlohmann)
 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
 
 ######################################################
@@ -127,9 +126,15 @@ set(TEST_FILES
 message("${PROJECT_NAME}: Building version ${RELEASE_VERSION}...")
 
 add_executable(${PROJECT_NAME}_test ${TEST_FILES})
+
 add_library("${PROJECT_NAME}_${RELEASE_VERSION}_static" STATIC ${SOURCE_FILES})
+set_target_properties("${PROJECT_NAME}_${RELEASE_VERSION}_static" PROPERTIES DEBUG_POSTFIX "_d")
+
 add_library("${PROJECT_NAME}_${RELEASE_VERSION}_shared" SHARED ${SOURCE_FILES})
+set_target_properties("${PROJECT_NAME}_${RELEASE_VERSION}_shared" PROPERTIES DEBUG_POSTFIX "_d")
+
 add_library("${PROJECT_NAME}_${RELEASE_VERSION}_module" MODULE ${SOURCE_FILES})
+set_target_properties("${PROJECT_NAME}_${RELEASE_VERSION}_module" PROPERTIES DEBUG_POSTFIX "_d")
 
 ##########################################################
 # Linking

+ 19 - 7
README.md

@@ -1,4 +1,4 @@
-# Lynar Studios - Standard Library 2020.2.0 #
+# Lynar Studios - Standard Library 2020.2.3 #
 
 This is a cross-platform standard library written in C++ which provides basic functionality and implementation, like:
  
@@ -16,12 +16,10 @@ It has been tested on __Windows__, __Linux__ and __MacOS__ systems.
 
 ### Change Log ###
 
-- isolated header files by restructuring the project
-- improved Logger class by passing IWriter implementation to constructor
-- improved exceptions by adding exception name to messages
-- added NullPointerException
-- added StandardOutputWriter class, which is an IWriter implementation
-- improved CMakeLists.txt by removing unnecessary header files and also generating static, shared and module libraries now
+- added missing nullptr exception handling inside serialization class constructors
+- fixed serialization assignment
+- replaced include directives in source files
+- reduced complexity inside SerializableJSONState class
 
 ### Documentation ###
 
@@ -52,6 +50,20 @@ Inside __cmake_build_release__ folder you will now find cmake generated files. T
 cmake --build . --config Release
 ```
 
+### Add Library To Your Project ###
+
+If you would like to add this library to your cmake project - to the __CMakeLists.txt__ file - make sure that you add the libraries' include directory:
+
+```
+include_directories(${CMAKE_CURRENT_LIST_DIR}/path/to/this/library/include)
+```
+
+Then link the library binary file inside your __CMakeLists.txt__ file:
+
+```
+target_link_libraries(... "path/to/this/library/../libls_std_YYYY.MAJOR.MINOR.dll")
+```
+
 ### Testing ###
 
 This project contains unit tests to accomplish test coverage.  

+ 2 - 2
include/ls_std/base/Version.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,7 +11,7 @@
 #define LS_STD_VERSION_HPP
 
 #include "Class.hpp"
-#include "../serialization/ISerializable.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
 #include "Types.hpp"
 
 namespace ls_std {

+ 5 - 5
include/ls_std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,10 +11,10 @@
 #define LS_STD_BOOLEAN_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IBoxing.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 
 namespace ls_std {
   class Boolean : public Class, public IBoxing, public ISerializable, public IStorable {
@@ -22,7 +22,7 @@ namespace ls_std {
 
       explicit Boolean(bool _value);
       Boolean();
-      ~Boolean() override = default;
+      ~Boolean() = default;
 
       // conversion operator
 

+ 5 - 5
include/ls_std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,10 +11,10 @@
 #define LS_STD_DOUBLE_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IBoxing.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 
 namespace ls_std {
   class Double : public Class, public IBoxing, public ISerializable, public IStorable {
@@ -22,7 +22,7 @@ namespace ls_std {
 
       Double();
       explicit Double(double _value);
-      ~Double() override = default;
+      ~Double() = default;
 
       // conversion operator
 

+ 5 - 5
include/ls_std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,10 +11,10 @@
 #define LS_STD_FLOAT_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IBoxing.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 
 namespace ls_std {
   class Float : public Class, public IBoxing, public ISerializable, public IStorable {
@@ -22,7 +22,7 @@ namespace ls_std {
 
       Float();
       explicit Float(float _value);
-      ~Float() override = default;
+      ~Float() = default;
 
       // conversion operator
 

+ 5 - 5
include/ls_std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,10 +11,10 @@
 #define LS_STD_INTEGER_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IBoxing.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 
 namespace ls_std {
   class Integer : public Class, public IBoxing, public ISerializable, public IStorable {
@@ -22,7 +22,7 @@ namespace ls_std {
 
       explicit Integer(int _value);
       Integer();
-      ~Integer() override = default;
+      ~Integer() = default;
 
       // conversion operator
 

+ 6 - 6
include/ls_std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,11 +11,11 @@
 #define LS_STD_LONG_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IBoxing.hpp"
-#include "../base/Types.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/base/Types.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 
 namespace ls_std {
   class Long : public Class, public IBoxing, public ISerializable, public IStorable {
@@ -23,7 +23,7 @@ namespace ls_std {
 
       explicit Long(ls_std::long_type _value);
       Long();
-      ~Long() override = default;
+      ~Long() = default;
 
       // conversion operator
 

+ 5 - 5
include/ls_std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,9 +11,9 @@
 #define LS_STD_STRING_HPP
 
 #include "IBoxing.hpp"
-#include "../base/Class.hpp"
-#include "../serialization/ISerializable.hpp"
-#include "../io/IStorable.hpp"
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/io/IStorable.hpp>
 #include <string>
 #include <memory>
 #include <vector>
@@ -24,7 +24,7 @@ namespace ls_std {
 
       String();
       explicit String(std::string _value);
-      ~String() override = default;
+      ~String() = default;
 
       // conversion operator
 

+ 3 - 3
include/ls_std/io/File.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_FILE_HPP
 #define LS_STD_FILE_HPP
 
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include <string>
 #include <vector>
 #include <list>
@@ -30,7 +30,7 @@ namespace ls_std {
     public:
 
       explicit File(std::string _absoluteFilePath);
-      ~File() override = default;
+      ~File() = default;
 
       // comparison operators
 

+ 2 - 2
include/ls_std/io/FileOutputStream.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_FILE_OUTPUT_STREAM_HPP
 #define LS_STD_FILE_OUTPUT_STREAM_HPP
 
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "File.hpp"
 #include "IWriter.hpp"
 #include <fstream>

+ 3 - 3
include/ls_std/io/FileReader.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_FILE_READER_HPP
 #define LS_STD_FILE_READER_HPP
 
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "File.hpp"
 #include "IReader.hpp"
 
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit FileReader(File& _file);
-      ~FileReader() override = default;
+      ~FileReader() = default;
 
       ls_std::byte_field read() override;
       void reset(File& _file);

+ 3 - 3
include/ls_std/io/FileWriter.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_FILE_WRITER_HPP
 #define LS_STD_FILE_WRITER_HPP
 
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "IWriter.hpp"
 #include "File.hpp"
 
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit FileWriter(File& _file);
-      ~FileWriter() override = default;
+      ~FileWriter() = default;
 
       void reset(File& _file);
       bool write(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/io/IReader.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_I_READER_HPP
 #define LS_STD_I_READER_HPP
 
-#include "../base/Types.hpp"
+#include <ls_std/base/Types.hpp>
 
 namespace ls_std {
   class IReader {

+ 2 - 2
include/ls_std/io/IStorable.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_I_STORABLE_HPP
 #define LS_STD_I_STORABLE_HPP
 
-#include "../base/Types.hpp"
+#include <ls_std/base/Types.hpp>
 
 namespace ls_std {
   class IStorable {

+ 2 - 2
include/ls_std/io/IWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,7 +11,7 @@
 #define LS_STD_I_WRITER_HPP
 
 #include <vector>
-#include "../base/Types.hpp"
+#include <ls_std/base/Types.hpp>
 
 namespace ls_std {
   class IWriter {

+ 3 - 3
include/ls_std/io/logging/LogLevel.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,7 +11,7 @@
 #define LS_STD_LOG_LEVEL_HPP
 
 #include <unordered_map>
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "LogLevelValue.hpp"
 
 namespace ls_std {
@@ -20,7 +20,7 @@ namespace ls_std {
 
       explicit LogLevel(const ls_std::LogLevelValue& _value);
       LogLevel();
-      ~LogLevel() override = default;
+      ~LogLevel() = default;
 
       operator unsigned char() const;
       LogLevel& operator=(const ls_std::LogLevelValue& _value);

+ 6 - 6
include/ls_std/io/logging/Logger.hpp

@@ -3,18 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_LOGGER_HPP
 #define LS_STD_LOGGER_HPP
 
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "LogLevel.hpp"
-#include "../IWriter.hpp"
-#include "../File.hpp"
-#include "../FileOutputStream.hpp"
+#include <ls_std/io/IWriter.hpp>
+#include <ls_std/io/File.hpp>
+#include <ls_std/io/FileOutputStream.hpp>
 #include <string>
 
 namespace ls_std {
@@ -22,7 +22,7 @@ namespace ls_std {
     public:
 
       explicit Logger(const std::shared_ptr<ls_std::IWriter>& _writer);
-      ~Logger() override = default;
+      ~Logger() = default;
 
       void debug(const ls_std::byte* _data);
       void error(const ls_std::byte* _data);

+ 3 - 3
include/ls_std/io/xml/XMLAttribute.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_XML_ATTRIBUTE_HPP
 #define LS_STD_XML_ATTRIBUTE_HPP
 
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include <string>
 
 namespace ls_std {
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       explicit XMLAttribute(std::string _name);
-      ~XMLAttribute() override = default;
+      ~XMLAttribute() = default;
 
       std::string getName();
       std::string getValue();

+ 3 - 3
include/ls_std/io/xml/XMLDeclaration.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_XML_DECLARATION_HPP
 #define LS_STD_XML_DECLARATION_HPP
 
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "XMLAttribute.hpp"
 
 namespace ls_std {
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       explicit XMLDeclaration(std::string _version);
-      ~XMLDeclaration() override = default;
+      ~XMLDeclaration() = default;
 
       std::string getEncoding();
       std::string getStandalone();

+ 3 - 3
include/ls_std/io/xml/XMLDocument.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,7 +11,7 @@
 #define LS_STD_XML_DOCUMENT_HPP
 
 #include <memory>
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "XMLNode.hpp"
 #include "XMLDeclaration.hpp"
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       XMLDocument();
-      ~XMLDocument() override = default;
+      ~XMLDocument() = default;
 
       std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
       std::shared_ptr<ls_std::XMLNode> getRootElement();

+ 3 - 3
include/ls_std/io/xml/XMLNode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -12,7 +12,7 @@
 
 #include <list>
 #include <memory>
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "XMLAttribute.hpp"
 
 namespace ls_std {
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       explicit XMLNode(std::string _name);
-      ~XMLNode() override = default;
+      ~XMLNode() = default;
 
       bool addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);
       bool addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);

+ 5 - 5
include/ls_std/io/xml/XMLReader.hpp

@@ -3,17 +3,17 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_XML_READER_HPP
 #define LS_STD_XML_READER_HPP
 
-#include "../../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "XMLDocument.hpp"
-#include "../IReader.hpp"
-#include "../File.hpp"
+#include <ls_std/io/IReader.hpp>
+#include <ls_std/io/File.hpp>
 #include "XMLParseMode.hpp"
 #include "XMLParseData.hpp"
 #include <list>
@@ -23,7 +23,7 @@ namespace ls_std {
     public:
 
       explicit XMLReader(const std::shared_ptr<ls_std::XMLDocument>& _document, const std::string& _absolutePath);
-      ~XMLReader() override = default;
+      ~XMLReader() = default;
 
       // implementation
 

+ 3 - 3
include/ls_std/logic/State.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -12,7 +12,7 @@
 
 #include <memory>
 #include <unordered_map>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "StateMachineTypes.hpp"
 #include "StateConnection.hpp"
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit State(StateId _id);
-      ~State() override = default;
+      ~State() = default;
 
       bool addStateConnection(const StateConnectionId& _connectionId, const std::shared_ptr<State>& _connectedState);
       bool addStateConnection(const std::shared_ptr<StateConnection>& _connection);

+ 3 - 3
include/ls_std/logic/StateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -11,7 +11,7 @@
 #define LS_STD_STATE_CONNECTION_HPP
 
 #include <memory>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "StateMachineTypes.hpp"
 
 namespace ls_std {
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit StateConnection(StateConnectionId _connectionId, StateId _stateId);
-      ~StateConnection() override = default;
+      ~StateConnection() = default;
 
       StateConnectionId getConnectionId();
       StateId getStateId();

+ 3 - 3
include/ls_std/logic/StateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
@@ -14,7 +14,7 @@
 #include <unordered_map>
 #include <string>
 #include <vector>
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include "State.hpp"
 #include "StateMachineTypes.hpp"
 
@@ -23,7 +23,7 @@ namespace ls_std {
     public:
 
       explicit StateMachine(std::string _name);
-      ~StateMachine() override = default;
+      ~StateMachine() = default;
 
       bool addState(const std::shared_ptr<State>& _state);
       std::shared_ptr<State> getCurrentState();

+ 2 - 2
include/ls_std/serialization/ISerializable.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-06
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_HPP
 #define LS_STD_SERIALIZABLE_HPP
 
-#include "../base/Types.hpp"
+#include <ls_std/base/Types.hpp>
 
 namespace ls_std {
   class ISerializable {

+ 8 - 7
include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
@@ -11,17 +11,17 @@
 #define LS_STD_SERIALIZABLE_JSON_BOOLEAN_HPP
 
 #include <memory>
-#include <json.hpp>
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../boxing/Boolean.hpp"
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/boxing/Boolean.hpp>
 
 namespace ls_std {
   class SerializableJSONBoolean : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONBoolean(std::shared_ptr<ls_std::Boolean> _value);
-      ~SerializableJSONBoolean() override = default;
+      explicit SerializableJSONBoolean(const std::shared_ptr<ls_std::Boolean>& _value);
+      ~SerializableJSONBoolean() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -31,6 +31,7 @@ namespace ls_std {
       std::shared_ptr<ls_std::Boolean> value {};
       nlohmann::json jsonObject {};
 
+      void _assignValue(const std::shared_ptr<ls_std::Boolean>& _value);
       void _update();
   };
 }

+ 8 - 7
include/ls_std/serialization/boxing/SerializableJSONDouble.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
@@ -11,17 +11,17 @@
 #define LS_STD_SERIALIZABLE_JSON_DOUBLE_HPP
 
 #include <memory>
-#include <json.hpp>
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../boxing/Double.hpp"
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/boxing/Double.hpp>
 
 namespace ls_std {
   class SerializableJSONDouble : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONDouble(std::shared_ptr<ls_std::Double> _value);
-      ~SerializableJSONDouble() override = default;
+      explicit SerializableJSONDouble(const std::shared_ptr<ls_std::Double>& _value);
+      ~SerializableJSONDouble() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -31,6 +31,7 @@ namespace ls_std {
       std::shared_ptr<ls_std::Double> value {};
       nlohmann::json jsonObject {};
 
+      void _assignValue(const std::shared_ptr<ls_std::Double>& _value);
       void _update();
   };
 }

+ 8 - 7
include/ls_std/serialization/boxing/SerializableJSONFloat.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
@@ -11,17 +11,17 @@
 #define LS_STD_SERIALIZABLE_JSON_FLOAT_HPP
 
 #include <memory>
-#include <json.hpp>
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../boxing/Float.hpp"
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/boxing/Float.hpp>
 
 namespace ls_std {
   class SerializableJSONFloat : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONFloat(std::shared_ptr<ls_std::Float> _value);
-      ~SerializableJSONFloat() override = default;
+      explicit SerializableJSONFloat(const std::shared_ptr<ls_std::Float>& _value);
+      ~SerializableJSONFloat() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -31,6 +31,7 @@ namespace ls_std {
       std::shared_ptr<ls_std::Float> value {};
       nlohmann::json jsonObject {};
 
+      void _assignValue(const std::shared_ptr<ls_std::Float>& _value);
       void _update();
   };
 }

+ 8 - 7
include/ls_std/serialization/boxing/SerializableJSONInteger.hpp

@@ -3,24 +3,24 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_INTEGER_HPP
 #define LS_STD_SERIALIZABLE_JSON_INTEGER_HPP
 
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../boxing/Integer.hpp"
-#include <json.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/boxing/Integer.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
 namespace ls_std {
   class SerializableJSONInteger : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONInteger(std::shared_ptr<ls_std::Integer> _value);
-      ~SerializableJSONInteger() override = default;
+      explicit SerializableJSONInteger(const std::shared_ptr<ls_std::Integer>& _value);
+      ~SerializableJSONInteger() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -30,6 +30,7 @@ namespace ls_std {
       std::shared_ptr<ls_std::Integer> value {};
       nlohmann::json jsonObject {};
 
+      void _assignValue(const std::shared_ptr<ls_std::Integer>& _value);
       void _update();
   };
 }

+ 8 - 7
include/ls_std/serialization/boxing/SerializableJSONLong.hpp

@@ -3,24 +3,24 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_LONG_HPP
 #define LS_STD_SERIALIZABLE_JSON_LONG_HPP
 
-#include "../../../../../include/ls_std/base/Class.hpp"
-#include "../../../../../include/ls_std/serialization/ISerializable.hpp"
-#include "../../../../../include/ls_std/boxing/Long.hpp"
-#include <json.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/boxing/Long.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
 namespace ls_std {
   class SerializableJSONLong : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONLong(std::shared_ptr<ls_std::Long> _value);
-      ~SerializableJSONLong() override = default;
+      explicit SerializableJSONLong(const std::shared_ptr<ls_std::Long>& _value);
+      ~SerializableJSONLong() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -30,6 +30,7 @@ namespace ls_std {
       nlohmann::json jsonObject {};
       std::shared_ptr<ls_std::Long> value {};
 
+      void _assignValue(const std::shared_ptr<ls_std::Long>& _value);
       void _update();
   };
 }

+ 7 - 6
include/ls_std/serialization/boxing/SerializableJSONString.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
@@ -11,16 +11,16 @@
 #define LS_STD_SERIALIZABLE_JSON_STRING_HPP
 
 #include <memory>
-#include <json.hpp>
-#include "../../../../../include/ls_std/serialization/ISerializable.hpp"
-#include "../../../../../include/ls_std/boxing/String.hpp"
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/boxing/String.hpp>
 
 namespace ls_std {
   class SerializableJSONString : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONString(std::shared_ptr<ls_std::String> _value);
-      ~SerializableJSONString() override = default;
+      explicit SerializableJSONString(const std::shared_ptr<ls_std::String>& _value);
+      ~SerializableJSONString() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -30,6 +30,7 @@ namespace ls_std {
       nlohmann::json jsonObject {};
       std::shared_ptr<ls_std::String> value {};
 
+      void _assignValue(const std::shared_ptr<ls_std::String>& _value);
       void _update();
   };
 }

+ 9 - 10
include/ls_std/serialization/logic/SerializableJSONState.hpp

@@ -3,25 +3,25 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_HPP
 
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../logic/State.hpp"
 #include <memory>
-#include <json.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/logic/State.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/base/Class.hpp>
 
 namespace ls_std {
   class SerializableJSONState : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONState(std::shared_ptr<State> _value);
-      ~SerializableJSONState() override = default;
+      explicit SerializableJSONState(const std::shared_ptr<State>& _value);
+      ~SerializableJSONState() = default;
 
       // implementation
 
@@ -30,16 +30,15 @@ namespace ls_std {
 
       // additional functionality
 
-      void setValue(std::shared_ptr<State> _value);
+      void setValue(const std::shared_ptr<State>& _value);
 
     private:
 
       nlohmann::json jsonObject {};
       std::shared_ptr<ls_std::State> value {};
 
+      void _assignValue(const std::shared_ptr<State>& _value);
       void _clear();
-      void _unmarshalExistingStateConnection(nlohmann::json _jsonObject);
-      void _unmarshalNewStateConnection(nlohmann::json _jsonObject);
       void _unmarshalStateConnections();
       void _update();
       void _updateStateConnections();

+ 9 - 8
include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp

@@ -3,25 +3,25 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_CONNECTION_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_CONNECTION_HPP
 
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../logic/StateConnection.hpp"
 #include <memory>
-#include <json.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/logic/StateConnection.hpp>
 
 namespace ls_std {
   class SerializableJSONStateConnection : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONStateConnection(std::shared_ptr<ls_std::StateConnection> _value);
-      ~SerializableJSONStateConnection() override = default;
+      explicit SerializableJSONStateConnection(const std::shared_ptr<ls_std::StateConnection>& _value);
+      ~SerializableJSONStateConnection() = default;
 
       // implementation
 
@@ -30,13 +30,14 @@ namespace ls_std {
 
       // additional functionality
 
-      void setValue(std::shared_ptr<ls_std::StateConnection> _value);
+      void setValue(const std::shared_ptr<ls_std::StateConnection>& _value);
 
     private:
 
       nlohmann::json jsonObject {};
       std::shared_ptr<ls_std::StateConnection> value {};
 
+      void _assignValue(const std::shared_ptr<ls_std::StateConnection>& _value);
       void _clear();
       void _update();
   };

+ 8 - 7
include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp

@@ -3,25 +3,25 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-11-14
+ * Changed:         2020-11-25
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_MACHINE_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_MACHINE_HPP
 
-#include "../../base/Class.hpp"
-#include "../ISerializable.hpp"
-#include "../../logic/StateMachine.hpp"
+#include <ls_std/base/Class.hpp>
+#include <ls_std/serialization/ISerializable.hpp>
+#include <ls_std/logic/StateMachine.hpp>
 #include <memory>
-#include <json.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
 namespace ls_std {
   class SerializableJSONStateMachine : public Class, public ISerializable {
     public:
 
-      explicit SerializableJSONStateMachine(std::shared_ptr<StateMachine> _value);
-      ~SerializableJSONStateMachine() override = default;
+      explicit SerializableJSONStateMachine(const std::shared_ptr<StateMachine>& _value);
+      ~SerializableJSONStateMachine() = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;
@@ -31,6 +31,7 @@ namespace ls_std {
       nlohmann::json jsonObject {};
       std::shared_ptr<ls_std::StateMachine> value {};
 
+      void _assignValue(const std::shared_ptr<StateMachine>& _value);
       void _unmarshalCurrentState();
       void _unmarshalStates();
       void _update();

+ 3 - 3
include/ls_std/time/Date.hpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-14
+ * Changed:         2020-11-20
  *
  * */
 
 #ifndef LS_STD_DATE_HPP
 #define LS_STD_DATE_HPP
 
-#include "../base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 #include <ctime>
 
 namespace ls_std {
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       Date();
-      ~Date() override = default;
+      ~Date() = default;
 
       // arithmetic operators
 

+ 2 - 2
source/ls_std/base/Class.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/base/Class.hpp"
+#include <ls_std/base/Class.hpp>
 
 ls_std::Class::Class(std::string _name):
 name(std::move(_name))

+ 2 - 2
source/ls_std/base/Version.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-28
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <regex>
-#include "../../../include/ls_std/base/Version.hpp"
+#include <ls_std/base/Version.hpp>
 
 ls_std::Version::Version(version_type _majorVersion, version_type _minorVersion, version_type _patchVersion) :
 majorVersion(_majorVersion),

+ 3 - 3
source/ls_std/boxing/Boolean.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <algorithm>
-#include "../../../include/ls_std/boxing/Boolean.hpp"
-#include "../../../include/ls_std/exception/IllegalArgumentException.hpp"
+#include <ls_std/boxing/Boolean.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
 ls_std::Boolean::Boolean() : Class("Boolean")
 {}

+ 2 - 2
source/ls_std/boxing/Double.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <cmath>
-#include "../../../include/ls_std/boxing/Double.hpp"
+#include <ls_std/boxing/Double.hpp>
 
 ls_std::Double::Double() : Class("Double"),
 epsilon(0.00000001)

+ 2 - 2
source/ls_std/boxing/Float.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <cmath>
-#include "../../../include/ls_std/boxing/Float.hpp"
+#include <ls_std/boxing/Float.hpp>
 
 ls_std::Float::Float() : Class("Float"),
 epsilon(0.00001f)

+ 3 - 3
source/ls_std/boxing/Integer.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/boxing/Integer.hpp"
-#include "../../../include/ls_std/exception/IllegalArithmeticOperationException.hpp"
+#include <ls_std/boxing/Integer.hpp>
+#include <ls_std/exception/IllegalArithmeticOperationException.hpp>
 
 ls_std::Integer::Integer(int _value) : Class("Integer"),
 value(_value)

+ 3 - 3
source/ls_std/boxing/Long.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/boxing/Long.hpp"
-#include "../../../include/ls_std/exception/IllegalArithmeticOperationException.hpp"
+#include <ls_std/boxing/Long.hpp>
+#include <ls_std/exception/IllegalArithmeticOperationException.hpp>
 
 ls_std::Long::Long(ls_std::long_type _value) : Class("Long"),
 value(_value)

+ 2 - 2
source/ls_std/boxing/String.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <algorithm>
-#include "../../../include/ls_std/boxing/String.hpp"
+#include <ls_std/boxing/String.hpp>
 
 ls_std::String::String() : Class("String")
 {}

+ 4 - 4
source/ls_std/io/File.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/io/File.hpp"
-#include "../../../include/ls_std/exception/FileOperationException.hpp"
-#include "../../../include/ls_std/io/FilePathSeparatorMatch.hpp"
+#include <ls_std/io/File.hpp>
+#include <ls_std/exception/FileOperationException.hpp>
+#include <ls_std/io/FilePathSeparatorMatch.hpp>
 #include <fstream>
 #include <algorithm>
 #include <sstream>

+ 4 - 4
source/ls_std/io/FileOutputStream.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/io/FileOutputStream.hpp"
-#include "../../../include/ls_std/exception/FileNotFoundException.hpp"
-#include "../../../include/ls_std/exception/FileOperationException.hpp"
+#include <ls_std/io/FileOutputStream.hpp>
+#include <ls_std/exception/FileNotFoundException.hpp>
+#include <ls_std/exception/FileOperationException.hpp>
 
 ls_std::FileOutputStream::FileOutputStream(File &_file) : Class("FileOutputStream"),
 file(_file)

+ 4 - 4
source/ls_std/io/FileReader.cpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <fstream>
-#include "../../../include/ls_std/io/FileReader.hpp"
-#include "../../../include/ls_std/exception/FileNotFoundException.hpp"
-#include "../../../include/ls_std/exception/FileOperationException.hpp"
+#include <ls_std/io/FileReader.hpp>
+#include <ls_std/exception/FileNotFoundException.hpp>
+#include <ls_std/exception/FileOperationException.hpp>
 
 ls_std::FileReader::FileReader(File &_file) : Class("FileReader"),
 file(_file)

+ 4 - 4
source/ls_std/io/FileWriter.cpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <fstream>
-#include "../../../include/ls_std/io/FileWriter.hpp"
-#include "../../../include/ls_std/exception/FileNotFoundException.hpp"
-#include "../../../include/ls_std/exception/FileOperationException.hpp"
+#include <ls_std/io/FileWriter.hpp>
+#include <ls_std/exception/FileNotFoundException.hpp>
+#include <ls_std/exception/FileOperationException.hpp>
 
 ls_std::FileWriter::FileWriter(ls_std::File &_file) : Class("FileWriter"),
 file(_file)

+ 2 - 2
source/ls_std/io/StandardOutputWriter.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <iostream>
-#include "../../../include/ls_std/io/StandardOutputWriter.hpp"
+#include <ls_std/io/StandardOutputWriter.hpp>
 
 bool ls_std::StandardOutputWriter::write(const ls_std::byte_field &_data)
 {

+ 4 - 4
source/ls_std/io/StorableFile.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/io/StorableFile.hpp"
-#include "../../../include/ls_std/io/FileReader.hpp"
-#include "../../../include/ls_std/io/FileWriter.hpp"
+#include <ls_std/io/StorableFile.hpp>
+#include <ls_std/io/FileReader.hpp>
+#include <ls_std/io/FileWriter.hpp>
 
 ls_std::StorableFile::StorableFile(const std::string &_path)
 {

+ 2 - 2
source/ls_std/io/logging/LogLevel.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/logging/LogLevel.hpp"
+#include <ls_std/io/logging/LogLevel.hpp>
 
 ls_std::LogLevel::LogLevel(const ls_std::LogLevelValue& _value) : Class("LogLevel"),
 value(_value)

+ 6 - 6
source/ls_std/io/logging/Logger.cpp

@@ -3,15 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/logging/Logger.hpp"
-#include "../../../../include/ls_std/time/Date.hpp"
-#include "../../../../include/ls_std/io/NewLine.hpp"
-#include "../../../../include/ls_std/boxing/String.hpp"
-#include "../../../../include/ls_std/exception/NullPointerException.hpp"
+#include <ls_std/io/logging/Logger.hpp>
+#include <ls_std/time/Date.hpp>
+#include <ls_std/io/NewLine.hpp>
+#include <ls_std/boxing/String.hpp>
+#include <ls_std/exception/NullPointerException.hpp>
 
 ls_std::Logger::Logger(const std::shared_ptr<ls_std::IWriter> &_writer) : Class("Logger"),
 logLevel(ls_std::LogLevelValue::INFO)

+ 2 - 2
source/ls_std/io/xml/XMLAttribute.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLAttribute.hpp"
+#include <ls_std/io/xml/XMLAttribute.hpp>
 
 ls_std::XMLAttribute::XMLAttribute(std::string _name) : Class("XMLAttribute"),
 name(std::move(_name))

+ 2 - 2
source/ls_std/io/xml/XMLDeclaration.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-29
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLDeclaration.hpp"
+#include <ls_std/io/xml/XMLDeclaration.hpp>
 
 ls_std::XMLDeclaration::XMLDeclaration(std::string _version) :
 Class("XMLDeclaration")

+ 2 - 2
source/ls_std/io/xml/XMLDocument.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-30
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLDocument.hpp"
+#include <ls_std/io/xml/XMLDocument.hpp>
 
 ls_std::XMLDocument::XMLDocument() : Class("XMLDocument")
 {}

+ 3 - 3
source/ls_std/io/xml/XMLNode.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLNode.hpp"
-#include "../../../../include/ls_std/utils/STLUtils.hpp"
+#include <ls_std/io/xml/XMLNode.hpp>
+#include <ls_std/utils/STLUtils.hpp>
 
 ls_std::XMLNode::XMLNode(std::string _name) : Class("XMLNode"),
 name(std::move(_name))

+ 5 - 5
source/ls_std/io/xml/XMLReader.cpp

@@ -3,14 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLReader.hpp"
-#include "../../../../include/ls_std/exception/IllegalArgumentException.hpp"
-#include "../../../../include/ls_std/io/FileReader.hpp"
-#include "../../../../include/ls_std/boxing/String.hpp"
+#include <ls_std/io/xml/XMLReader.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
+#include <ls_std/io/FileReader.hpp>
+#include <ls_std/boxing/String.hpp>
 
 ls_std::XMLReader::XMLReader(const std::shared_ptr<ls_std::XMLDocument>& _document, const std::string& _absolutePath) :
 Class("XMLReader"),

+ 2 - 2
source/ls_std/io/xml/XMLReaderMock.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../include/ls_std/io/xml/XMLReaderMock.hpp"
+#include <ls_std/io/xml/XMLReaderMock.hpp>
 
 ls_std::XMLReaderMock::XMLReaderMock() : XMLReader(nullptr, "")
 {}

+ 2 - 2
source/ls_std/logic/State.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/logic/State.hpp"
+#include <ls_std/logic/State.hpp>
 
 ls_std::State::State(ls_std::StateId _id) : Class("State"),
 id(std::move(_id))

+ 2 - 2
source/ls_std/logic/StateConnection.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/logic/StateConnection.hpp"
+#include <ls_std/logic/StateConnection.hpp>
 
 ls_std::StateConnection::StateConnection(ls_std::StateConnectionId _connectionId, ls_std::StateId _stateId) :
 Class("StateConnection"),

+ 2 - 2
source/ls_std/logic/StateMachine.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../include/ls_std/logic/StateMachine.hpp"
+#include <ls_std/logic/StateMachine.hpp>
 
 ls_std::StateMachine::StateMachine(std::string _name) :
 Class("StateMachine"),

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONBoolean.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONBoolean.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONBoolean::SerializableJSONBoolean(std::shared_ptr<ls_std::Boolean> _value) :
-Class("SerializableJSONBoolean"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONBoolean::SerializableJSONBoolean(const std::shared_ptr<ls_std::Boolean>& _value) :
+Class("SerializableJSONBoolean")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONBoolean::marshal()
 {
@@ -29,6 +31,15 @@ void ls_std::SerializableJSONBoolean::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONBoolean::_assignValue(const std::shared_ptr<ls_std::Boolean> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONBoolean::_update()
 {
   this->jsonObject = {

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONDouble.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONDouble.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONDouble.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONDouble::SerializableJSONDouble(std::shared_ptr<ls_std::Double> _value) :
-Class("SerializableJSONDouble"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONDouble::SerializableJSONDouble(const std::shared_ptr<ls_std::Double>& _value) :
+Class("SerializableJSONDouble")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONDouble::marshal()
 {
@@ -30,6 +32,15 @@ void ls_std::SerializableJSONDouble::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONDouble::_assignValue(const std::shared_ptr<ls_std::Double> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONDouble::_update()
 {
   this->jsonObject = {

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONFloat.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONFloat.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONFloat.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONFloat::SerializableJSONFloat(std::shared_ptr<ls_std::Float> _value) :
-Class("SerializableJSONFloat"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONFloat::SerializableJSONFloat(const std::shared_ptr<ls_std::Float>& _value) :
+Class("SerializableJSONFloat")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONFloat::marshal()
 {
@@ -30,6 +32,15 @@ void ls_std::SerializableJSONFloat::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONFloat::_assignValue(const std::shared_ptr<ls_std::Float> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONFloat::_update()
 {
   this->jsonObject = {

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONInteger.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONInteger.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONInteger.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONInteger::SerializableJSONInteger(std::shared_ptr<ls_std::Integer> _value) :
-Class("SerializableJSONInteger"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONInteger::SerializableJSONInteger(const std::shared_ptr<ls_std::Integer>& _value) :
+Class("SerializableJSONInteger")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONInteger::marshal()
 {
@@ -30,6 +32,15 @@ void ls_std::SerializableJSONInteger::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONInteger::_assignValue(const std::shared_ptr<ls_std::Integer> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONInteger::_update()
 {
   this->jsonObject = {

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONLong.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONLong.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONLong.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONLong::SerializableJSONLong(std::shared_ptr<ls_std::Long> _value) :
-Class("SerializableJSONLong"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONLong::SerializableJSONLong(const std::shared_ptr<ls_std::Long>& _value) :
+Class("SerializableJSONLong")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONLong::marshal()
 {
@@ -30,6 +32,15 @@ void ls_std::SerializableJSONLong::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONLong::_assignValue(const std::shared_ptr<ls_std::Long> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONLong::_update()
 {
   this->jsonObject = {

+ 17 - 6
source/ls_std/serialization/json/boxing/SerializableJSONString.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONString.hpp"
+#include <ls_std/serialization/boxing/SerializableJSONString.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONString::SerializableJSONString(std::shared_ptr<ls_std::String> _value) :
-Class("SerializableJSONString"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONString::SerializableJSONString(const std::shared_ptr<ls_std::String>& _value) :
+Class("SerializableJSONString")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONString::marshal()
 {
@@ -30,6 +32,15 @@ void ls_std::SerializableJSONString::unmarshal(const ls_std::byte_field& _data)
   }
 }
 
+void ls_std::SerializableJSONString::_assignValue(const std::shared_ptr<ls_std::String> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONString::_update()
 {
   this->jsonObject = {

+ 29 - 32
source/ls_std/serialization/json/logic/SerializableJSONState.cpp

@@ -3,17 +3,19 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/logic/SerializableJSONState.hpp"
-#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp"
+#include <ls_std/serialization/logic/SerializableJSONState.hpp>
+#include <ls_std/serialization/logic/SerializableJSONStateConnection.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONState::SerializableJSONState(std::shared_ptr<State> _value) :
-Class("SerializableJSONState"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONState::SerializableJSONState(const std::shared_ptr<State>& _value) :
+Class("SerializableJSONState")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONState::marshal()
 {
@@ -29,51 +31,46 @@ void ls_std::SerializableJSONState::unmarshal(const ls_std::byte_field &_data)
   this->value->setId(this->jsonObject["id"]);
 }
 
-void ls_std::SerializableJSONState::setValue(std::shared_ptr<State> _value)
+void ls_std::SerializableJSONState::setValue(const std::shared_ptr<State>& _value)
 {
-  this->value = std::move(_value);
+  this->_assignValue(_value);
   this->_clear();
 }
 
-void ls_std::SerializableJSONState::_clear()
-{
-  this->jsonObject.clear();
-}
-
-void ls_std::SerializableJSONState::_unmarshalExistingStateConnection(nlohmann::json _jsonObject)
+void ls_std::SerializableJSONState::_assignValue(const std::shared_ptr<State> &_value)
 {
-  std::shared_ptr<ls_std::StateConnection> stateConnection = this->value->getConnectedStates().at(_jsonObject["connectionId"]);
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
 
-  stateConnection->updatePassCondition(_jsonObject["condition"]);
-  stateConnection->setStateId(_jsonObject["stateId"]);
+  this->value = _value;
 }
 
-void ls_std::SerializableJSONState::_unmarshalNewStateConnection(nlohmann::json _jsonObject)
+void ls_std::SerializableJSONState::_clear()
 {
-  ls_std::StateConnectionId connectionId = _jsonObject["connectionId"];
-  ls_std::StateId stateId = _jsonObject["stateId"];
-  std::shared_ptr<ls_std::StateConnection> stateConnection = std::make_shared<ls_std::StateConnection>(connectionId, stateId);
-  stateConnection->updatePassCondition(_jsonObject["condition"]);
-
-  this->value->addStateConnection(stateConnection);
+  this->jsonObject.clear();
 }
 
 void ls_std::SerializableJSONState::_unmarshalStateConnections()
 {
-  for(const auto& connectedState : this->jsonObject["connectedStates"]) {
-    if(this->value->hasConnection(connectedState["connectionId"])) {
-      this->_unmarshalExistingStateConnection(connectedState);
-    }
-    else {
-      this->_unmarshalNewStateConnection(connectedState);
+  if(!this->jsonObject["connectedStates"].empty()) {
+    this->value->clearConnections();
+
+    for(const auto& connectionJSON : this->jsonObject["connectedStates"]) {
+      std::shared_ptr<ls_std::StateConnection> connection = std::make_shared<ls_std::StateConnection>("TMP_ID", "TMP_ID");
+      ls_std::SerializableJSONStateConnection{connection}.unmarshal(connectionJSON.dump());
+      this->value->addStateConnection(connection);
     }
   }
 }
 
 void ls_std::SerializableJSONState::_update()
 {
+  this->jsonObject = {
+      {"id", this->value->getId()}
+  };
+
   this->_updateStateConnections();
-  this->jsonObject["id"] = this->value->getId();
 }
 
 void ls_std::SerializableJSONState::_updateStateConnections()

+ 19 - 8
source/ls_std/serialization/json/logic/SerializableJSONStateConnection.cpp

@@ -3,16 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp"
+#include <ls_std/serialization/logic/SerializableJSONStateConnection.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONStateConnection::SerializableJSONStateConnection(std::shared_ptr<ls_std::StateConnection> _value) :
-Class("SerializableJSONStateConnection"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONStateConnection::SerializableJSONStateConnection(const std::shared_ptr<ls_std::StateConnection>& _value) :
+Class("SerializableJSONStateConnection")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONStateConnection::marshal()
 {
@@ -30,12 +32,21 @@ void ls_std::SerializableJSONStateConnection::unmarshal(const ls_std::byte_field
   this->value->updatePassCondition(this->jsonObject["condition"]);
 }
 
-void ls_std::SerializableJSONStateConnection::setValue(std::shared_ptr<ls_std::StateConnection> _value)
+void ls_std::SerializableJSONStateConnection::setValue(const std::shared_ptr<ls_std::StateConnection>& _value)
 {
-  this->value = std::move(_value);
+  this->_assignValue(_value);
   this->_clear();
 }
 
+void ls_std::SerializableJSONStateConnection::_assignValue(const std::shared_ptr<ls_std::StateConnection> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONStateConnection::_clear()
 {
   this->jsonObject.clear();

+ 23 - 9
source/ls_std/serialization/json/logic/SerializableJSONStateMachine.cpp

@@ -3,17 +3,19 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
-#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp"
-#include "../../../../../include/ls_std/serialization/logic/SerializableJSONState.hpp"
+#include <ls_std/serialization/logic/SerializableJSONStateMachine.hpp>
+#include <ls_std/serialization/logic/SerializableJSONState.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::SerializableJSONStateMachine::SerializableJSONStateMachine(std::shared_ptr<StateMachine> _value) :
-Class("SerializableJSONStateMachine"),
-value(std::move(_value))
-{}
+ls_std::SerializableJSONStateMachine::SerializableJSONStateMachine(const std::shared_ptr<StateMachine>& _value) :
+Class("SerializableJSONStateMachine")
+{
+  this->_assignValue(_value);
+}
 
 ls_std::byte_field ls_std::SerializableJSONStateMachine::marshal()
 {
@@ -31,6 +33,15 @@ void ls_std::SerializableJSONStateMachine::unmarshal(const ls_std::byte_field &_
   this->value->setName(this->jsonObject["name"]);
 }
 
+void ls_std::SerializableJSONStateMachine::_assignValue(const std::shared_ptr<StateMachine> &_value)
+{
+  if(_value == nullptr) {
+    throw ls_std::IllegalArgumentException {};
+  }
+
+  this->value = _value;
+}
+
 void ls_std::SerializableJSONStateMachine::_unmarshalCurrentState()
 {
   if(this->jsonObject.contains("currentState")) {
@@ -49,9 +60,12 @@ void ls_std::SerializableJSONStateMachine::_unmarshalStates()
 
 void ls_std::SerializableJSONStateMachine::_update()
 {
+  this->jsonObject = {
+      {"memory", this->value->getMemory()},
+      {"name", this->value->getName()}
+  };
+
   this->_updateCurrentState();
-  this->jsonObject["memory"] = this->value->getMemory();
-  this->jsonObject["name"] = this->value->getName();
   this->_updateStates();
 }
 

+ 2 - 2
source/ls_std/time/Date.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-25
  *
  * */
 
 #include <iomanip>
 #include <sstream>
-#include "../../../include/ls_std/time/Date.hpp"
+#include <ls_std/time/Date.hpp>
 
 ls_std::Date::Date() : Class("Date")
 {

+ 2 - 2
test/cases/serialization/json/JSONTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-09-14
+ * Changed:         2020-11-20
  *
  * */
 
 #include <gtest/gtest.h>
-#include <json.hpp>
+#include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
 namespace {
   class JSONTest : public ::testing::Test {