Răsfoiți Sursa

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

# Conflicts:
#	config/conanfile.py
Patrick-Christopher Mattulat 3 ani în urmă
părinte
comite
ce9799ec95
100 a modificat fișierele cu 1906 adăugiri și 1031 ștergeri
  1. 28 4
      CMakeLists.txt
  2. 5 0
      config/LynarStudiosStyle.xml
  3. 0 33
      config/conanfile.py
  4. 9 5
      include/ls_std/base/Class.hpp
  5. 3 2
      include/ls_std/base/Types.hpp
  6. 11 9
      include/ls_std/base/Version.hpp
  7. 23 19
      include/ls_std/boxing/Boolean.hpp
  8. 32 30
      include/ls_std/boxing/Double.hpp
  9. 32 30
      include/ls_std/boxing/Float.hpp
  10. 5 3
      include/ls_std/boxing/IBoxing.hpp
  11. 36 33
      include/ls_std/boxing/Integer.hpp
  12. 36 33
      include/ls_std/boxing/Long.hpp
  13. 26 24
      include/ls_std/boxing/String.hpp
  14. 16 14
      include/ls_std/event/Event.hpp
  15. 7 5
      include/ls_std/event/EventHandler.hpp
  16. 12 10
      include/ls_std/event/EventManager.hpp
  17. 4 3
      include/ls_std/event/EventTypes.hpp
  18. 7 5
      include/ls_std/event/IEventSubscriber.hpp
  19. 7 4
      include/ls_std/exception/FileNotFoundException.hpp
  20. 7 4
      include/ls_std/exception/FileOperationException.hpp
  21. 7 4
      include/ls_std/exception/IllegalArgumentException.hpp
  22. 8 5
      include/ls_std/exception/IllegalArithmeticOperationException.hpp
  23. 30 0
      include/ls_std/exception/IncompleteJsonException.hpp
  24. 7 4
      include/ls_std/exception/NullPointerException.hpp
  25. 29 0
      include/ls_std/factory/IFactory.hpp
  26. 43 0
      include/ls_std/factory/serialization/json/SerializableJSONFactory.hpp
  27. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.hpp
  28. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.hpp
  29. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.hpp
  30. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONIntegerFactory.hpp
  31. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONLongFactory.hpp
  32. 29 0
      include/ls_std/factory/serialization/json/boxing/SerializableJSONStringFactory.hpp
  33. 29 0
      include/ls_std/factory/serialization/json/event/SerializableJSONEventFactory.hpp
  34. 35 31
      include/ls_std/io/File.hpp
  35. 10 8
      include/ls_std/io/FileOutputStream.hpp
  36. 13 8
      include/ls_std/io/FilePathSeparator.hpp
  37. 7 4
      include/ls_std/io/FilePathSeparatorMatch.hpp
  38. 7 5
      include/ls_std/io/FileReader.hpp
  39. 9 7
      include/ls_std/io/FileWriter.hpp
  40. 5 3
      include/ls_std/io/IReader.hpp
  41. 6 4
      include/ls_std/io/IStorable.hpp
  42. 6 4
      include/ls_std/io/IWriter.hpp
  43. 14 9
      include/ls_std/io/NewLine.hpp
  44. 6 4
      include/ls_std/io/StandardOutputWriter.hpp
  45. 10 8
      include/ls_std/io/StorableFile.hpp
  46. 9 7
      include/ls_std/io/kv/KVDocument.hpp
  47. 10 8
      include/ls_std/io/kv/KVPair.hpp
  48. 7 5
      include/ls_std/io/kv/KVParseData.hpp
  49. 14 12
      include/ls_std/io/kv/KVParser.hpp
  50. 10 8
      include/ls_std/io/kv/KVReader.hpp
  51. 5 4
      include/ls_std/io/kv/KVTypes.hpp
  52. 10 8
      include/ls_std/io/logging/LogLevel.hpp
  53. 6 10
      include/ls_std/io/logging/LogLevelValue.hpp
  54. 16 14
      include/ls_std/io/logging/Logger.hpp
  55. 7 5
      include/ls_std/io/xml/XMLAttribute.hpp
  56. 8 6
      include/ls_std/io/xml/XMLDeclaration.hpp
  57. 9 7
      include/ls_std/io/xml/XMLDocument.hpp
  58. 25 23
      include/ls_std/io/xml/XMLNode.hpp
  59. 7 5
      include/ls_std/io/xml/XMLParseData.hpp
  60. 6 8
      include/ls_std/io/xml/XMLParseMode.hpp
  61. 32 30
      include/ls_std/io/xml/XMLParser.hpp
  62. 5 3
      include/ls_std/io/xml/XMLParserMock.hpp
  63. 10 8
      include/ls_std/io/xml/XMLReader.hpp
  64. 6 4
      include/ls_std/logic/IListener.hpp
  65. 9 7
      include/ls_std/logic/Narrator.hpp
  66. 21 9
      include/ls_std/logic/State.hpp
  67. 8 6
      include/ls_std/logic/StateConnection.hpp
  68. 14 12
      include/ls_std/logic/StateMachine.hpp
  69. 3 2
      include/ls_std/logic/StateMachineTypes.hpp
  70. 24 11
      include/ls_std/ls_std.hpp
  71. 6 4
      include/ls_std/serialization/ISerializable.hpp
  72. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONBoolean.hpp
  73. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONDouble.hpp
  74. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONFloat.hpp
  75. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONInteger.hpp
  76. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONLong.hpp
  77. 11 9
      include/ls_std/serialization/json/boxing/SerializableJSONString.hpp
  78. 11 9
      include/ls_std/serialization/json/event/SerializableJSONEvent.hpp
  79. 11 9
      include/ls_std/serialization/json/logic/SerializableJSONState.hpp
  80. 11 9
      include/ls_std/serialization/json/logic/SerializableJSONStateConnection.hpp
  81. 11 9
      include/ls_std/serialization/json/logic/SerializableJSONStateMachine.hpp
  82. 11 9
      include/ls_std/time/Date.hpp
  83. 5 3
      include/ls_std/utils/RegexUtils.hpp
  84. 18 11
      include/ls_std/utils/STLUtils.hpp
  85. 9 13
      include/ls_std/utils/WindowsUtils.hpp
  86. 16 4
      source/ls_std/base/Class.cpp
  87. 19 13
      source/ls_std/base/Version.cpp
  88. 59 32
      source/ls_std/boxing/Boolean.cpp
  89. 111 58
      source/ls_std/boxing/Double.cpp
  90. 105 56
      source/ls_std/boxing/Float.cpp
  91. 46 33
      source/ls_std/boxing/Integer.cpp
  92. 48 33
      source/ls_std/boxing/Long.cpp
  93. 95 50
      source/ls_std/boxing/String.cpp
  94. 17 12
      source/ls_std/event/Event.cpp
  95. 4 3
      source/ls_std/event/EventHandler.cpp
  96. 11 7
      source/ls_std/event/EventManager.cpp
  97. 102 0
      source/ls_std/factory/serialization/json/SerializableJSONFactory.cpp
  98. 24 0
      source/ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.cpp
  99. 24 0
      source/ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.cpp
  100. 24 0
      source/ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.cpp

+ 28 - 4
CMakeLists.txt

@@ -32,6 +32,7 @@ message("${PROJECT_NAME}: Adding include directories...")
 if (${LS_STD_BUILD_WITH_TESTS})
     include_directories(${CMAKE_CURRENT_SOURCE_DIR}/test)
     include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googletest/include)
+    include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googlemock/include)
 endif ()
 
 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
@@ -96,7 +97,15 @@ set(SOURCE_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KVPair.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KVDocument.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KVParser.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KVReader.cpp)
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/kv/KVReader.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/SerializableJSONFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONIntegerFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONLongFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/boxing/SerializableJSONStringFactory.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/factory/serialization/json/event/SerializableJSONEventFactory.cpp)
 
 if (${LS_STD_BUILD_WITH_TESTS})
     set(TEST_FILES
@@ -155,7 +164,22 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KVPairTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KVDocumentTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KVParserTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KVReaderTest.cpp)
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/kv/KVReaderTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/SerializableFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONBooleanFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONDoubleFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONFloatFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONIntegerFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONLongFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/boxing/SerializableJSONStringFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/factory/serialization/json/event/SerializableJSONEventFactoryTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/factory/SerializableTestFactory.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/FileNotFoundExceptionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/FileOperationExceptionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/IllegalArgumentExceptionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/IllegalArithmeticOperationExceptionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/IncompleteJsonExceptionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/exception/NullPointerExceptionTest.cpp)
 endif ()
 
 ##########################################################
@@ -204,10 +228,10 @@ if (${LS_STD_BUILD_WITH_TESTS})
         message("${PROJECT_NAME}: library search - ${WSOCK32_LIBRARY}...")
         message("${PROJECT_NAME}: library search - ${WS2_32_LIBRARY}...")
 
-        target_link_libraries(${PROJECT_NAME}_test gtest gtest_main "${WSOCK32_LIBRARY}" "${WS2_32_LIBRARY}" "${PROJECT_NAME}_${PROJECT_VERSION}_static")
+        target_link_libraries(${PROJECT_NAME}_test gtest gmock gtest_main "${WSOCK32_LIBRARY}" "${WS2_32_LIBRARY}" "${PROJECT_NAME}_${PROJECT_VERSION}_static")
     endif ()
 
     if (UNIX)
-        target_link_libraries(${PROJECT_NAME}_test gtest gtest_main "${PROJECT_NAME}_${PROJECT_VERSION}_static")
+        target_link_libraries(${PROJECT_NAME}_test gtest gmock gtest_main "${PROJECT_NAME}_${PROJECT_VERSION}_static")
     endif ()
 endif ()

+ 5 - 0
config/LynarStudiosStyle.xml

@@ -11,6 +11,8 @@
     <option name="INDENT_C_STRUCT_MEMBERS" value="2" />
     <option name="INDENT_VISIBILITY_KEYWORDS" value="2" />
     <option name="INDENT_INSIDE_CODE_BLOCK" value="2" />
+    <option name="INDENT_PREPROCESSOR_DIRECTIVE" value="2" />
+    <option name="INDENT_DIRECTIVE_AS_CODE" value="true" />
     <option name="NAMESPACE_BRACE_PLACEMENT" value="2" />
     <option name="FUNCTION_BRACE_PLACEMENT" value="2" />
     <option name="BLOCK_BRACE_PLACEMENT" value="2" />
@@ -31,8 +33,11 @@
   <codeStyleSettings language="ObjectiveC">
     <option name="RIGHT_MARGIN" value="700" />
     <option name="KEEP_LINE_BREAKS" value="false" />
+    <option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
     <option name="BRACE_STYLE" value="2" />
     <option name="CLASS_BRACE_STYLE" value="2" />
+    <option name="ELSE_ON_NEW_LINE" value="true" />
+    <option name="CATCH_ON_NEW_LINE" value="true" />
     <indentOptions>
       <option name="INDENT_SIZE" value="2" />
       <option name="CONTINUATION_INDENT_SIZE" value="4" />

+ 0 - 33
config/conanfile.py

@@ -1,33 +0,0 @@
-from conans import ConanFile, CMake, tools
-
-
-class LsStdConan(ConanFile):
-    name = "ls-std"
-    version = "2021.1.0"
-    license = "MIT"
-    url = "<Package recipe repository url here, for issues about the package>"
-    description = "This library provides standard functionalities like serialization, json, xml, file operations, boxing, state machine, event handling."
-    topics = ("serialization", "events", "boxing", "xml", "json", "files", "state machine")
-    settings = "os", "compiler", "build_type", "arch"
-    options = {"shared": [True, False]}
-    default_options = {"shared": False}
-    generators = "cmake"
-
-    def source(self):
-        self.run("git clone https://vcs.lynarstudios.de/public/ls-standard-library.git --branch v" + self.version + " --single-branch")
-
-    def build(self):
-        cmake = CMake(self)
-        cmake.configure(source_folder="ls-standard-library")
-        cmake.build()
-
-    def package(self):
-        self.copy("*.hpp", dst="include", src="ls-standard-library/include")
-        self.copy("*ls_std_2021.1.0_static.lib", dst="lib", keep_path=False)
-        self.copy("*.dll", dst="bin", keep_path=False)
-        self.copy("*.so", dst="lib", keep_path=False)
-        self.copy("*.dylib", dst="lib", keep_path=False)
-        self.copy("*.a", dst="lib", keep_path=False)
-
-    def package_info(self):
-        self.cpp_info.libs = ["ls_std_2021.1.0_static"]

+ 9 - 5
include/ls_std/base/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-14
+ * Changed:         2021-04-24
  *
  * */
 
@@ -12,18 +12,22 @@
 
 #include <string>
 
-namespace ls_std {
-  class Class {
+namespace ls_std
+{
+  class Class
+  {
     public:
 
-      explicit Class(std::string _name);
+      explicit Class(const std::string &_name);
       virtual ~Class() = default;
 
       std::string getClassName();
 
     private:
 
-      std::string name {};
+      std::string name{};
+
+      void _assignClassName(const std::string &_name);
   };
 }
 

+ 3 - 2
include/ls_std/base/Types.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,7 +12,8 @@
 
 #include <string>
 
-namespace ls_std {
+namespace ls_std
+{
   using byte = char;
   using byte_field = std::string;
   using long_type = long long int;

+ 11 - 9
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-26
+ * Changed:         2021-04-24
  *
  * */
 
@@ -14,8 +14,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include "Types.hpp"
 
-namespace ls_std {
-  class Version : public ISerializable {
+namespace ls_std
+{
+  class Version : public ls_std::ISerializable
+  {
     public:
 
       explicit Version(ls_std::version_type _majorVersion, ls_std::version_type _minorVersion, ls_std::version_type _patchVersion);
@@ -24,25 +26,25 @@ namespace ls_std {
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // other functionality
 
       ls_std::version_type getMajorVersion() const;
       ls_std::version_type getMinorVersion() const;
       ls_std::version_type getPatchVersion() const;
-      static bool isValid(const std::string& _versionString);
+      static bool isValid(const std::string &_versionString);
       void setMajorVersion(ls_std::version_type _major);
       void setMinorVersion(ls_std::version_type _minor);
       void setPatchVersion(ls_std::version_type _patch);
 
     private:
 
-      ls_std::version_type majorVersion {};
-      ls_std::version_type minorVersion {};
-      ls_std::version_type patchVersion {};
+      ls_std::version_type majorVersion{};
+      ls_std::version_type minorVersion{};
+      ls_std::version_type patchVersion{};
 
-      static bool _isValid(const std::string& _versionString);
+      static bool _isValid(const std::string &_versionString);
   };
 }
 

+ 23 - 19
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,8 +16,10 @@
 #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 {
+namespace ls_std
+{
+  class Boolean : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       explicit Boolean(bool _value);
@@ -30,26 +32,28 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Boolean& operator=(int _value);
-      ls_std::Boolean& operator=(bool _value);
+      ls_std::Boolean &operator=(int _value);
+      ls_std::Boolean &operator=(bool _value);
 
       // stream operators
 
-      friend std::ostream& operator<<(std::ostream& _outputStream, const ls_std::Boolean& _boolean) {
+      friend std::ostream &operator<<(std::ostream &_outputStream, const ls_std::Boolean &_boolean)
+      {
         _outputStream << _boolean._toString();
         return _outputStream;
       }
 
       // logical operators
 
-      friend bool operator!(const ls_std::Boolean& _boolean) {
+      friend bool operator!(const ls_std::Boolean &_boolean)
+      {
         return !_boolean.value;
       }
 
-      bool operator&&(const ls_std::Boolean& _boolean) const;
+      bool operator&&(const ls_std::Boolean &_boolean) const;
       bool operator&&(bool _value) const;
       bool operator&&(int _value) const;
-      bool operator||(const ls_std::Boolean& _boolean) const;
+      bool operator||(const ls_std::Boolean &_boolean) const;
       bool operator||(bool _value) const;
       bool operator||(int _value) const;
       // INFO: operator ^ can not be taken for XOR, since it's not possible to implement it respecting commutative law
@@ -59,25 +63,25 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       bool getValue() const;
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
-      static bool XOR(const ls_std::Boolean& _leftExpression, const ls_std::Boolean& _rightExpression);
-      static bool XOR(const ls_std::Boolean& _leftExpression, bool _rightExpression);
-      static bool XOR(bool _leftExpression, const ls_std::Boolean& _rightExpression);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
+      static bool XOR(const ls_std::Boolean &_leftExpression, const ls_std::Boolean &_rightExpression);
+      static bool XOR(const ls_std::Boolean &_leftExpression, bool _rightExpression);
+      static bool XOR(bool _leftExpression, const ls_std::Boolean &_rightExpression);
       static bool XOR(bool _leftExpression, bool _rightExpression);
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      bool value {};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      bool value{};
 
       const std::string FALSE_STRING = "false";
       const std::string TRUE_STRING = "true";

+ 32 - 30
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,8 +16,10 @@
 #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 {
+namespace ls_std
+{
+  class Double : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       Double();
@@ -30,44 +32,44 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Double& operator=(double _value);
+      ls_std::Double &operator=(double _value);
 
       // arithmetic operators
 
       double operator-() const;
-      double operator+(const ls_std::Double& _double) const;
+      double operator+(const ls_std::Double &_double) const;
       double operator+(double _value) const;
-      double operator*(const ls_std::Double& _double) const;
+      double operator*(const ls_std::Double &_double) const;
       double operator*(double _value) const;
-      double operator-(const ls_std::Double& _double) const;
+      double operator-(const ls_std::Double &_double) const;
       double operator-(double _value) const;
-      double operator/(const ls_std::Double& _double) const;
+      double operator/(const ls_std::Double &_double) const;
       double operator/(double _value) const;
 
       // compound operators
 
-      ls_std::Double& operator+=(const ls_std::Double& _double);
-      ls_std::Double& operator+=(double _value);
-      ls_std::Double& operator-=(const ls_std::Double& _double);
-      ls_std::Double& operator-=(double _value);
-      ls_std::Double& operator*=(const ls_std::Double& _double);
-      ls_std::Double& operator*=(double _value);
-      ls_std::Double& operator/=(const ls_std::Double& _double);
-      ls_std::Double& operator/=(double _value);
+      ls_std::Double &operator+=(const ls_std::Double &_double);
+      ls_std::Double &operator+=(double _value);
+      ls_std::Double &operator-=(const ls_std::Double &_double);
+      ls_std::Double &operator-=(double _value);
+      ls_std::Double &operator*=(const ls_std::Double &_double);
+      ls_std::Double &operator*=(double _value);
+      ls_std::Double &operator/=(const ls_std::Double &_double);
+      ls_std::Double &operator/=(double _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Double& _double) const;
+      bool operator==(const ls_std::Double &_double) const;
       bool operator==(double _value) const;
-      bool operator!=(const ls_std::Double& _double) const;
+      bool operator!=(const ls_std::Double &_double) const;
       bool operator!=(double _value) const;
-      bool operator>(const ls_std::Double& _double) const;
+      bool operator>(const ls_std::Double &_double) const;
       bool operator>(double _value) const;
-      bool operator>=(const ls_std::Double& _double) const;
+      bool operator>=(const ls_std::Double &_double) const;
       bool operator>=(double _value) const;
-      bool operator<(const ls_std::Double& _double) const;
+      bool operator<(const ls_std::Double &_double) const;
       bool operator<(double _value) const;
-      bool operator<=(const ls_std::Double& _double) const;
+      bool operator<=(const ls_std::Double &_double) const;
       bool operator<=(double _value) const;
 
       // increment / decrement operator
@@ -80,24 +82,24 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       double getEpsilon();
       double getValue();
       void setEpsilon(double _epsilon);
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
 
     private:
 
-      double epsilon {};
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      double value {};
+      double epsilon{};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      double value{};
   };
 }
 

+ 32 - 30
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,8 +16,10 @@
 #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 {
+namespace ls_std
+{
+  class Float : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       Float();
@@ -30,44 +32,44 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Float& operator=(float _value);
+      ls_std::Float &operator=(float _value);
 
       // arithmetic operators
 
       float operator-() const;
-      float operator+(const ls_std::Float& _float) const;
+      float operator+(const ls_std::Float &_float) const;
       float operator+(float _value) const;
-      float operator*(const ls_std::Float& _float) const;
+      float operator*(const ls_std::Float &_float) const;
       float operator*(float _value) const;
-      float operator-(const ls_std::Float& _float) const;
+      float operator-(const ls_std::Float &_float) const;
       float operator-(float _value) const;
-      float operator/(const ls_std::Float& _float) const;
+      float operator/(const ls_std::Float &_float) const;
       float operator/(float _value) const;
 
       // compound operators
 
-      ls_std::Float& operator+=(const ls_std::Float& _float);
-      ls_std::Float& operator+=(float _value);
-      ls_std::Float& operator-=(const ls_std::Float& _float);
-      ls_std::Float& operator-=(float _value);
-      ls_std::Float& operator*=(const ls_std::Float& _float);
-      ls_std::Float& operator*=(float _value);
-      ls_std::Float& operator/=(const ls_std::Float& _float);
-      ls_std::Float& operator/=(float _value);
+      ls_std::Float &operator+=(const ls_std::Float &_float);
+      ls_std::Float &operator+=(float _value);
+      ls_std::Float &operator-=(const ls_std::Float &_float);
+      ls_std::Float &operator-=(float _value);
+      ls_std::Float &operator*=(const ls_std::Float &_float);
+      ls_std::Float &operator*=(float _value);
+      ls_std::Float &operator/=(const ls_std::Float &_float);
+      ls_std::Float &operator/=(float _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Float& _float) const;
+      bool operator==(const ls_std::Float &_float) const;
       bool operator==(float _value) const;
-      bool operator!=(const ls_std::Float& _float) const;
+      bool operator!=(const ls_std::Float &_float) const;
       bool operator!=(float _value) const;
-      bool operator>(const ls_std::Float& _float) const;
+      bool operator>(const ls_std::Float &_float) const;
       bool operator>(float _value) const;
-      bool operator>=(const ls_std::Float& _float) const;
+      bool operator>=(const ls_std::Float &_float) const;
       bool operator>=(float _value) const;
-      bool operator<(const ls_std::Float& _float) const;
+      bool operator<(const ls_std::Float &_float) const;
       bool operator<(float _value) const;
-      bool operator<=(const ls_std::Float& _float) const;
+      bool operator<=(const ls_std::Float &_float) const;
       bool operator<=(float _value) const;
 
       // increment / decrement operator
@@ -80,24 +82,24 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       float getEpsilon();
       float getValue();
       void setEpsilon(float _epsilon);
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
 
     private:
 
-      float epsilon {};
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      float value {};
+      float epsilon{};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      float value{};
   };
 }
 

+ 5 - 3
include/ls_std/boxing/IBoxing.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,8 +12,10 @@
 
 #include <string>
 
-namespace ls_std {
-  class IBoxing {
+namespace ls_std
+{
+  class IBoxing
+  {
     public:
 
       IBoxing() = default;

+ 36 - 33
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,8 +16,10 @@
 #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 {
+namespace ls_std
+{
+  class Integer : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       explicit Integer(int _value);
@@ -30,58 +32,59 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Integer& operator=(int _value);
+      ls_std::Integer &operator=(int _value);
 
       // arithmetic operators
 
       int operator-() const;
-      int operator+(const ls_std::Integer& _integer) const;
+      int operator+(const ls_std::Integer &_integer) const;
       int operator+(int _value) const;
-      int operator*(const ls_std::Integer& _integer) const;
+      int operator*(const ls_std::Integer &_integer) const;
       int operator*(int _value) const;
-      int operator-(const ls_std::Integer& _integer) const;
+      int operator-(const ls_std::Integer &_integer) const;
       int operator-(int _value) const;
-      int operator/(const ls_std::Integer& _integer) const;
+      int operator/(const ls_std::Integer &_integer) const;
       int operator/(int _value) const;
-      int operator%(const ls_std::Integer& _integer) const;
+      int operator%(const ls_std::Integer &_integer) const;
       int operator%(int _value) const;
 
       // compound operators
 
-      ls_std::Integer& operator+=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator+=(int _value);
-      ls_std::Integer& operator-=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator-=(int _value);
-      ls_std::Integer& operator*=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator*=(int _value);
-      ls_std::Integer& operator/=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator/=(int _value);
+      ls_std::Integer &operator+=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator+=(int _value);
+      ls_std::Integer &operator-=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator-=(int _value);
+      ls_std::Integer &operator*=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator*=(int _value);
+      ls_std::Integer &operator/=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator/=(int _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Integer& _integer) const;
+      bool operator==(const ls_std::Integer &_integer) const;
       bool operator==(int _value) const;
-      bool operator!=(const ls_std::Integer& _integer) const;
+      bool operator!=(const ls_std::Integer &_integer) const;
       bool operator!=(int _value) const;
-      bool operator>(const ls_std::Integer& _integer) const;
+      bool operator>(const ls_std::Integer &_integer) const;
       bool operator>(int _value) const;
-      bool operator>=(const ls_std::Integer& _integer) const;
+      bool operator>=(const ls_std::Integer &_integer) const;
       bool operator>=(int _value) const;
-      bool operator<(const ls_std::Integer& _integer) const;
+      bool operator<(const ls_std::Integer &_integer) const;
       bool operator<(int _value) const;
-      bool operator<=(const ls_std::Integer& _integer) const;
+      bool operator<=(const ls_std::Integer &_integer) const;
       bool operator<=(int _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls_std::Integer& _integer) {
+      friend bool operator!(const ls_std::Integer &_integer)
+      {
         return !_integer.value;
       }
 
-      bool operator&&(const ls_std::Integer& _integer) const;
+      bool operator&&(const ls_std::Integer &_integer) const;
       bool operator&&(int _value) const;
       bool operator&&(bool _expression) const;
-      bool operator||(const ls_std::Integer& _integer) const;
+      bool operator||(const ls_std::Integer &_integer) const;
       bool operator||(int _value) const;
       bool operator||(bool _expression) const;
 
@@ -95,21 +98,21 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       int getValue() const;
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      int value {};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      int value{};
   };
 }
 

+ 36 - 33
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -17,8 +17,10 @@
 #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 {
+namespace ls_std
+{
+  class Long : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       explicit Long(ls_std::long_type _value);
@@ -31,58 +33,59 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Long& operator=(ls_std::long_type _value);
+      ls_std::Long &operator=(ls_std::long_type _value);
 
       // arithmetic operators
 
       ls_std::long_type operator-() const;
-      ls_std::long_type operator+(const ls_std::Long& _long) const;
+      ls_std::long_type operator+(const ls_std::Long &_long) const;
       ls_std::long_type operator+(ls_std::long_type _value) const;
-      ls_std::long_type operator*(const ls_std::Long& _long) const;
+      ls_std::long_type operator*(const ls_std::Long &_long) const;
       ls_std::long_type operator*(ls_std::long_type _value) const;
-      ls_std::long_type operator-(const ls_std::Long& _long) const;
+      ls_std::long_type operator-(const ls_std::Long &_long) const;
       ls_std::long_type operator-(ls_std::long_type _value) const;
-      ls_std::long_type operator/(const ls_std::Long& _long) const;
+      ls_std::long_type operator/(const ls_std::Long &_long) const;
       ls_std::long_type operator/(ls_std::long_type _value) const;
-      ls_std::long_type operator%(const ls_std::Long& _long) const;
+      ls_std::long_type operator%(const ls_std::Long &_long) const;
       ls_std::long_type operator%(ls_std::long_type _value) const;
 
       // compound operators
 
-      ls_std::Long& operator+=(const ls_std::Long& _long);
-      ls_std::Long& operator+=(ls_std::long_type _value);
-      ls_std::Long& operator-=(const ls_std::Long& _long);
-      ls_std::Long& operator-=(ls_std::long_type _value);
-      ls_std::Long& operator*=(const ls_std::Long& _long);
-      ls_std::Long& operator*=(ls_std::long_type _value);
-      ls_std::Long& operator/=(const ls_std::Long& _long);
-      ls_std::Long& operator/=(ls_std::long_type _value);
+      ls_std::Long &operator+=(const ls_std::Long &_long);
+      ls_std::Long &operator+=(ls_std::long_type _value);
+      ls_std::Long &operator-=(const ls_std::Long &_long);
+      ls_std::Long &operator-=(ls_std::long_type _value);
+      ls_std::Long &operator*=(const ls_std::Long &_long);
+      ls_std::Long &operator*=(ls_std::long_type _value);
+      ls_std::Long &operator/=(const ls_std::Long &_long);
+      ls_std::Long &operator/=(ls_std::long_type _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Long& _long) const;
+      bool operator==(const ls_std::Long &_long) const;
       bool operator==(ls_std::long_type _value) const;
-      bool operator!=(const ls_std::Long& _long) const;
+      bool operator!=(const ls_std::Long &_long) const;
       bool operator!=(ls_std::long_type _value) const;
-      bool operator>(const ls_std::Long& _long) const;
+      bool operator>(const ls_std::Long &_long) const;
       bool operator>(ls_std::long_type _value) const;
-      bool operator>=(const ls_std::Long& _long) const;
+      bool operator>=(const ls_std::Long &_long) const;
       bool operator>=(ls_std::long_type _value) const;
-      bool operator<(const ls_std::Long& _long) const;
+      bool operator<(const ls_std::Long &_long) const;
       bool operator<(ls_std::long_type _value) const;
-      bool operator<=(const ls_std::Long& _long) const;
+      bool operator<=(const ls_std::Long &_long) const;
       bool operator<=(ls_std::long_type _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls_std::Long& _long) {
+      friend bool operator!(const ls_std::Long &_long)
+      {
         return !_long.value;
       }
 
-      bool operator&&(const ls_std::Long& _long) const;
+      bool operator&&(const ls_std::Long &_long) const;
       bool operator&&(ls_std::long_type _value) const;
       bool operator&&(bool _expression) const;
-      bool operator||(const ls_std::Long& _long) const;
+      bool operator||(const ls_std::Long &_long) const;
       bool operator||(ls_std::long_type _value) const;
       bool operator||(bool _expression) const;
 
@@ -96,21 +99,21 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       ls_std::long_type getValue() const;
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      ls_std::long_type value {};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      ls_std::long_type value{};
   };
 }
 

+ 26 - 24
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -18,8 +18,10 @@
 #include <memory>
 #include <vector>
 
-namespace ls_std {
-  class String : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class String : public ls_std::Class, public ls_std::IBoxing, public ls_std::ISerializable, public ls_std::IStorable
+  {
     public:
 
       String();
@@ -28,67 +30,67 @@ namespace ls_std {
 
       // conversion operator
 
-      operator const char*() const; // do not make explicit!
+      operator const char *() const; // do not make explicit!
       operator std::string() const; // do not make explicit!
 
       // assignment operators
 
-      ls_std::String& operator=(std::string _value);
+      ls_std::String &operator=(std::string _value);
 
       // arithmetic operators
 
       std::string operator+(ls_std::String _string) const;
-      std::string operator+(const std::string& _string) const;
-      std::string operator+(const char* _string) const;
+      std::string operator+(const std::string &_string) const;
+      std::string operator+(const char *_string) const;
       std::string operator-(int _number);
 
       // compound operators
 
-      ls_std::String& operator+=(ls_std::String _string);
-      ls_std::String& operator+=(const std::string& _text);
+      ls_std::String &operator+=(ls_std::String _string);
+      ls_std::String &operator+=(const std::string &_text);
 
       // comparison operators
 
       bool operator==(ls_std::String _string);
-      bool operator==(const std::string& _value);
-      bool operator==(const char* _value);
+      bool operator==(const std::string &_value);
+      bool operator==(const char *_value);
       bool operator!=(ls_std::String _string);
-      bool operator!=(const std::string& _value);
-      bool operator!=(const char* _value);
+      bool operator!=(const std::string &_value);
+      bool operator!=(const char *_value);
 
       // implementation
 
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
-      bool contains(const std::string& _text);
-      bool endsWith(const std::string& _text);
+      bool contains(const std::string &_text);
+      bool endsWith(const std::string &_text);
       bool equalsIgnoreCase(ls_std::String _string);
       bool equalsIgnoreCase(std::string _text);
       std::vector<ls_std::byte> getByteData();
       std::string padLeft(size_t _width, char _fillCharacter);
       std::string padRight(size_t _width, char _fillCharacter);
       std::string reverse();
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
-      void setStorable(std::shared_ptr<IStorable> _storable);
-      bool startsWith(const std::string& _text);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
+      void setStorable(std::shared_ptr<ls_std::IStorable> _storable);
+      bool startsWith(const std::string &_text);
       std::string toLowerCase();
       std::string toUpperCase();
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      std::string value {};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
+      std::shared_ptr<ls_std::IStorable> storable{};
+      std::string value{};
 
       static std::string _buildCharacterChain(size_t _amount, char _fillCharacter);
-      static std::string _createFillContent(const std::string& _text, size_t _width, char _fillCharacter);
+      static std::string _createFillContent(const std::string &_text, size_t _width, char _fillCharacter);
   };
 }
 

+ 16 - 14
include/ls_std/event/Event.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2020-12-23
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,36 +15,38 @@
 #include <memory>
 #include "EventTypes.hpp"
 
-namespace ls_std {
-  class Event : public ls_std::Class, public ISerializable {
+namespace ls_std
+{
+  class Event : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit Event(const ls_std::event_id&  _id);
+      explicit Event(const ls_std::event_id &_id);
       ~Event() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
-      void addParameter(const ls_std::event_parameter& _eventParameter);
+      void addParameter(const ls_std::event_parameter &_eventParameter);
       void clearParameterList();
       ls_std::event_id getId();
       ls_std::event_parameter_list getParameterList();
-      void removeParameter(const ls_std::event_parameter_id& _id);
-      void setId(const ls_std::event_id&  _id);
-      void setSerializable(std::shared_ptr<ISerializable> _serializable);
+      void removeParameter(const ls_std::event_parameter_id &_id);
+      void setId(const ls_std::event_id &_id);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
 
     private:
 
-      ls_std::event_id id {};
-      ls_std::event_parameter_list parameterList {};
-      std::shared_ptr<ISerializable> serializable {};
+      ls_std::event_id id{};
+      ls_std::event_parameter_list parameterList{};
+      std::shared_ptr<ls_std::ISerializable> serializable{};
 
-      void _assignId(const ls_std::event_id& _id);
-      bool _hasParameter(const ls_std::event_id&  _id);
+      void _assignId(const ls_std::event_id &_id);
+      bool _hasParameter(const ls_std::event_id &_id);
   };
 }
 

+ 7 - 5
include/ls_std/event/EventHandler.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2020-11-28
+ * Changed:         2021-04-23
  *
  * */
 
@@ -17,18 +17,20 @@
 #include "Event.hpp"
 #include <ls_std/logic/Narrator.hpp>
 
-namespace ls_std {
-  class EventHandler : public ls_std::Narrator {
+namespace ls_std
+{
+  class EventHandler : public ls_std::Narrator
+  {
     public:
 
-      explicit EventHandler(ls_std::event_id  _id);
+      explicit EventHandler(ls_std::event_id _id);
       ~EventHandler() override = default;
 
       ls_std::event_id getId();
 
     private:
 
-      ls_std::event_id id {};
+      ls_std::event_id id{};
   };
 }
 

+ 12 - 10
include/ls_std/event/EventManager.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2020-11-29
+ * Changed:         2021-05-01
  *
  * */
 
@@ -17,8 +17,10 @@
 #include "EventHandler.hpp"
 #include "IEventSubscriber.hpp"
 
-namespace ls_std {
-  class EventManager : public ls_std::Class, public ls_std::IEventSubscriber {
+namespace ls_std
+{
+  class EventManager : public ls_std::Class, public ls_std::IEventSubscriber
+  {
     public:
 
       explicit EventManager();
@@ -26,21 +28,21 @@ namespace ls_std {
 
       // implementation
 
-      void subscribe(const ls_std::event_id& _id, const std::shared_ptr<IListener>& _listener) override;
-      void unsubscribe(const ls_std::event_id& _id, const std::shared_ptr<IListener>& _listener) override;
+      void subscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener) override;
+      void unsubscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener) override;
 
       // additional functionality
 
-      void addEventHandler(const std::shared_ptr<ls_std::EventHandler>& _eventHandler);
+      void addEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler);
       void fire(ls_std::Event _event);
-      void removeEventHandler(const std::shared_ptr<ls_std::EventHandler>& _eventHandler);
+      void removeEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler);
 
     private:
 
-      std::map<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> eventHandlers {};
+      std::map<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> eventHandlers{};
 
-      bool _hasEventHandler(const ls_std::event_id& _id);
-      void _removeEventHandler(const std::shared_ptr<ls_std::EventHandler>& _eventHandler);
+      bool _hasEventHandler(const ls_std::event_id &_id);
+      void _removeEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler);
   };
 }
 

+ 4 - 3
include/ls_std/event/EventTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,12 +14,13 @@
 #include <vector>
 #include <map>
 
-namespace ls_std {
+namespace ls_std
+{
   using event_id = std::string;
   using event_parameter_id = std::string;
   using event_parameter_value = std::string;
   using event_parameter = std::pair<std::string, std::string>;
-  using event_parameter_list = std::map<event_parameter_id, event_parameter_value>;
+  using event_parameter_list = std::map<ls_std::event_parameter_id, ls_std::event_parameter_value>;
 }
 
 #endif

+ 7 - 5
include/ls_std/event/IEventSubscriber.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2020-11-29
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,15 +14,17 @@
 #include <memory>
 #include <ls_std/logic/IListener.hpp>
 
-namespace ls_std {
-  class IEventSubscriber {
+namespace ls_std
+{
+  class IEventSubscriber
+  {
     public:
 
       IEventSubscriber() = default;
       ~IEventSubscriber() = default;
 
-      virtual void subscribe(const ls_std::event_id& _id, const std::shared_ptr<IListener>& _listener) = 0;
-      virtual void unsubscribe(const ls_std::event_id& _id, const std::shared_ptr<IListener>& _listener) = 0;
+      virtual void subscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener) = 0;
+      virtual void unsubscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener) = 0;
   };
 }
 

+ 7 - 4
include/ls_std/exception/FileNotFoundException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -15,13 +15,16 @@
 #include <cstring>
 
 // TODO: pass parameters, use class, show class name
-namespace ls_std {
-  class FileNotFoundException : public std::exception {
+namespace ls_std
+{
+  class FileNotFoundException : public std::exception
+  {
     public:
 
       FileNotFoundException() = default;
 
-      const char *what() const noexcept override {
+      const char *what() const noexcept override
+      {
         return "FileNotFoundException thrown - file not found!";
       };
   };

+ 7 - 4
include/ls_std/exception/FileOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,13 +13,16 @@
 #include <exception>
 #include <string>
 
-namespace ls_std {
-  class FileOperationException : public std::exception {
+namespace ls_std
+{
+  class FileOperationException : public std::exception
+  {
     public:
 
       explicit FileOperationException() = default;
 
-      const char *what() const noexcept override {
+      const char *what() const noexcept override
+      {
         return "FileOperationException thrown - file operation failed!";
       }
   };

+ 7 - 4
include/ls_std/exception/IllegalArgumentException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,13 +12,16 @@
 
 #include <exception>
 
-namespace ls_std {
-  class IllegalArgumentException : public std::exception {
+namespace ls_std
+{
+  class IllegalArgumentException : public std::exception
+  {
     public:
 
       IllegalArgumentException() = default;
 
-      const char *what() const noexcept override {
+      const char *what() const noexcept override
+      {
         return "IllegalArgumentException thrown - passed argument is not valid!";
       }
   };

+ 8 - 5
include/ls_std/exception/IllegalArithmeticOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2021-05-01
  *
  * */
 
@@ -12,14 +12,17 @@
 
 #include <exception>
 
-namespace ls_std {
-  class IllegalArithmeticOperationException : public std::exception {
+namespace ls_std
+{
+  class IllegalArithmeticOperationException : public std::exception
+  {
     public:
 
       IllegalArithmeticOperationException() = default;
 
-      const char *what() const noexcept override {
-        return "IllegalArithmeticOperationException thrown - arithmetic operation is not valid!";
+      const char *what() const noexcept override
+      {
+        return "IllegalArithmeticOperationException thrown - arithmetic operation is not allowed!";
       }
   };
 }

+ 30 - 0
include/ls_std/exception/IncompleteJsonException.hpp

@@ -0,0 +1,30 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-30
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_INCOMPLETE_JSON_EXCEPTION_HPP
+#define LS_STD_INCOMPLETE_JSON_EXCEPTION_HPP
+
+#include <exception>
+
+namespace ls_std
+{
+  class IncompleteJsonException : public std::exception
+  {
+    public:
+
+      explicit IncompleteJsonException() = default;
+
+      const char *what() const noexcept override
+      {
+        return "IncompleteJsonException thrown - this JSON string is incomplete.";
+      }
+  };
+}
+
+#endif

+ 7 - 4
include/ls_std/exception/NullPointerException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,13 +12,16 @@
 
 #include <exception>
 
-namespace ls_std {
-  class NullPointerException : public std::exception {
+namespace ls_std
+{
+  class NullPointerException : public std::exception
+  {
     public:
 
       explicit NullPointerException() = default;
 
-      const char *what() const noexcept override {
+      const char *what() const noexcept override
+      {
         return "NullPointerException thrown - reference is null!";
       }
   };

+ 29 - 0
include/ls_std/factory/IFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-23
+ * Changed:         2021-04-23
+ *
+ * */
+
+#ifndef LS_STD_I_FACTORY_HPP
+#define LS_STD_I_FACTORY_HPP
+
+#include <memory>
+#include <ls_std/base/Class.hpp>
+
+namespace ls_std
+{
+  class IFactory
+  {
+    public:
+
+      IFactory() = default;
+      ~IFactory() = default;
+
+      virtual std::shared_ptr<ls_std::Class> build() = 0;
+  };
+}
+
+#endif

+ 43 - 0
include/ls_std/factory/serialization/json/SerializableJSONFactory.hpp

@@ -0,0 +1,43 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_FACTORY_HPP
+
+#include <ls_std/base/Class.hpp>
+#include <map>
+#include <string>
+#include <memory>
+#include <ls_std/factory/IFactory.hpp>
+
+namespace ls_std
+{
+  class SerializableJSONFactory : public ls_std::Class
+  {
+    public:
+
+      SerializableJSONFactory();
+      ~SerializableJSONFactory() override = default;
+
+      bool addFactory(const std::pair<std::string, std::shared_ptr<ls_std::IFactory>> &_factoryInsertion);
+      std::shared_ptr<ls_std::Class> build(const std::string &_relatedObjectName);
+      bool clear();
+      bool hasFactory(const std::string &_relatedObjectName);
+      bool removeFactory(const std::string &_relatedObjectName);
+
+    private:
+
+      std::map<std::string, std::shared_ptr<ls_std::IFactory>> factories{};
+
+      bool _hasFactory(const std::string &_relatedObjectName);
+      void _init();
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-23
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_BOOLEAN_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_BOOLEAN_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONBooleanFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONBooleanFactory();
+      ~SerializableJSONBooleanFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_DOUBLE_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_DOUBLE_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONDoubleFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONDoubleFactory();
+      ~SerializableJSONDoubleFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_FLOAT_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_FLOAT_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONFloatFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONFloatFactory();
+      ~SerializableJSONFloatFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONIntegerFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_INTEGER_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_INTEGER_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONIntegerFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONIntegerFactory();
+      ~SerializableJSONIntegerFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONLongFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_LONG_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_LONG_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONLongFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONLongFactory();
+      ~SerializableJSONLongFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/boxing/SerializableJSONStringFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_STRING_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_STRING_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONStringFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONStringFactory();
+      ~SerializableJSONStringFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 29 - 0
include/ls_std/factory/serialization/json/event/SerializableJSONEventFactory.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-30
+ * Changed:         2021-05-01
+ *
+ * */
+
+#ifndef LS_STD_SERIALIZABLE_JSON_EVENT_FACTORY_HPP
+#define LS_STD_SERIALIZABLE_JSON_EVENT_FACTORY_HPP
+
+#include <ls_std/factory/IFactory.hpp>
+#include <memory>
+
+namespace ls_std
+{
+  class SerializableJSONEventFactory : public ls_std::Class, public ls_std::IFactory
+  {
+    public:
+
+      SerializableJSONEventFactory();
+      ~SerializableJSONEventFactory() override = default;
+
+      std::shared_ptr<ls_std::Class> build() override;
+  };
+}
+
+#endif

+ 35 - 31
include/ls_std/io/File.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -18,15 +18,19 @@
 #include <regex>
 
 #if defined(unix) || defined(__APPLE__)
+
 #include <dirent.h>
+
 #endif
 
 #ifdef _WIN32
 #include <windows.h>
 #endif
 
-namespace ls_std {
-  class File : public Class {
+namespace ls_std
+{
+  class File : public ls_std::Class
+  {
     public:
 
       explicit File(std::string _absoluteFilePath);
@@ -34,8 +38,8 @@ namespace ls_std {
 
       // comparison operators
 
-      bool operator==(ls_std::File& _file);
-      bool operator!=(ls_std::File& _file);
+      bool operator==(ls_std::File &_file);
+      bool operator!=(ls_std::File &_file);
 
       // additional functionality
 
@@ -56,54 +60,54 @@ namespace ls_std {
       void makeDirectory();
       void makeDirectories();
       void remove();
-      bool renameTo(const std::string& _newName);
-      void reset(const std::string& _newPath);
+      bool renameTo(const std::string &_newName);
+      void reset(const std::string &_newPath);
 
     private:
 
-      std::string absoluteFilePath {};
+      std::string absoluteFilePath{};
 
       #if defined(unix) || defined(__APPLE__)
-        static void _addToFileListUnix(const std::string& _path, bool _withDirectories, dirent* directoryEntity, std::list<std::string>& _list);
+      static void _addToFileListUnix(const std::string &_path, bool _withDirectories, dirent *directoryEntity, std::list<std::string> &_list);
       #endif
       #ifdef _WIN32
-        static void _addToFileListWindows(const std::string& _path, bool _withDirectories, WIN32_FIND_DATA _data, std::list<std::string>& _list);
+      static void _addToFileListWindows(const std::string& _path, bool _withDirectories, WIN32_FIND_DATA _data, std::list<std::string>& _list);
       #endif
-      static bool _equals(ls_std::File& _file, ls_std::File& _foreignFile);
-      static bool _exists(const std::string& _path);
-      static std::string _getParent(const std::string& _path);
-      static bool _isDirectory(const std::string& _path);
-      static bool _isExecutable(const std::string& _path);
-      static bool _isFile(const std::string& _path);
+      static bool _equals(ls_std::File &_file, ls_std::File &_foreignFile);
+      static bool _exists(const std::string &_path);
+      static std::string _getParent(const std::string &_path);
+      static bool _isDirectory(const std::string &_path);
+      static bool _isExecutable(const std::string &_path);
+      static bool _isFile(const std::string &_path);
       #if defined(unix) || defined(__APPLE__)
-        static bool _isReadableUnix(const std::string& _path);
+      static bool _isReadableUnix(const std::string &_path);
       #endif
       #ifdef _WIN32
-        static bool _isReadableWindows(const std::string& _path);
+      static bool _isReadableWindows(const std::string& _path);
       #endif
-      static bool _isWritable(const std::string& _path);
-      static time_t _lastModified(const std::string& _path);
-      static std::list<std::string> _list(const std::string& _path);
-      static std::list<std::string> _listFiles(const std::string& _path);
+      static bool _isWritable(const std::string &_path);
+      static time_t _lastModified(const std::string &_path);
+      static std::list<std::string> _list(const std::string &_path);
+      static std::list<std::string> _listFiles(const std::string &_path);
       #if defined(unix) || defined(__APPLE__)
-        static std::list<std::string> _listUnix(const std::string& _path, bool withDirectories);
+      static std::list<std::string> _listUnix(const std::string &_path, bool withDirectories);
       #endif
       #ifdef _WIN32
-        static std::list<std::string> _listWindows(const std::string& _path, bool withDirectories);
+      static std::list<std::string> _listWindows(const std::string& _path, bool withDirectories);
       #endif
-      static int _mkdir(const std::string& _path);
+      static int _mkdir(const std::string &_path);
       static std::string _normalizePath(std::string _path);
-      static std::string _reduceSeparators(const std::string& _path);
-      static void _remove(const std::string& _path);
+      static std::string _reduceSeparators(const std::string &_path);
+      static void _remove(const std::string &_path);
       #if defined(unix) || defined(__APPLE__)
-        static void _removeUnix(const std::string& _path);
+      static void _removeUnix(const std::string &_path);
       #endif
       #ifdef _WIN32
-        static void _removeWindows(const std::string& _path);
+      static void _removeWindows(const std::string& _path);
       #endif
-      static bool _renameTo(const std::string& _oldName, const std::string& _newName);
+      static bool _renameTo(const std::string &_oldName, const std::string &_newName);
       static std::string _replaceWrongSeparator(std::string _path);
-      static std::vector<std::string> _splitIntoSubDirectoryNames(const std::string& _path);
+      static std::vector<std::string> _splitIntoSubDirectoryNames(const std::string &_path);
   };
 }
 

+ 10 - 8
include/ls_std/io/FileOutputStream.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,22 +15,24 @@
 #include "IWriter.hpp"
 #include <fstream>
 
-namespace ls_std {
-  class FileOutputStream : public Class, public IWriter {
+namespace ls_std
+{
+  class FileOutputStream : public ls_std::Class, public ls_std::IWriter
+  {
     public:
 
-      explicit FileOutputStream(ls_std::File& _file);
-      explicit FileOutputStream(ls_std::File& _file, bool _append);
+      explicit FileOutputStream(ls_std::File &_file);
+      explicit FileOutputStream(ls_std::File &_file, bool _append);
       ~FileOutputStream() override;
 
       void close();
-      bool write(const ls_std::byte_field& _data) override;
+      bool write(const ls_std::byte_field &_data) override;
 
     private:
 
-      bool append {};
+      bool append{};
       ls_std::File file;
-      std::ofstream outputStream {};
+      std::ofstream outputStream{};
 
       void _close();
       void _init();

+ 13 - 8
include/ls_std/io/FilePathSeparator.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,31 +12,36 @@
 
 #include <string>
 
-namespace ls_std {
-  class FilePathSeparator {
+namespace ls_std
+{
+  class FilePathSeparator
+  {
     public:
 
       FilePathSeparator() = default;
       ~FilePathSeparator() = default;
 
-      static char get() {
+      static char get()
+      {
         char separator;
 
         #ifdef _WIN32
-          separator = ls_std::FilePathSeparator::getWindowsFilePathSeparator();
+        separator = ls_std::FilePathSeparator::getWindowsFilePathSeparator();
         #endif
         #if defined(unix) || defined(__APPLE__)
-          separator = ls_std::FilePathSeparator::getUnixFilePathSeparator();
+        separator = ls_std::FilePathSeparator::getUnixFilePathSeparator();
         #endif
 
         return separator;
       }
 
-      static char getUnixFilePathSeparator() {
+      static char getUnixFilePathSeparator()
+      {
         return '/';
       }
 
-      static char getWindowsFilePathSeparator() {
+      static char getWindowsFilePathSeparator()
+      {
         return '\\';
       }
   };

+ 7 - 4
include/ls_std/io/FilePathSeparatorMatch.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,9 +12,12 @@
 
 #include "FilePathSeparator.hpp"
 
-namespace ls_std {
-  struct FilePathSeparatorMatch {
-    bool operator()(char _char) const {
+namespace ls_std
+{
+  struct FilePathSeparatorMatch
+  {
+    bool operator()(char _char) const
+    {
       return _char == ls_std::FilePathSeparator::getWindowsFilePathSeparator() || _char == ls_std::FilePathSeparator::getUnixFilePathSeparator();
     }
   };

+ 7 - 5
include/ls_std/io/FileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,15 +14,17 @@
 #include "File.hpp"
 #include "IReader.hpp"
 
-namespace ls_std {
-  class FileReader : public Class, public IReader {
+namespace ls_std
+{
+  class FileReader : public ls_std::Class, public ls_std::IReader
+  {
     public:
 
-      explicit FileReader(ls_std::File& _file);
+      explicit FileReader(ls_std::File &_file);
       ~FileReader() override = default;
 
       ls_std::byte_field read() override;
-      void reset(ls_std::File& _file);
+      void reset(ls_std::File &_file);
 
     private:
 

+ 9 - 7
include/ls_std/io/FileWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,21 +14,23 @@
 #include "IWriter.hpp"
 #include "File.hpp"
 
-namespace ls_std {
-  class FileWriter : public Class, public IWriter {
+namespace ls_std
+{
+  class FileWriter : public ls_std::Class, public ls_std::IWriter
+  {
     public:
 
-      explicit FileWriter(ls_std::File& _file);
+      explicit FileWriter(ls_std::File &_file);
       ~FileWriter() override = default;
 
-      void reset(ls_std::File& _file);
-      bool write(const ls_std::byte_field& _data) override;
+      void reset(ls_std::File &_file);
+      bool write(const ls_std::byte_field &_data) override;
 
     private:
 
       ls_std::File file;
 
-      static void _init(ls_std::File& _file);
+      static void _init(ls_std::File &_file);
   };
 }
 

+ 5 - 3
include/ls_std/io/IReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-20
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,8 +12,10 @@
 
 #include <ls_std/base/Types.hpp>
 
-namespace ls_std {
-  class IReader {
+namespace ls_std
+{
+  class IReader
+  {
     public:
 
       IReader() = default;

+ 6 - 4
include/ls_std/io/IStorable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-11-20
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,14 +12,16 @@
 
 #include <ls_std/base/Types.hpp>
 
-namespace ls_std {
-  class IStorable {
+namespace ls_std
+{
+  class IStorable
+  {
     public:
       IStorable() = default;
       ~IStorable() = default;
 
       virtual ls_std::byte_field load() = 0;
-      virtual void save(const ls_std::byte_field& _data) = 0;
+      virtual void save(const ls_std::byte_field &_data) = 0;
   };
 }
 

+ 6 - 4
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-20
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,14 +13,16 @@
 #include <vector>
 #include <ls_std/base/Types.hpp>
 
-namespace ls_std {
-  class IWriter {
+namespace ls_std
+{
+  class IWriter
+  {
     public:
 
       IWriter() = default;
       ~IWriter() = default;
 
-      virtual bool write(const ls_std::byte_field& _data) = 0;
+      virtual bool write(const ls_std::byte_field &_data) = 0;
   };
 }
 

+ 14 - 9
include/ls_std/io/NewLine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,31 +12,36 @@
 
 #include <string>
 
-namespace ls_std {
-  class NewLine {
+namespace ls_std
+{
+  class NewLine
+  {
     public:
 
       NewLine() = default;
       ~NewLine() = default;
 
-      static std::string get() {
-        std::string newLine {};
+      static std::string get()
+      {
+        std::string newLine{};
 
         #if defined(unix) || defined(__APPLE__)
-          newLine = ls_std::NewLine::getUnixNewLine();
+        newLine = ls_std::NewLine::getUnixNewLine();
         #endif
         #ifdef _WIN32
-          newLine = ls_std::NewLine::getWindowsNewLine();
+        newLine = ls_std::NewLine::getWindowsNewLine();
         #endif
 
         return newLine;
       }
 
-      static std::string getUnixNewLine() {
+      static std::string getUnixNewLine()
+      {
         return "\n";
       }
 
-      static std::string getWindowsNewLine() {
+      static std::string getWindowsNewLine()
+      {
         return "\r\n";
       }
   };

+ 6 - 4
include/ls_std/io/StandardOutputWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2020-11-06
+ * Changed:         2021-05-01
  *
  * */
 
@@ -12,14 +12,16 @@
 
 #include "IWriter.hpp"
 
-namespace ls_std {
-  class StandardOutputWriter : public IWriter {
+namespace ls_std
+{
+  class StandardOutputWriter : public ls_std::IWriter
+  {
     public:
 
       StandardOutputWriter() = default;
       ~StandardOutputWriter() = default;
 
-      bool write(const ls_std::byte_field& _data) override;
+      bool write(const ls_std::byte_field &_data) override;
   };
 }
 

+ 10 - 8
include/ls_std/io/StorableFile.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-11-06
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,23 +15,25 @@
 #include "IStorable.hpp"
 #include "File.hpp"
 
-namespace ls_std {
-  class StorableFile : public IStorable {
+namespace ls_std
+{
+  class StorableFile : public ls_std::IStorable
+  {
     public:
 
-      explicit StorableFile(const std::string& _path);
+      explicit StorableFile(const std::string &_path);
       ~StorableFile() = default;
 
       std::shared_ptr<ls_std::File> getFile();
       ls_std::byte_field load() override;
-      void reset(const std::string& _path);
-      void save(const ls_std::byte_field& _data) override;
+      void reset(const std::string &_path);
+      void save(const ls_std::byte_field &_data) override;
 
     private:
 
-      std::shared_ptr<ls_std::File> file {};
+      std::shared_ptr<ls_std::File> file{};
 
-      void _init(const std::string& _path);
+      void _init(const std::string &_path);
   };
 }
 

+ 9 - 7
include/ls_std/io/kv/KVDocument.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -15,8 +15,10 @@
 #include "KVTypes.hpp"
 #include <map>
 
-namespace ls_std {
-  class KVDocument : public ls_std::Class {
+namespace ls_std
+{
+  class KVDocument : public ls_std::Class
+  {
     public:
 
       KVDocument();
@@ -25,14 +27,14 @@ namespace ls_std {
       bool addPair(ls_std::KVPair _pair);
       void clear();
       std::map<ls_std::kv_key, ls_std::KVPair> getPairs();
-      bool hasPair(const ls_std::kv_key& _key);
-      void removePair(const ls_std::kv_key& _key);
+      bool hasPair(const ls_std::kv_key &_key);
+      void removePair(const ls_std::kv_key &_key);
 
     private:
 
-      std::map<ls_std::kv_key, ls_std::KVPair> pairs {};
+      std::map<ls_std::kv_key, ls_std::KVPair> pairs{};
 
-      bool _hasPair(const ls_std::kv_key& _key);
+      bool _hasPair(const ls_std::kv_key &_key);
   };
 }
 

+ 10 - 8
include/ls_std/io/kv/KVPair.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,23 +13,25 @@
 #include <ls_std/base/Class.hpp>
 #include "KVTypes.hpp"
 
-namespace ls_std {
-  class KVPair : public ls_std::Class {
+namespace ls_std
+{
+  class KVPair : public ls_std::Class
+  {
     public:
 
-      explicit KVPair(const ls_std::kv_key& _key, ls_std::kv_value _value);
+      explicit KVPair(const ls_std::kv_key &_key, ls_std::kv_value _value);
       ~KVPair() override = default;
 
       ls_std::kv_key getKey();
       ls_std::kv_value getValue();
-      void setValue(const ls_std::kv_value& _value);
+      void setValue(const ls_std::kv_value &_value);
 
     private:
 
-      ls_std::kv_key key {};
-      ls_std::kv_value value {};
+      ls_std::kv_key key{};
+      ls_std::kv_value value{};
 
-      void _assignKey(const ls_std::kv_key& _key);
+      void _assignKey(const ls_std::kv_key &_key);
   };
 }
 

+ 7 - 5
include/ls_std/io/kv/KVParseData.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,10 +13,12 @@
 #include <string>
 #include <ls_std/boxing/String.hpp>
 
-namespace ls_std {
-  struct KVParseData {
-    std::string::size_type index {};
-    ls_std::String line {};
+namespace ls_std
+{
+  struct KVParseData
+  {
+    std::string::size_type index{};
+    ls_std::String line{};
   };
 }
 

+ 14 - 12
include/ls_std/io/kv/KVParser.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,28 +16,30 @@
 #include "KVParseData.hpp"
 #include <memory>
 
-namespace ls_std {
-  class KVParser : public ls_std::Class {
+namespace ls_std
+{
+  class KVParser : public ls_std::Class
+  {
     public:
 
-      explicit KVParser(const std::shared_ptr<ls_std::KVDocument>& _document);
+      explicit KVParser(const std::shared_ptr<ls_std::KVDocument> &_document);
       ~KVParser() override = default;
 
       std::shared_ptr<ls_std::KVDocument> getDocument();
-      void parse(const ls_std::byte_field& _data);
-      void setDocument(const std::shared_ptr<ls_std::KVDocument>& _document);
+      void parse(const ls_std::byte_field &_data);
+      void setDocument(const std::shared_ptr<ls_std::KVDocument> &_document);
 
     private:
 
-      std::shared_ptr<ls_std::KVDocument> document {};
+      std::shared_ptr<ls_std::KVDocument> document{};
 
-      void _assignDocument(const std::shared_ptr<ls_std::KVDocument>& _document);
+      void _assignDocument(const std::shared_ptr<ls_std::KVDocument> &_document);
       static bool _lineHasPair(ls_std::KVParseData _parseData);
-      void _parse(const ls_std::byte_field& _data);
+      void _parse(const ls_std::byte_field &_data);
       void _parsePair(ls_std::KVParseData _parseData);
-      static ls_std::KVParseData _readLine(const ls_std::byte_field& _data, std::string::size_type _index);
-      static void _readLineWithUnixLineBreak(ls_std::KVParseData& _parseData);
-      static void _readLineWithWindowsLineBreak(ls_std::KVParseData& _parseData);
+      static ls_std::KVParseData _readLine(const ls_std::byte_field &_data, std::string::size_type _index);
+      static void _readLineWithUnixLineBreak(ls_std::KVParseData &_parseData);
+      static void _readLineWithWindowsLineBreak(ls_std::KVParseData &_parseData);
   };
 }
 

+ 10 - 8
include/ls_std/io/kv/KVReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,11 +16,13 @@
 #include <ls_std/io/File.hpp>
 #include <memory>
 
-namespace ls_std {
-  class KVReader : public ls_std::Class, public ls_std::IReader {
+namespace ls_std
+{
+  class KVReader : public ls_std::Class, public ls_std::IReader
+  {
     public:
 
-      explicit KVReader(const std::shared_ptr<ls_std::KVDocument>& _document, const std::string& _absolutePath);
+      explicit KVReader(const std::shared_ptr<ls_std::KVDocument> &_document, const std::string &_absolutePath);
       ~KVReader() override = default;
 
       // implementation
@@ -30,15 +32,15 @@ namespace ls_std {
       // additional functionality
 
       std::shared_ptr<ls_std::KVDocument> getDocument();
-      void setDocument(const std::shared_ptr<ls_std::KVDocument>& _document);
-      void setFile(const ls_std::File& _kvFile);
+      void setDocument(const std::shared_ptr<ls_std::KVDocument> &_document);
+      void setFile(const ls_std::File &_kvFile);
 
     private:
 
-      std::shared_ptr<ls_std::KVDocument> document {};
+      std::shared_ptr<ls_std::KVDocument> document{};
       ls_std::File kvFile;
 
-      void _assignDocument(const std::shared_ptr<ls_std::KVDocument>& _document);
+      void _assignDocument(const std::shared_ptr<ls_std::KVDocument> &_document);
       void _assignFile(ls_std::File _kvFile);
   };
 }

+ 5 - 4
include/ls_std/io/kv/KVTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,9 +12,10 @@
 
 #include <string>
 
-namespace ls_std {
-  using kv_key    = std::string;
-  using kv_value  = std::string;
+namespace ls_std
+{
+  using kv_key = std::string;
+  using kv_value = std::string;
 }
 
 #endif

+ 10 - 8
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,24 +14,26 @@
 #include <ls_std/base/Class.hpp>
 #include "LogLevelValue.hpp"
 
-namespace ls_std {
-  class LogLevel : public Class {
+namespace ls_std
+{
+  class LogLevel : public ls_std::Class
+  {
     public:
 
-      explicit LogLevel(const ls_std::LogLevelValue& _value);
+      explicit LogLevel(const ls_std::LogLevelValue &_value);
       LogLevel();
       ~LogLevel() override = default;
 
       operator unsigned char() const;
-      LogLevel& operator=(const ls_std::LogLevelValue& _value);
-      bool operator<=(const ls_std::LogLevelValue& _value);
+      ls_std::LogLevel &operator=(const ls_std::LogLevelValue &_value);
+      bool operator<=(const ls_std::LogLevelValue &_value);
 
       std::string toString() const;
 
     private:
 
-      std::unordered_map<uint8_t , std::string> level {};
-      ls_std::LogLevelValue value {};
+      std::unordered_map<uint8_t, std::string> level{};
+      ls_std::LogLevelValue value{};
 
       void _init();
   };

+ 6 - 10
include/ls_std/io/logging/LogLevelValue.hpp

@@ -3,22 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
 #ifndef LS_STD_LOG_LEVEL_VALUE_HPP
 #define LS_STD_LOG_LEVEL_VALUE_HPP
 
-namespace ls_std {
-  enum LogLevelValue {
-    FATAL = 0,
-    ERR,
-    WARN,
-    INFO,
-    DEBUG,
-    TRACE,
-    OFF
+namespace ls_std
+{
+  enum LogLevelValue
+  {
+    FATAL = 0, ERR, WARN, INFO, DEBUG, TRACE, OFF
   };
 }
 

+ 16 - 14
include/ls_std/io/logging/Logger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -17,28 +17,30 @@
 #include <ls_std/io/FileOutputStream.hpp>
 #include <string>
 
-namespace ls_std {
-  class Logger : public Class {
+namespace ls_std
+{
+  class Logger : public ls_std::Class
+  {
     public:
 
-      explicit Logger(const std::shared_ptr<ls_std::IWriter>& _writer);
+      explicit Logger(const std::shared_ptr<ls_std::IWriter> &_writer);
       ~Logger() override = default;
 
-      void debug(const ls_std::byte* _data);
-      void error(const ls_std::byte* _data);
-      void fatal(const ls_std::byte* _data);
+      void debug(const ls_std::byte *_data);
+      void error(const ls_std::byte *_data);
+      void fatal(const ls_std::byte *_data);
       ls_std::LogLevel getLogLevel();
-      void info(const ls_std::byte* _data);
-      void setLogLevel(const ls_std::LogLevelValue& _logLevelValue);
-      void trace(const ls_std::byte* _data);
-      void warn(const ls_std::byte* _data);
+      void info(const ls_std::byte *_data);
+      void setLogLevel(const ls_std::LogLevelValue &_logLevelValue);
+      void trace(const ls_std::byte *_data);
+      void warn(const ls_std::byte *_data);
 
     private:
 
-      ls_std::LogLevel logLevel {};
-      std::shared_ptr<ls_std::IWriter> writer {};
+      ls_std::LogLevel logLevel{};
+      std::shared_ptr<ls_std::IWriter> writer{};
 
-      void _log(const ls_std::byte* _data, const ls_std::LogLevel& _logLevel);
+      void _log(const ls_std::byte *_data, const ls_std::LogLevel &_logLevel);
   };
 }
 

+ 7 - 5
include/ls_std/io/xml/XMLAttribute.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -13,8 +13,10 @@
 #include <ls_std/base/Class.hpp>
 #include <string>
 
-namespace ls_std {
-  class XMLAttribute : public Class {
+namespace ls_std
+{
+  class XMLAttribute : public ls_std::Class
+  {
     public:
 
       explicit XMLAttribute(std::string _name);
@@ -28,8 +30,8 @@ namespace ls_std {
 
     private:
 
-      std::string name {};
-      std::string value {};
+      std::string name{};
+      std::string value{};
   };
 }
 

+ 8 - 6
include/ls_std/io/xml/XMLDeclaration.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -13,8 +13,10 @@
 #include <ls_std/base/Class.hpp>
 #include "XMLAttribute.hpp"
 
-namespace ls_std {
-  class XMLDeclaration : public Class {
+namespace ls_std
+{
+  class XMLDeclaration : public ls_std::Class
+  {
     public:
 
       explicit XMLDeclaration(std::string _version);
@@ -30,9 +32,9 @@ namespace ls_std {
 
     private:
 
-      ls_std::XMLAttribute encoding {"encoding"};
-      ls_std::XMLAttribute standalone {"standalone"};
-      ls_std::XMLAttribute version {"version"};
+      ls_std::XMLAttribute encoding{"encoding"};
+      ls_std::XMLAttribute standalone{"standalone"};
+      ls_std::XMLAttribute version{"version"};
 
       static std::string _toXMLAttribute(ls_std::XMLAttribute _attribute);
   };

+ 9 - 7
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,8 +15,10 @@
 #include "XMLNode.hpp"
 #include "XMLDeclaration.hpp"
 
-namespace ls_std {
-  class XMLDocument : public Class {
+namespace ls_std
+{
+  class XMLDocument : public ls_std::Class
+  {
     public:
 
       XMLDocument();
@@ -24,14 +26,14 @@ namespace ls_std {
 
       std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
       std::shared_ptr<ls_std::XMLNode> getRootElement();
-      void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration>& _declaration);
-      void setRootElement(const std::shared_ptr<ls_std::XMLNode>& _root);
+      void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration> &_declaration);
+      void setRootElement(const std::shared_ptr<ls_std::XMLNode> &_root);
       std::string toXML();
 
     private:
 
-      std::shared_ptr<ls_std::XMLDeclaration> declaration {};
-      std::shared_ptr<ls_std::XMLNode> rootElement {};
+      std::shared_ptr<ls_std::XMLDeclaration> declaration{};
+      std::shared_ptr<ls_std::XMLNode> rootElement{};
   };
 }
 

+ 25 - 23
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,30 +15,32 @@
 #include <ls_std/base/Class.hpp>
 #include "XMLAttribute.hpp"
 
-namespace ls_std {
-  class XMLNode : public Class {
+namespace ls_std
+{
+  class XMLNode : public ls_std::Class
+  {
     public:
 
       explicit XMLNode(std::string _name);
       ~XMLNode() override = 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);
-      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute>& _attribute);
-      bool addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute>& _attribute);
-      bool addChildAfter(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search);
-      bool addChildBefore(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search);
-      bool addChildToBeginning(const std::shared_ptr<ls_std::XMLNode>& _child);
-      bool addChildToEnd(const std::shared_ptr<ls_std::XMLNode>& _child);
+      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);
+      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
+      bool addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
+      bool addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
+      bool addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
+      bool addChildToBeginning(const std::shared_ptr<ls_std::XMLNode> &_child);
+      bool addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_child);
       void clearValue();
       std::list<std::shared_ptr<ls_std::XMLAttribute>> getAttributes();
       std::list<std::shared_ptr<ls_std::XMLNode>> getChildren();
-      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren(const std::string& _name);
+      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren(const std::string &_name);
       std::string getName();
       std::string getValue();
-      bool hasAttribute(const std::string& _name);
-      bool hasChild(const std::string& _name);
-      bool hasChild(const std::shared_ptr<ls_std::XMLNode>& _child);
+      bool hasAttribute(const std::string &_name);
+      bool hasChild(const std::string &_name);
+      bool hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
       void removeFirstAttribute();
       void removeLastAttribute();
       void removeFirstChild();
@@ -53,16 +55,16 @@ namespace ls_std {
 
     private:
 
-      std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes {};
-      std::list<std::shared_ptr<ls_std::XMLNode>> children {};
-      std::string name {};
-      const static uint8_t TAB_SIZE {4};
-      std::string value {};
+      std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes{};
+      std::list<std::shared_ptr<ls_std::XMLNode>> children{};
+      std::string name{};
+      const static uint8_t TAB_SIZE{4};
+      std::string value{};
 
       static std::string _getTab(uint8_t _tabSize);
-      bool _hasAttribute(const std::string& _name);
-      bool _hasChild(const std::shared_ptr<ls_std::XMLNode>& _child);
-      bool _hasChild(const std::string& _name);
+      bool _hasAttribute(const std::string &_name);
+      bool _hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
+      bool _hasChild(const std::string &_name);
       std::string _toXMLAttributes();
       std::string _toXMLChildren(uint8_t _tabSize);
       std::string _toXMLCloseTag();

+ 7 - 5
include/ls_std/io/xml/XMLParseData.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-17
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,10 +14,12 @@
 #include <memory>
 #include "XMLNode.hpp"
 
-namespace ls_std {
-  struct XMLParseData {
-    uint8_t level {};
-    std::shared_ptr<ls_std::XMLNode> node {};
+namespace ls_std
+{
+  struct XMLParseData
+  {
+    uint8_t level{};
+    std::shared_ptr<ls_std::XMLNode> node{};
   };
 }
 

+ 6 - 8
include/ls_std/io/xml/XMLParseMode.hpp

@@ -3,20 +3,18 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-13
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
 #ifndef LS_STD_XML_PARSE_MODE_HPP
 #define LS_STD_XML_PARSE_MODE_HPP
 
-namespace ls_std {
-  enum XMLParseMode {
-    XML_PARSE_MODE_ANALYZE = 0,
-    XML_PARSE_MODE_DECLARATION,
-    XML_PARSE_MODE_OPENING_TAG,
-    XML_PARSE_MODE_VALUE,
-    XML_PARSE_MODE_CLOSING_TAG
+namespace ls_std
+{
+  enum XMLParseMode
+  {
+    XML_PARSE_MODE_ANALYZE = 0, XML_PARSE_MODE_DECLARATION, XML_PARSE_MODE_OPENING_TAG, XML_PARSE_MODE_VALUE, XML_PARSE_MODE_CLOSING_TAG
   };
 }
 

+ 32 - 30
include/ls_std/io/xml/XMLParser.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-25
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -17,52 +17,54 @@
 #include "XMLParseData.hpp"
 #include <list>
 
-namespace ls_std {
-  class XMLParser : public Class {
+namespace ls_std
+{
+  class XMLParser : public ls_std::Class
+  {
     public:
 
-      explicit XMLParser(const std::shared_ptr<ls_std::XMLDocument>& _document);
+      explicit XMLParser(const std::shared_ptr<ls_std::XMLDocument> &_document);
       ~XMLParser() override = default;
 
       std::shared_ptr<ls_std::XMLDocument> getDocument();
-      void parse(const ls_std::byte_field& _data);
-      void setDocument(const std::shared_ptr<ls_std::XMLDocument>& _document);
+      void parse(const ls_std::byte_field &_data);
+      void setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
 
     protected:
 
-      static std::pair<std::string, std::string> _readAttribute_(const ls_std::byte_field& _data);
+      static std::pair<std::string, std::string> _readAttribute_(const ls_std::byte_field &_data);
       static std::list<std::pair<std::string, std::string>> _readAttributes_(ls_std::byte_field _data);
 
     private:
 
-      uint8_t currentLevel {};
-      std::shared_ptr<ls_std::XMLDocument> document {};
-      uint8_t maxLevel {};
-      ls_std::XMLParseMode mode {};
-      std::list<ls_std::XMLParseData> parseData {};
+      uint8_t currentLevel{};
+      std::shared_ptr<ls_std::XMLDocument> document{};
+      uint8_t maxLevel{};
+      ls_std::XMLParseMode mode{};
+      std::list<ls_std::XMLParseData> parseData{};
 
       void _analyze(const ls_std::byte_field &_data, std::string::size_type _index);
-      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument>& _document);
-      static std::shared_ptr<ls_std::XMLDeclaration> _createDeclaration(const std::list<std::pair<std::string, std::string>>& _attributes);
-      static std::shared_ptr<ls_std::XMLNode> _createNode(const std::list<std::pair<std::string, std::string>>& _attributes, const std::string& _name);
-      static std::pair<std::string, std::string> _findAttribute(const std::list<std::pair<std::string, std::string>>& _attributes, const std::string& _name);
-      static size_t _findAttributeEndPosition(const ls_std::byte_field& _data);
-      static ls_std::byte_field _getNextTagString(const ls_std::byte_field& _data, std::string::size_type _index);
-      void _isClosingTag(const ls_std::byte_field& _data, std::string::size_type _index);
-      void _isDeclaration(const ls_std::byte_field& _data, std::string::size_type _index);
-      void _isOpeningTag(const ls_std::byte_field& _data, std::string::size_type _index);
-      void _isValue(const ls_std::byte_field& _data, std::string::size_type _index);
+      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
+      static std::shared_ptr<ls_std::XMLDeclaration> _createDeclaration(const std::list<std::pair<std::string, std::string>> &_attributes);
+      static std::shared_ptr<ls_std::XMLNode> _createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name);
+      static std::pair<std::string, std::string> _findAttribute(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name);
+      static size_t _findAttributeEndPosition(const ls_std::byte_field &_data);
+      static ls_std::byte_field _getNextTagString(const ls_std::byte_field &_data, std::string::size_type _index);
+      void _isClosingTag(const ls_std::byte_field &_data, std::string::size_type _index);
+      void _isDeclaration(const ls_std::byte_field &_data, std::string::size_type _index);
+      void _isOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index);
+      void _isValue(const ls_std::byte_field &_data, std::string::size_type _index);
       void _mergeNodes();
-      void _mergeChildrenToParentNode(const std::shared_ptr<ls_std::XMLNode>& _parent, std::list<ls_std::XMLParseData>::iterator& _iterator, uint8_t _parentLevel);
+      void _mergeChildrenToParentNode(const std::shared_ptr<ls_std::XMLNode> &_parent, std::list<ls_std::XMLParseData>::iterator &_iterator, uint8_t _parentLevel);
       void _mergeNodesOnCurrentLevel();
-      void _parse(const ls_std::byte_field& _data);
-      static std::pair<std::string, std::string> _parseAttribute(const ls_std::byte_field& _data);
+      void _parse(const ls_std::byte_field &_data);
+      static std::pair<std::string, std::string> _parseAttribute(const ls_std::byte_field &_data);
       static std::list<std::pair<std::string, std::string>> _parseAttributes(ls_std::byte_field _data);
-      size_t _parseClosingTag(const ls_std::byte_field& _data, std::string::size_type _index);
-      size_t _parseDeclaration(const ls_std::byte_field& _data, std::string::size_type _index);
-      size_t _parseOpeningTag(const ls_std::byte_field& _data, std::string::size_type _index);
-      static ls_std::byte_field _parseTagName(const ls_std::byte_field& _data);
-      size_t _parseValue(const ls_std::byte_field& _data, std::string::size_type _index);
+      size_t _parseClosingTag(const ls_std::byte_field &_data, std::string::size_type _index);
+      size_t _parseDeclaration(const ls_std::byte_field &_data, std::string::size_type _index);
+      size_t _parseOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index);
+      static ls_std::byte_field _parseTagName(const ls_std::byte_field &_data);
+      size_t _parseValue(const ls_std::byte_field &_data, std::string::size_type _index);
       void _reset();
       void _setMaxLevel();
   };

+ 5 - 3
include/ls_std/io/xml/XMLParserMock.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -12,8 +12,10 @@
 
 #include "XMLParser.hpp"
 
-namespace ls_std {
-  class XMLParserMock : public XMLParser {
+namespace ls_std
+{
+  class XMLParserMock : public ls_std::XMLParser
+  {
     public:
 
       XMLParserMock();

+ 10 - 8
include/ls_std/io/xml/XMLReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -18,11 +18,13 @@
 #include "XMLParseData.hpp"
 #include <list>
 
-namespace ls_std {
-  class XMLReader : public Class, public IReader {
+namespace ls_std
+{
+  class XMLReader : public ls_std::Class, public ls_std::IReader
+  {
     public:
 
-      explicit XMLReader(const std::shared_ptr<ls_std::XMLDocument>& _document, const std::string& _absolutePath);
+      explicit XMLReader(const std::shared_ptr<ls_std::XMLDocument> &_document, const std::string &_absolutePath);
       ~XMLReader() override = default;
 
       // implementation
@@ -32,15 +34,15 @@ namespace ls_std {
       // additional functionality
 
       std::shared_ptr<ls_std::XMLDocument> getDocument();
-      void setDocument(const std::shared_ptr<ls_std::XMLDocument>& _document);
-      void setFile(const ls_std::File& _xmlFile);
+      void setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
+      void setFile(const ls_std::File &_xmlFile);
 
     private:
 
-      std::shared_ptr<ls_std::XMLDocument> document {};
+      std::shared_ptr<ls_std::XMLDocument> document{};
       ls_std::File xmlFile;
 
-      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument>& _document);
+      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
       void _assignFile(ls_std::File _xmlFile);
   };
 }

+ 6 - 4
include/ls_std/logic/IListener.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2020-11-29
+ * Changed:         2021-05-01
  *
  * */
 
@@ -12,14 +12,16 @@
 
 #include <ls_std/base/Class.hpp>
 
-namespace ls_std {
-  class IListener : public Class {
+namespace ls_std
+{
+  class IListener : public ls_std::Class
+  {
     public:
 
       IListener();
       ~IListener() override = default;
 
-      virtual void listen(const ls_std::Class& _info) = 0;
+      virtual void listen(const ls_std::Class &_info) = 0;
   };
 }
 

+ 9 - 7
include/ls_std/logic/Narrator.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2020-11-28
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,22 +15,24 @@
 #include <list>
 #include <memory>
 
-namespace ls_std {
-  class Narrator : public Class {
+namespace ls_std
+{
+  class Narrator : public ls_std::Class
+  {
     public:
 
       Narrator();
       ~Narrator() override = default;
 
-      void addListener(const std::shared_ptr<ls_std::IListener>& _listener);
+      void addListener(const std::shared_ptr<ls_std::IListener> &_listener);
       void clear();
       std::list<std::shared_ptr<ls_std::IListener>> getListeners();
-      void removeListener(const std::shared_ptr<ls_std::IListener>& _listener);
-      void tell(const ls_std::Class& _info);
+      void removeListener(const std::shared_ptr<ls_std::IListener> &_listener);
+      void tell(const ls_std::Class &_info);
 
     private:
 
-      std::list<std::shared_ptr<ls_std::IListener>> listeners {};
+      std::list<std::shared_ptr<ls_std::IListener>> listeners{};
   };
 }
 

+ 21 - 9
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-26
+ * Changed:         2021-04-30
  *
  * */
 
@@ -15,29 +15,41 @@
 #include <ls_std/base/Class.hpp>
 #include "StateMachineTypes.hpp"
 #include "StateConnection.hpp"
+#include <ls_std/serialization/ISerializable.hpp>
 
-namespace ls_std {
-  class State : public ls_std::Class {
+namespace ls_std
+{
+  class State : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
       explicit State(ls_std::StateId _id);
       ~State() override = default;
 
-      bool addStateConnection(const ls_std::StateConnectionId& _connectionId, const std::shared_ptr<ls_std::State>& _connectedState);
-      bool addStateConnection(const std::shared_ptr<ls_std::StateConnection>& _connection);
+      // implementation
+
+      ls_std::byte_field marshal() override;
+      void unmarshal(const ls_std::byte_field &_data) override;
+
+      // additional functionality
+
+      bool addStateConnection(const ls_std::StateConnectionId &_connectionId, const std::shared_ptr<ls_std::State> &_connectedState);
+      bool addStateConnection(const std::shared_ptr<ls_std::StateConnection> &_connection);
       void clearConnections();
       std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> getConnectedStates();
       ls_std::StateId getId();
-      bool hasConnection(const ls_std::StateConnectionId& _connectionId);
+      bool hasConnection(const ls_std::StateConnectionId &_connectionId);
       void setId(ls_std::StateId _id);
+      void setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable);
 
     private:
 
-      std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> connectedStates {};
-      ls_std::StateId id {};
+      std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> connectedStates{};
+      ls_std::StateId id{};
+      std::shared_ptr<ISerializable> serializable{};
 
       void _clearConnections();
-      bool _hasConnection(const ls_std::StateConnectionId& _connectionId);
+      bool _hasConnection(const ls_std::StateConnectionId &_connectionId);
   };
 }
 

+ 8 - 6
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,8 +14,10 @@
 #include <ls_std/base/Class.hpp>
 #include "StateMachineTypes.hpp"
 
-namespace ls_std {
-  class StateConnection : public Class {
+namespace ls_std
+{
+  class StateConnection : public ls_std::Class
+  {
     public:
 
       explicit StateConnection(ls_std::StateConnectionId _connectionId, ls_std::StateId _stateId);
@@ -30,9 +32,9 @@ namespace ls_std {
 
     private:
 
-      bool condition {};
-      ls_std::StateConnectionId connectionId {};
-      ls_std::StateId stateId {};
+      bool condition{};
+      ls_std::StateConnectionId connectionId{};
+      ls_std::StateId stateId{};
   };
 }
 

+ 14 - 12
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-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -18,34 +18,36 @@
 #include "State.hpp"
 #include "StateMachineTypes.hpp"
 
-namespace ls_std {
-  class StateMachine : public Class {
+namespace ls_std
+{
+  class StateMachine : public ls_std::Class
+  {
     public:
 
       explicit StateMachine(std::string _name);
       ~StateMachine() override = default;
 
-      bool addState(const std::shared_ptr<ls_std::State>& _state);
+      bool addState(const std::shared_ptr<ls_std::State> &_state);
       std::shared_ptr<ls_std::State> getCurrentState();
       std::vector<ls_std::StateId> getMemory();
       std::string getName();
       std::unordered_map<StateId, std::shared_ptr<ls_std::State>> getStates();
-      bool hasState(const ls_std::StateId& _id);
+      bool hasState(const ls_std::StateId &_id);
       bool proceed();
       void setMemory(std::vector<ls_std::StateId> _memory);
       void setName(std::string _name);
-      bool setStartState(const ls_std::StateId& _id);
+      bool setStartState(const ls_std::StateId &_id);
 
     private:
 
-      std::shared_ptr<State> currentState {};
-      std::vector<ls_std::StateId> memory {};
-      std::string name {};
-      std::unordered_map<ls_std::StateId, std::shared_ptr<ls_std::State>> states {};
+      std::shared_ptr<State> currentState{};
+      std::vector<ls_std::StateId> memory{};
+      std::string name{};
+      std::unordered_map<ls_std::StateId, std::shared_ptr<ls_std::State>> states{};
 
       std::vector<ls_std::StateId> _getNextValidStates();
-      void _remember(const ls_std::StateId& _id);
-      bool _hasState(const ls_std::StateId& _id);
+      void _remember(const ls_std::StateId &_id);
+      bool _hasState(const ls_std::StateId &_id);
   };
 }
 

+ 3 - 2
include/ls_std/logic/StateMachineTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,7 +12,8 @@
 
 #include <string>
 
-namespace ls_std {
+namespace ls_std
+{
   using StateConnectionId = std::string;
   using StateId = std::string;
 }

+ 24 - 11
include/ls_std/ls_std.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-29
- * Changed:         2020-12-25
+ * Changed:         2021-05-01
  *
  * */
 
@@ -30,6 +30,8 @@
 #include "exception/FileOperationException.hpp"
 #include "exception/IllegalArgumentException.hpp"
 #include "exception/IllegalArithmeticOperationException.hpp"
+#include "exception/IncompleteJsonException.hpp"
+#include "exception/NullPointerException.hpp"
 
 #include "io/logging/LogLevel.hpp"
 #include "io/logging/LogLevelValue.hpp"
@@ -63,22 +65,23 @@
 #include "logic/StateMachine.hpp"
 #include "logic/StateMachineTypes.hpp"
 
-#include "serialization/boxing/SerializableJSONBoolean.hpp"
-#include "serialization/boxing/SerializableJSONDouble.hpp"
-#include "serialization/boxing/SerializableJSONFloat.hpp"
-#include "serialization/boxing/SerializableJSONInteger.hpp"
-#include "serialization/boxing/SerializableJSONLong.hpp"
-#include "serialization/boxing/SerializableJSONString.hpp"
-#include "serialization/logic/SerializableJSONState.hpp"
-#include "serialization/logic/SerializableJSONStateConnection.hpp"
-#include "serialization/logic/SerializableJSONStateMachine.hpp"
-#include "serialization/event/SerializableJSONEvent.hpp"
+#include "serialization/json/boxing/SerializableJSONBoolean.hpp"
+#include "serialization/json/boxing/SerializableJSONDouble.hpp"
+#include "serialization/json/boxing/SerializableJSONFloat.hpp"
+#include "serialization/json/boxing/SerializableJSONInteger.hpp"
+#include "serialization/json/boxing/SerializableJSONLong.hpp"
+#include "serialization/json/boxing/SerializableJSONString.hpp"
+#include "serialization/json/logic/SerializableJSONState.hpp"
+#include "serialization/json/logic/SerializableJSONStateConnection.hpp"
+#include "serialization/json/logic/SerializableJSONStateMachine.hpp"
+#include "serialization/json/event/SerializableJSONEvent.hpp"
 #include "serialization/ISerializable.hpp"
 
 #include "time/Date.hpp"
 
 #include "utils/RegexUtils.hpp"
 #include "utils/STLUtils.hpp"
+
 #if _WIN32
 #include "utils/WindowsUtils.hpp"
 #endif
@@ -89,4 +92,14 @@
 #include "event/IEventSubscriber.hpp"
 #include "event/EventManager.hpp"
 
+#include "factory/IFactory.hpp"
+#include "ls_std/factory/serialization/json/SerializableJSONFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONBooleanFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONDoubleFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONFloatFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONIntegerFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONLongFactory.hpp"
+#include "factory/serialization/json/boxing/SerializableJSONStringFactory.hpp"
+#include "factory/serialization/json/event/SerializableJSONEventFactory.hpp"
+
 #endif

+ 6 - 4
include/ls_std/serialization/ISerializable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-20
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,15 +12,17 @@
 
 #include <ls_std/base/Types.hpp>
 
-namespace ls_std {
-  class ISerializable {
+namespace ls_std
+{
+  class ISerializable
+  {
     public:
 
       ISerializable() = default;
       ~ISerializable() = default;
 
       virtual ls_std::byte_field marshal() = 0;
-      virtual void unmarshal(const ls_std::byte_field& _data) = 0;
+      virtual void unmarshal(const ls_std::byte_field &_data) = 0;
   };
 }
 

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp → include/ls_std/serialization/json/boxing/SerializableJSONBoolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/boxing/Boolean.hpp>
 
-namespace ls_std {
-  class SerializableJSONBoolean : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONBoolean : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONBoolean(const std::shared_ptr<ls_std::Boolean>& _value);
+      explicit SerializableJSONBoolean(const std::shared_ptr<ls_std::Boolean> &_value);
       ~SerializableJSONBoolean() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Boolean> getValue();
-      void setValue(const std::shared_ptr<ls_std::Boolean>& _value);
+      void setValue(const std::shared_ptr<ls_std::Boolean> &_value);
 
     private:
 
-      std::shared_ptr<ls_std::Boolean> value {};
-      nlohmann::json jsonObject {};
+      std::shared_ptr<ls_std::Boolean> value{};
+      nlohmann::json jsonObject{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Boolean>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Boolean> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONDouble.hpp → include/ls_std/serialization/json/boxing/SerializableJSONDouble.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/boxing/Double.hpp>
 
-namespace ls_std {
-  class SerializableJSONDouble : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONDouble : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONDouble(const std::shared_ptr<ls_std::Double>& _value);
+      explicit SerializableJSONDouble(const std::shared_ptr<ls_std::Double> &_value);
       ~SerializableJSONDouble() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Double> getValue();
-      void setValue(const std::shared_ptr<ls_std::Double>& _value);
+      void setValue(const std::shared_ptr<ls_std::Double> &_value);
 
     private:
 
-      std::shared_ptr<ls_std::Double> value {};
-      nlohmann::json jsonObject {};
+      std::shared_ptr<ls_std::Double> value{};
+      nlohmann::json jsonObject{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Double>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Double> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONFloat.hpp → include/ls_std/serialization/json/boxing/SerializableJSONFloat.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/boxing/Float.hpp>
 
-namespace ls_std {
-  class SerializableJSONFloat : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONFloat : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONFloat(const std::shared_ptr<ls_std::Float>& _value);
+      explicit SerializableJSONFloat(const std::shared_ptr<ls_std::Float> &_value);
       ~SerializableJSONFloat() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Float> getValue();
-      void setValue(const std::shared_ptr<ls_std::Float>& _value);
+      void setValue(const std::shared_ptr<ls_std::Float> &_value);
 
     private:
 
-      std::shared_ptr<ls_std::Float> value {};
-      nlohmann::json jsonObject {};
+      std::shared_ptr<ls_std::Float> value{};
+      nlohmann::json jsonObject{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Float>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Float> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONInteger.hpp → include/ls_std/serialization/json/boxing/SerializableJSONInteger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,29 +15,31 @@
 #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 {
+namespace ls_std
+{
+  class SerializableJSONInteger : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONInteger(const std::shared_ptr<ls_std::Integer>& _value);
+      explicit SerializableJSONInteger(const std::shared_ptr<ls_std::Integer> &_value);
       ~SerializableJSONInteger() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Integer> getValue();
-      void setValue(const std::shared_ptr<ls_std::Integer>& _value);
+      void setValue(const std::shared_ptr<ls_std::Integer> &_value);
 
     private:
 
-      std::shared_ptr<ls_std::Integer> value {};
-      nlohmann::json jsonObject {};
+      std::shared_ptr<ls_std::Integer> value{};
+      nlohmann::json jsonObject{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Integer>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Integer> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONLong.hpp → include/ls_std/serialization/json/boxing/SerializableJSONLong.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,29 +15,31 @@
 #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 {
+namespace ls_std
+{
+  class SerializableJSONLong : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONLong(const std::shared_ptr<ls_std::Long>& _value);
+      explicit SerializableJSONLong(const std::shared_ptr<ls_std::Long> &_value);
       ~SerializableJSONLong() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Long> getValue();
-      void setValue(const std::shared_ptr<ls_std::Long>& _value);
+      void setValue(const std::shared_ptr<ls_std::Long> &_value);
 
     private:
 
-      nlohmann::json jsonObject {};
-      std::shared_ptr<ls_std::Long> value {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::Long> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Long>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Long> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/boxing/SerializableJSONString.hpp → include/ls_std/serialization/json/boxing/SerializableJSONString.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -15,29 +15,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/boxing/String.hpp>
 
-namespace ls_std {
-  class SerializableJSONString : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONString : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONString(const std::shared_ptr<ls_std::String>& _value);
+      explicit SerializableJSONString(const std::shared_ptr<ls_std::String> &_value);
       ~SerializableJSONString() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::String> getValue();
-      void setValue(const std::shared_ptr<ls_std::String>& _value);
+      void setValue(const std::shared_ptr<ls_std::String> &_value);
 
     private:
 
-      nlohmann::json jsonObject {};
-      std::shared_ptr<ls_std::String> value {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::String> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::String>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::String> &_value);
       void _update();
   };
 }

+ 11 - 9
include/ls_std/serialization/event/SerializableJSONEvent.hpp → include/ls_std/serialization/json/event/SerializableJSONEvent.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-07
- * Changed:         2020-12-20
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <memory>
 #include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
-namespace ls_std {
-  class SerializableJSONEvent : public ls_std::Class, public ls_std::ISerializable {
+namespace ls_std
+{
+  class SerializableJSONEvent : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONEvent(const std::shared_ptr<ls_std::Event>& _value);
+      explicit SerializableJSONEvent(const std::shared_ptr<ls_std::Event> &_value);
       ~SerializableJSONEvent() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::Event> getValue();
-      void setValue(const std::shared_ptr<ls_std::Event>& _value);
+      void setValue(const std::shared_ptr<ls_std::Event> &_value);
 
     private:
 
-      nlohmann::json jsonObject {};
-      std::shared_ptr<ls_std::Event> value {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::Event> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::Event>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::Event> &_value);
       void _unmarshalParameterList();
       void _update();
       void _updateEventParameterList();

+ 11 - 9
include/ls_std/serialization/logic/SerializableJSONState.hpp → include/ls_std/serialization/json/logic/SerializableJSONState.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/base/Class.hpp>
 
-namespace ls_std {
-  class SerializableJSONState : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONState : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONState(const std::shared_ptr<ls_std::State>& _value);
+      explicit SerializableJSONState(const std::shared_ptr<ls_std::State> &_value);
       ~SerializableJSONState() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::State> getValue();
-      void setValue(const std::shared_ptr<ls_std::State>& _value);
+      void setValue(const std::shared_ptr<ls_std::State> &_value);
 
     private:
 
-      nlohmann::json jsonObject {};
-      std::shared_ptr<ls_std::State> value {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::State> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::State>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::State> &_value);
       void _clear();
       void _unmarshalStateConnections();
       void _update();

+ 11 - 9
include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp → include/ls_std/serialization/json/logic/SerializableJSONStateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/logic/StateConnection.hpp>
 
-namespace ls_std {
-  class SerializableJSONStateConnection : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONStateConnection : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONStateConnection(const std::shared_ptr<ls_std::StateConnection>& _value);
+      explicit SerializableJSONStateConnection(const std::shared_ptr<ls_std::StateConnection> &_value);
       ~SerializableJSONStateConnection() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::StateConnection> getValue();
-      void setValue(const 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 {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::StateConnection> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::StateConnection>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::StateConnection> &_value);
       void _clear();
       void _update();
   };

+ 11 - 9
include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp → include/ls_std/serialization/json/logic/SerializableJSONStateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -16,29 +16,31 @@
 #include <memory>
 #include <ls_std/lib/nlohmann_json/include/nlohmann/json.hpp>
 
-namespace ls_std {
-  class SerializableJSONStateMachine : public Class, public ISerializable {
+namespace ls_std
+{
+  class SerializableJSONStateMachine : public ls_std::Class, public ls_std::ISerializable
+  {
     public:
 
-      explicit SerializableJSONStateMachine(const std::shared_ptr<ls_std::StateMachine>& _value);
+      explicit SerializableJSONStateMachine(const std::shared_ptr<ls_std::StateMachine> &_value);
       ~SerializableJSONStateMachine() override = default;
 
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
       std::shared_ptr<ls_std::StateMachine> getValue();
-      void setValue(const std::shared_ptr<ls_std::StateMachine>& _value);
+      void setValue(const std::shared_ptr<ls_std::StateMachine> &_value);
 
     private:
 
-      nlohmann::json jsonObject {};
-      std::shared_ptr<ls_std::StateMachine> value {};
+      nlohmann::json jsonObject{};
+      std::shared_ptr<ls_std::StateMachine> value{};
 
-      void _assignValue(const std::shared_ptr<ls_std::StateMachine>& _value);
+      void _assignValue(const std::shared_ptr<ls_std::StateMachine> &_value);
       void _unmarshalCurrentState();
       void _unmarshalStates();
       void _update();

+ 11 - 9
include/ls_std/time/Date.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -13,8 +13,10 @@
 #include <ls_std/base/Class.hpp>
 #include <ctime>
 
-namespace ls_std {
-  class Date : public Class {
+namespace ls_std
+{
+  class Date : public ls_std::Class
+  {
     public:
 
       Date();
@@ -22,13 +24,13 @@ namespace ls_std {
 
       // arithmetic operators
 
-      ls_std::Date& operator+(int _value);
-      ls_std::Date& operator-(int _value);
+      ls_std::Date &operator+(int _value);
+      ls_std::Date &operator-(int _value);
 
       // additional functionality
 
-      bool after(const ls_std::Date& _foreignDate) const;
-      bool before(const ls_std::Date& _foreignDate) const;
+      bool after(const ls_std::Date &_foreignDate) const;
+      bool before(const ls_std::Date &_foreignDate) const;
       int getDay();
       int getHour();
       int getMinute();
@@ -41,8 +43,8 @@ namespace ls_std {
 
     private:
 
-      time_t timestamp {};
-      tm* localTime {};
+      time_t timestamp{};
+      tm *localTime{};
 
       void _init();
   };

+ 5 - 3
include/ls_std/utils/RegexUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,8 +13,10 @@
 #include <string>
 #include <regex>
 
-namespace ls_std {
-  class RegexUtils {
+namespace ls_std
+{
+  class RegexUtils
+  {
     public:
 
       RegexUtils() = default;

+ 18 - 11
include/ls_std/utils/STLUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,26 +13,33 @@
 #include <algorithm>
 #include <list>
 
-namespace ls_std {
-  class STLUtils {
+namespace ls_std
+{
+  class STLUtils
+  {
     public:
 
       STLUtils() = default;
       ~STLUtils() = default;
 
       template<class container, class dataType>
-      static bool contains(container _container, const dataType& _value) {
+      static bool contains(container _container, const dataType &_value)
+      {
         return std::find(_container.begin(), _container.end(), _value) != _container.end();
       }
 
       template<class dataType>
-      static dataType getListElementAt(const std::list<dataType>& _list, size_t _index) {
-        dataType value {};
-        size_t counter {};
-
-        if(_index < _list.size()) {
-          for(const auto& _value : _list) {
-            if(counter == _index) {
+      static dataType getListElementAt(const std::list<dataType> &_list, size_t _index)
+      {
+        dataType value{};
+        size_t counter{};
+
+        if (_index < _list.size())
+        {
+          for (const auto &_value : _list)
+          {
+            if (counter == _index)
+            {
               value = _value;
               break;
             }

+ 9 - 13
include/ls_std/utils/WindowsUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-06
- * Changed:         2020-12-06
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,25 +14,21 @@
 #include <string>
 #include <windows.h>
 
-namespace ls_std {
-  class WindowsUtils {
+namespace ls_std
+{
+  class WindowsUtils
+  {
     public:
 
       WindowsUtils() = default;
       ~WindowsUtils() = default;
 
-      static std::string getMessageFromErrorCode(const int& _errorCode) {
+      static std::string getMessageFromErrorCode(const int &_errorCode)
+      {
         ls_std::byte messageBuffer[256 + 1];
+        FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, _errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), messageBuffer, sizeof(messageBuffer), nullptr);
 
-        FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-                       nullptr,
-                       _errorCode,
-                       MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
-                       messageBuffer,
-                       sizeof (messageBuffer),
-                       nullptr);
-
-        return std::string {messageBuffer};
+        return std::string{messageBuffer};
       }
   };
 }

+ 16 - 4
source/ls_std/base/Class.cpp

@@ -3,17 +3,29 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-25
+ * Changed:         2021-04-24
  *
  * */
 
 #include <ls_std/base/Class.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::Class::Class(std::string _name):
-name(std::move(_name))
-{}
+ls_std::Class::Class(const std::string &_name)
+{
+  this->_assignClassName(_name);
+}
 
 std::string ls_std::Class::getClassName()
 {
   return this->name;
 }
+
+void ls_std::Class::_assignClassName(const std::string &_name)
+{
+  if (_name.empty())
+  {
+    throw ls_std::IllegalArgumentException{};
+  }
+
+  this->name = _name;
+}

+ 19 - 13
source/ls_std/base/Version.cpp

@@ -3,22 +3,22 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-28
- * Changed:         2020-11-26
+ * Changed:         2021-04-24
  *
  * */
 
 #include <regex>
 #include <ls_std/base/Version.hpp>
 
-ls_std::Version::Version(ls_std::version_type _majorVersion, ls_std::version_type _minorVersion, ls_std::version_type _patchVersion) :
-majorVersion(_majorVersion),
-minorVersion(_minorVersion),
-patchVersion(_patchVersion)
+ls_std::Version::Version(ls_std::version_type _majorVersion, ls_std::version_type _minorVersion, ls_std::version_type _patchVersion)
+    : majorVersion(_majorVersion),
+      minorVersion(_minorVersion),
+      patchVersion(_patchVersion)
 {}
 
 ls_std::byte_field ls_std::Version::marshal()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
   data += std::to_string(this->majorVersion) + ".";
   data += std::to_string(this->minorVersion) + ".";
@@ -30,12 +30,11 @@ ls_std::byte_field ls_std::Version::marshal()
 void ls_std::Version::unmarshal(const ls_std::byte_field &_data)
 {
   std::string field = _data;
-  std::string subSequence {};
-  size_t position;
 
-  if(ls_std::Version::_isValid(_data)) {
-    position = field.find('.');
-    subSequence = field.substr(0, position);
+  if (ls_std::Version::_isValid(_data))
+  {
+    size_t position = field.find('.');
+    std::string subSequence = field.substr(0, position);
     this->majorVersion = std::stoi(subSequence);
     field.erase(0, position + 1);
 
@@ -85,6 +84,13 @@ void ls_std::Version::setPatchVersion(ls_std::version_type _patch)
 
 bool ls_std::Version::_isValid(const std::string &_versionString)
 {
-  static std::regex versionRegex {R"(\d+[.]\d+[.]\d+)"};
-  return std::regex_match(_versionString.begin(), _versionString.end(), versionRegex);
+  bool isValidVersionString{};
+  static std::regex versionRegex{R"(\d+[.]\d+[.]\d+)"};
+
+  if (!_versionString.empty())
+  {
+    isValidVersionString = std::regex_match(_versionString.begin(), _versionString.end(), versionRegex);
+  }
+
+  return isValidVersionString;
 }

+ 59 - 32
source/ls_std/boxing/Boolean.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -14,8 +14,9 @@
 ls_std::Boolean::Boolean() : ls_std::Class("Boolean")
 {}
 
-ls_std::Boolean::Boolean(bool _value) : ls_std::Class("Boolean"),
-value(_value)
+ls_std::Boolean::Boolean(bool _value)
+    : ls_std::Class("Boolean"),
+      value(_value)
 {}
 
 ls_std::Boolean::operator bool() const
@@ -23,13 +24,13 @@ ls_std::Boolean::operator bool() const
   return this->value;
 }
 
-ls_std::Boolean & ls_std::Boolean::operator=(int _value)
+ls_std::Boolean &ls_std::Boolean::operator=(int _value)
 {
   this->value = _value;
   return *this;
 }
 
-ls_std::Boolean & ls_std::Boolean::operator=(bool _value)
+ls_std::Boolean &ls_std::Boolean::operator=(bool _value)
 {
   this->value = _value;
   return *this;
@@ -65,10 +66,12 @@ bool ls_std::Boolean::operator||(int _value) const
   return this->value || _value;
 }
 
-ls_std::byte_field ls_std::Boolean::load() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::Boolean::load()
+{
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -76,10 +79,12 @@ ls_std::byte_field ls_std::Boolean::load() {
   return data;
 }
 
-ls_std::byte_field ls_std::Boolean::marshal() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::Boolean::marshal()
+{
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
@@ -90,24 +95,34 @@ void ls_std::Boolean::parse(std::string _parseText)
 {
   std::transform(_parseText.begin(), _parseText.end(), _parseText.begin(), ::tolower);
 
-  if(_parseText != this->TRUE_STRING && _parseText != this->FALSE_STRING) {
-    throw ls_std::IllegalArgumentException {};
-  } else {
-    if(_parseText == this->TRUE_STRING) {
+  if (_parseText != this->TRUE_STRING && _parseText != this->FALSE_STRING)
+  {
+    throw ls_std::IllegalArgumentException{};
+  }
+  else
+  {
+    if (_parseText == this->TRUE_STRING)
+    {
       this->value = true;
     }
 
-    if(_parseText == this->FALSE_STRING) {
+    if (_parseText == this->FALSE_STRING)
+    {
       this->value = false;
     }
   }
 }
 
-void ls_std::Boolean::save(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+void ls_std::Boolean::save(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
@@ -118,47 +133,59 @@ std::string ls_std::Boolean::toString()
   return this->_toString();
 }
 
-void ls_std::Boolean::unmarshal(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
+void ls_std::Boolean::unmarshal(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-bool ls_std::Boolean::getValue() const {
+bool ls_std::Boolean::getValue() const
+{
   return this->value;
 }
 
-void ls_std::Boolean::setSerializable(std::shared_ptr<ISerializable> _serializable) {
+void ls_std::Boolean::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
+{
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::Boolean::setStorable(std::shared_ptr<IStorable> _storable) {
+void ls_std::Boolean::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
+{
   this->storable = std::move(_storable);
 }
 
-bool ls_std::Boolean::XOR(const ls_std::Boolean &_leftExpression, const ls_std::Boolean &_rightExpression) {
+bool ls_std::Boolean::XOR(const ls_std::Boolean &_leftExpression, const ls_std::Boolean &_rightExpression)
+{
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
-bool ls_std::Boolean::XOR(const ls_std::Boolean &_leftExpression, bool _rightExpression) {
+bool ls_std::Boolean::XOR(const ls_std::Boolean &_leftExpression, bool _rightExpression)
+{
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
-bool ls_std::Boolean::XOR(bool _leftExpression, const ls_std::Boolean &_rightExpression) {
+bool ls_std::Boolean::XOR(bool _leftExpression, const ls_std::Boolean &_rightExpression)
+{
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
-bool ls_std::Boolean::XOR(bool _leftExpression, bool _rightExpression) {
+bool ls_std::Boolean::XOR(bool _leftExpression, bool _rightExpression)
+{
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
 std::string ls_std::Boolean::_toString() const
 {
-  std::string booleanString {};
+  std::string booleanString{};
 
-  if(this->value) {
+  if (this->value)
+  {
     booleanString = this->TRUE_STRING;
-  } else {
+  }
+  else
+  {
     booleanString = this->FALSE_STRING;
   }
 

+ 111 - 58
source/ls_std/boxing/Double.cpp

@@ -3,167 +3,204 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
 #include <cmath>
 #include <ls_std/boxing/Double.hpp>
 
-ls_std::Double::Double() : ls_std::Class("Double"),
-epsilon(0.00000001)
+ls_std::Double::Double()
+    : ls_std::Class("Double"),
+      epsilon(0.00000001)
 {}
 
-ls_std::Double::Double(double _value) : ls_std::Class("Double"),
-epsilon(0.00000001),
-value(_value)
+ls_std::Double::Double(double _value)
+    : ls_std::Class("Double"),
+      epsilon(0.00000001),
+      value(_value)
 {}
 
-ls_std::Double::operator double() const {
+ls_std::Double::operator double() const
+{
   return this->value;
 }
 
-ls_std::Double & ls_std::Double::operator=(double _value) {
+ls_std::Double &ls_std::Double::operator=(double _value)
+{
   this->value = _value;
   return *this;
 }
 
-double ls_std::Double::operator-() const {
+double ls_std::Double::operator-() const
+{
   return -this->value;
 }
 
-double ls_std::Double::operator+(const ls_std::Double &_double) const {
+double ls_std::Double::operator+(const ls_std::Double &_double) const
+{
   return this->value + _double;
 }
 
-double ls_std::Double::operator+(double _value) const {
+double ls_std::Double::operator+(double _value) const
+{
   return this->value + _value;
 }
 
-double ls_std::Double::operator*(const ls_std::Double &_double) const {
+double ls_std::Double::operator*(const ls_std::Double &_double) const
+{
   return this->value * _double;
 }
 
-double ls_std::Double::operator*(double _value) const {
+double ls_std::Double::operator*(double _value) const
+{
   return this->value * _value;
 }
 
-double ls_std::Double::operator-(const ls_std::Double &_double) const {
+double ls_std::Double::operator-(const ls_std::Double &_double) const
+{
   return this->value - _double;
 }
 
-double ls_std::Double::operator-(double _value) const {
+double ls_std::Double::operator-(double _value) const
+{
   return this->value - _value;
 }
 
-double ls_std::Double::operator/(const ls_std::Double &_double) const {
+double ls_std::Double::operator/(const ls_std::Double &_double) const
+{
   return this->value / _double;
 }
 
-double ls_std::Double::operator/(double _value) const {
+double ls_std::Double::operator/(double _value) const
+{
   return this->value / _value;
 }
 
-ls_std::Double & ls_std::Double::operator+=(const ls_std::Double &_double) {
+ls_std::Double &ls_std::Double::operator+=(const ls_std::Double &_double)
+{
   this->value += _double;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator+=(double _value) {
+ls_std::Double &ls_std::Double::operator+=(double _value)
+{
   this->value += _value;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator-=(const ls_std::Double &_double) {
+ls_std::Double &ls_std::Double::operator-=(const ls_std::Double &_double)
+{
   this->value -= _double;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator-=(double _value) {
+ls_std::Double &ls_std::Double::operator-=(double _value)
+{
   this->value -= _value;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator*=(const ls_std::Double &_double) {
+ls_std::Double &ls_std::Double::operator*=(const ls_std::Double &_double)
+{
   this->value *= _double;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator*=(double _value) {
+ls_std::Double &ls_std::Double::operator*=(double _value)
+{
   this->value *= _value;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator/=(const ls_std::Double &_double) {
+ls_std::Double &ls_std::Double::operator/=(const ls_std::Double &_double)
+{
   this->value /= _double;
   return *this;
 }
 
-ls_std::Double & ls_std::Double::operator/=(double _value) {
+ls_std::Double &ls_std::Double::operator/=(double _value)
+{
   this->value /= _value;
   return *this;
 }
 
-bool ls_std::Double::operator==(const ls_std::Double &_double) const {
+bool ls_std::Double::operator==(const ls_std::Double &_double) const
+{
   return std::fabs(this->value - _double) < this->epsilon;
 }
 
-bool ls_std::Double::operator==(double _value) const {
+bool ls_std::Double::operator==(double _value) const
+{
   return std::fabs(this->value - _value) < this->epsilon;
 }
 
-bool ls_std::Double::operator!=(const ls_std::Double &_double) const {
+bool ls_std::Double::operator!=(const ls_std::Double &_double) const
+{
   return std::fabs(this->value - _double) >= this->epsilon;
 }
 
-bool ls_std::Double::operator!=(double _value) const {
+bool ls_std::Double::operator!=(double _value) const
+{
   return std::fabs(this->value - _value) >= this->epsilon;
 }
 
-bool ls_std::Double::operator>(const ls_std::Double &_double) const {
+bool ls_std::Double::operator>(const ls_std::Double &_double) const
+{
   return this->value > _double;
 }
 
-bool ls_std::Double::operator>(double _value) const {
+bool ls_std::Double::operator>(double _value) const
+{
   return this->value > _value;
 }
 
-bool ls_std::Double::operator>=(const ls_std::Double &_double) const {
+bool ls_std::Double::operator>=(const ls_std::Double &_double) const
+{
   return this->value >= _double;
 }
 
-bool ls_std::Double::operator>=(double _value) const {
+bool ls_std::Double::operator>=(double _value) const
+{
   return this->value >= _value;
 }
 
-bool ls_std::Double::operator<(const ls_std::Double &_double) const {
+bool ls_std::Double::operator<(const ls_std::Double &_double) const
+{
   return this->value < _double;
 }
 
-bool ls_std::Double::operator<(double _value) const {
+bool ls_std::Double::operator<(double _value) const
+{
   return this->value < _value;
 }
 
-bool ls_std::Double::operator<=(const ls_std::Double &_double) const {
+bool ls_std::Double::operator<=(const ls_std::Double &_double) const
+{
   return this->value <= _double;
 }
 
-bool ls_std::Double::operator<=(double _value) const {
+bool ls_std::Double::operator<=(double _value) const
+{
   return this->value <= _value;
 }
 
-void ls_std::Double::operator++() {
+void ls_std::Double::operator++()
+{
   this->value += 1.0f;
 }
 
-void ls_std::Double::operator--() {
+void ls_std::Double::operator--()
+{
   this->value -= 1.0f;
 }
 
-ls_std::byte_field ls_std::Double::load() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::Double::load()
+{
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -171,56 +208,72 @@ ls_std::byte_field ls_std::Double::load() {
   return data;
 }
 
-ls_std::byte_field ls_std::Double::marshal() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::Double::marshal()
+{
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
   return data;
 }
 
-void ls_std::Double::parse(std::string _parseText) {
+void ls_std::Double::parse(std::string _parseText)
+{
   this->value = std::stod(_parseText);
 }
 
-void ls_std::Double::save(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+void ls_std::Double::save(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
 }
 
-std::string ls_std::Double::toString() {
+std::string ls_std::Double::toString()
+{
   return std::to_string(this->value);
 }
 
-void ls_std::Double::unmarshal(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
+void ls_std::Double::unmarshal(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-double ls_std::Double::getEpsilon() {
+double ls_std::Double::getEpsilon()
+{
   return this->epsilon;
 }
 
-double ls_std::Double::getValue() {
+double ls_std::Double::getValue()
+{
   return this->value;
 }
 
-void ls_std::Double::setEpsilon(double _epsilon) {
+void ls_std::Double::setEpsilon(double _epsilon)
+{
   this->epsilon = _epsilon;
 }
 
-void ls_std::Double::setSerializable(std::shared_ptr<ISerializable> _serializable) {
+void ls_std::Double::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
+{
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::Double::setStorable(std::shared_ptr<IStorable> _storable) {
+void ls_std::Double::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
+{
   this->storable = std::move(_storable);
 }

+ 105 - 56
source/ls_std/boxing/Float.cpp

@@ -3,168 +3,204 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
 #include <cmath>
 #include <ls_std/boxing/Float.hpp>
 
-ls_std::Float::Float() : ls_std::Class("Float"),
-epsilon(0.00001f)
+ls_std::Float::Float()
+    : ls_std::Class("Float"),
+      epsilon(0.00001f)
 {}
 
-ls_std::Float::Float(float _value) : ls_std::Class("Float"),
-epsilon(0.00001f),
-value(_value)
+ls_std::Float::Float(float _value)
+    : ls_std::Class("Float"),
+      epsilon(0.00001f),
+      value(_value)
 {}
 
-ls_std::Float::operator float() const {
+ls_std::Float::operator float() const
+{
   return this->value;
 }
 
-ls_std::Float & ls_std::Float::operator=(float _value) {
+ls_std::Float &ls_std::Float::operator=(float _value)
+{
   this->value = _value;
   return *this;
 }
 
-float ls_std::Float::operator-() const {
+float ls_std::Float::operator-() const
+{
   return -this->value;
 }
 
-float ls_std::Float::operator+(const ls_std::Float &_float) const {
+float ls_std::Float::operator+(const ls_std::Float &_float) const
+{
   return this->value + _float;
 }
 
-float ls_std::Float::operator+(float _value) const {
+float ls_std::Float::operator+(float _value) const
+{
   return this->value + _value;
 }
 
-float ls_std::Float::operator*(const ls_std::Float &_float) const {
+float ls_std::Float::operator*(const ls_std::Float &_float) const
+{
   return this->value * _float;
 }
 
-float ls_std::Float::operator*(float _value) const {
+float ls_std::Float::operator*(float _value) const
+{
   return this->value * _value;
 }
 
-float ls_std::Float::operator-(const ls_std::Float &_float) const {
+float ls_std::Float::operator-(const ls_std::Float &_float) const
+{
   return this->value - _float;
 }
 
-float ls_std::Float::operator-(float _value) const {
+float ls_std::Float::operator-(float _value) const
+{
   return this->value - _value;
 }
 
-float ls_std::Float::operator/(const ls_std::Float &_float) const {
+float ls_std::Float::operator/(const ls_std::Float &_float) const
+{
   return this->value / _float;
 }
 
-float ls_std::Float::operator/(float _value) const {
+float ls_std::Float::operator/(float _value) const
+{
   return this->value / _value;
 }
 
-ls_std::Float & ls_std::Float::operator+=(const ls_std::Float &_float) {
+ls_std::Float &ls_std::Float::operator+=(const ls_std::Float &_float)
+{
   this->value += _float;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator+=(float _value) {
+ls_std::Float &ls_std::Float::operator+=(float _value)
+{
   this->value += _value;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator-=(const ls_std::Float &_float) {
+ls_std::Float &ls_std::Float::operator-=(const ls_std::Float &_float)
+{
   this->value -= _float;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator-=(float _value) {
+ls_std::Float &ls_std::Float::operator-=(float _value)
+{
   this->value -= _value;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator*=(const ls_std::Float &_float) {
+ls_std::Float &ls_std::Float::operator*=(const ls_std::Float &_float)
+{
   this->value *= _float;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator*=(float _value) {
+ls_std::Float &ls_std::Float::operator*=(float _value)
+{
   this->value *= _value;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator/=(const ls_std::Float &_float) {
+ls_std::Float &ls_std::Float::operator/=(const ls_std::Float &_float)
+{
   this->value /= _float;
   return *this;
 }
 
-ls_std::Float & ls_std::Float::operator/=(float _value) {
+ls_std::Float &ls_std::Float::operator/=(float _value)
+{
   this->value /= _value;
   return *this;
 }
 
-bool ls_std::Float::operator==(const ls_std::Float &_float) const {
+bool ls_std::Float::operator==(const ls_std::Float &_float) const
+{
   return std::fabs(this->value - _float) < this->epsilon;
 }
 
-bool ls_std::Float::operator==(float _value) const {
+bool ls_std::Float::operator==(float _value) const
+{
   return std::fabs(this->value - _value) < this->epsilon;
 }
 
-bool ls_std::Float::operator!=(const ls_std::Float &_float) const {
+bool ls_std::Float::operator!=(const ls_std::Float &_float) const
+{
   return std::fabs(this->value - _float) >= this->epsilon;
 }
 
-bool ls_std::Float::operator!=(float _value) const {
+bool ls_std::Float::operator!=(float _value) const
+{
   return std::fabs(this->value - _value) >= this->epsilon;
 }
 
-bool ls_std::Float::operator>(const ls_std::Float &_float) const {
+bool ls_std::Float::operator>(const ls_std::Float &_float) const
+{
   return this->value > _float;
 }
 
-bool ls_std::Float::operator>(float _value) const {
+bool ls_std::Float::operator>(float _value) const
+{
   return this->value > _value;
 }
 
-bool ls_std::Float::operator>=(const ls_std::Float &_float) const {
+bool ls_std::Float::operator>=(const ls_std::Float &_float) const
+{
   return this->value >= _float;
 }
 
-bool ls_std::Float::operator>=(float _value) const {
+bool ls_std::Float::operator>=(float _value) const
+{
   return this->value >= _value;
 }
 
-bool ls_std::Float::operator<(const ls_std::Float &_float) const {
+bool ls_std::Float::operator<(const ls_std::Float &_float) const
+{
   return this->value < _float;
 }
 
-bool ls_std::Float::operator<(float _value) const {
+bool ls_std::Float::operator<(float _value) const
+{
   return this->value < _value;
 }
 
-bool ls_std::Float::operator<=(const ls_std::Float &_float) const {
+bool ls_std::Float::operator<=(const ls_std::Float &_float) const
+{
   return this->value <= _float;
 }
 
-bool ls_std::Float::operator<=(float _value) const {
+bool ls_std::Float::operator<=(float _value) const
+{
   return this->value <= _value;
 }
 
-void ls_std::Float::operator++() {
+void ls_std::Float::operator++()
+{
   this->value += 1.0f;
 }
 
-void ls_std::Float::operator--() {
+void ls_std::Float::operator--()
+{
   this->value -= 1.0f;
 }
 
 ls_std::byte_field ls_std::Float::load()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -174,57 +210,70 @@ ls_std::byte_field ls_std::Float::load()
 
 ls_std::byte_field ls_std::Float::marshal()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
   return data;
 }
 
-void ls_std::Float::parse(std::string _parseText) {
+void ls_std::Float::parse(std::string _parseText)
+{
   this->value = std::stof(_parseText);
 }
 
-void ls_std::Float::save(const ls_std::byte_field& _data)
+void ls_std::Float::save(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
 }
 
-std::string ls_std::Float::toString() {
+std::string ls_std::Float::toString()
+{
   return std::to_string(this->value);
 }
 
-void ls_std::Float::unmarshal(const ls_std::byte_field& _data)
+void ls_std::Float::unmarshal(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-float ls_std::Float::getEpsilon() {
+float ls_std::Float::getEpsilon()
+{
   return this->epsilon;
 }
 
-float ls_std::Float::getValue() {
+float ls_std::Float::getValue()
+{
   return this->value;
 }
 
-void ls_std::Float::setEpsilon(float _epsilon) {
+void ls_std::Float::setEpsilon(float _epsilon)
+{
   this->epsilon = _epsilon;
 }
 
-void ls_std::Float::setSerializable(std::shared_ptr<ISerializable> _serializable) {
+void ls_std::Float::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
+{
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::Float::setStorable(std::shared_ptr<IStorable> _storable) {
+void ls_std::Float::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
+{
   this->storable = std::move(_storable);
 }

+ 46 - 33
source/ls_std/boxing/Integer.cpp

@@ -3,15 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
 #include <ls_std/boxing/Integer.hpp>
 #include <ls_std/exception/IllegalArithmeticOperationException.hpp>
 
-ls_std::Integer::Integer(int _value) : ls_std::Class("Integer"),
-value(_value)
+ls_std::Integer::Integer(int _value)
+    : ls_std::Class("Integer"),
+      value(_value)
 {}
 
 ls_std::Integer::Integer() : ls_std::Class("Integer")
@@ -22,7 +23,7 @@ ls_std::Integer::operator int() const
   return this->value;
 }
 
-ls_std::Integer& ls_std::Integer::operator=(int _value)
+ls_std::Integer &ls_std::Integer::operator=(int _value)
 {
   this->value = _value;
   return *this;
@@ -65,8 +66,9 @@ int ls_std::Integer::operator-(int _value) const
 
 int ls_std::Integer::operator/(const ls_std::Integer &_integer) const
 {
-  if(_integer == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_integer == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   return this->value / _integer;
@@ -74,8 +76,9 @@ int ls_std::Integer::operator/(const ls_std::Integer &_integer) const
 
 int ls_std::Integer::operator/(int _value) const
 {
-  if(_value == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_value == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   return this->value / _value;
@@ -91,56 +94,58 @@ int ls_std::Integer::operator%(int _value) const
   return this->value % _value;
 }
 
-ls_std::Integer & ls_std::Integer::operator+=(const ls_std::Integer &_integer)
+ls_std::Integer &ls_std::Integer::operator+=(const ls_std::Integer &_integer)
 {
   this->value += _integer;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator+=(int _value)
+ls_std::Integer &ls_std::Integer::operator+=(int _value)
 {
   this->value += _value;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator-=(const ls_std::Integer &_integer)
+ls_std::Integer &ls_std::Integer::operator-=(const ls_std::Integer &_integer)
 {
   this->value -= _integer;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator-=(int _value)
+ls_std::Integer &ls_std::Integer::operator-=(int _value)
 {
   this->value -= _value;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator*=(const ls_std::Integer &_integer)
+ls_std::Integer &ls_std::Integer::operator*=(const ls_std::Integer &_integer)
 {
   this->value *= _integer;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator*=(int _value)
+ls_std::Integer &ls_std::Integer::operator*=(int _value)
 {
   this->value *= _value;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator/=(const ls_std::Integer &_integer)
+ls_std::Integer &ls_std::Integer::operator/=(const ls_std::Integer &_integer)
 {
-  if(_integer == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_integer == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   this->value /= _integer;
   return *this;
 }
 
-ls_std::Integer & ls_std::Integer::operator/=(int _value)
+ls_std::Integer &ls_std::Integer::operator/=(int _value)
 {
-  if(_value == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_value == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   this->value /= _value;
@@ -249,9 +254,10 @@ void ls_std::Integer::operator--()
 
 ls_std::byte_field ls_std::Integer::load()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -261,9 +267,10 @@ ls_std::byte_field ls_std::Integer::load()
 
 ls_std::byte_field ls_std::Integer::marshal()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
@@ -275,12 +282,16 @@ void ls_std::Integer::parse(std::string _parseText)
   this->value = std::stoi(_parseText);
 }
 
-void ls_std::Integer::save(const ls_std::byte_field& _data)
+void ls_std::Integer::save(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
@@ -291,23 +302,25 @@ std::string ls_std::Integer::toString()
   return std::to_string(this->value);
 }
 
-void ls_std::Integer::unmarshal(const ls_std::byte_field& _data)
+void ls_std::Integer::unmarshal(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-int ls_std::Integer::getValue() const {
+int ls_std::Integer::getValue() const
+{
   return this->value;
 }
 
-void ls_std::Integer::setSerializable(std::shared_ptr<ISerializable> _serializable)
+void ls_std::Integer::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
 {
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::Integer::setStorable(std::shared_ptr<IStorable> _storable)
+void ls_std::Integer::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
 {
   this->storable = std::move(_storable);
 }

+ 48 - 33
source/ls_std/boxing/Long.cpp

@@ -3,15 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
 #include <ls_std/boxing/Long.hpp>
 #include <ls_std/exception/IllegalArithmeticOperationException.hpp>
 
-ls_std::Long::Long(ls_std::long_type _value) : ls_std::Class("Long"),
-value(_value)
+ls_std::Long::Long(ls_std::long_type _value)
+    : ls_std::Class("Long"),
+      value(_value)
 {}
 
 ls_std::Long::Long() : ls_std::Class("Long")
@@ -22,7 +23,7 @@ ls_std::Long::operator ls_std::long_type() const
   return this->value;
 }
 
-ls_std::Long& ls_std::Long::operator=(ls_std::long_type _value)
+ls_std::Long &ls_std::Long::operator=(ls_std::long_type _value)
 {
   this->value = _value;
   return *this;
@@ -65,8 +66,9 @@ ls_std::long_type ls_std::Long::operator-(ls_std::long_type _value) 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 {};
+  if (_long == (ls_std::long_type) 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   return this->value / _long;
@@ -74,8 +76,9 @@ ls_std::long_type ls_std::Long::operator/(const ls_std::Long &_long) const
 
 ls_std::long_type ls_std::Long::operator/(ls_std::long_type _value) const
 {
-  if(_value == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_value == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   return this->value / _value;
@@ -91,56 +94,58 @@ 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 ls_std::Long &_long)
+ls_std::Long &ls_std::Long::operator+=(const ls_std::Long &_long)
 {
   this->value += _long;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator+=(ls_std::long_type _value)
+ls_std::Long &ls_std::Long::operator+=(ls_std::long_type _value)
 {
   this->value += _value;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator-=(const ls_std::Long &_long)
+ls_std::Long &ls_std::Long::operator-=(const ls_std::Long &_long)
 {
   this->value -= _long;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator-=(ls_std::long_type _value)
+ls_std::Long &ls_std::Long::operator-=(ls_std::long_type _value)
 {
   this->value -= _value;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator*=(const ls_std::Long &_long)
+ls_std::Long &ls_std::Long::operator*=(const ls_std::Long &_long)
 {
   this->value *= _long;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator*=(ls_std::long_type _value)
+ls_std::Long &ls_std::Long::operator*=(ls_std::long_type _value)
 {
   this->value *= _value;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator/=(const ls_std::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 {};
+  if (_long == (ls_std::long_type) 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   this->value /= _long;
   return *this;
 }
 
-ls_std::Long & ls_std::Long::operator/=(ls_std::long_type _value)
+ls_std::Long &ls_std::Long::operator/=(ls_std::long_type _value)
 {
-  if(_value == 0) {
-    throw ls_std::IllegalArithmeticOperationException {};
+  if (_value == 0)
+  {
+    throw ls_std::IllegalArithmeticOperationException{};
   }
 
   this->value /= _value;
@@ -249,9 +254,10 @@ void ls_std::Long::operator--()
 
 ls_std::byte_field ls_std::Long::load()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -261,9 +267,10 @@ ls_std::byte_field ls_std::Long::load()
 
 ls_std::byte_field ls_std::Long::marshal()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
@@ -275,12 +282,16 @@ void ls_std::Long::parse(std::string _parseText)
   this->value = std::stoi(_parseText);
 }
 
-void ls_std::Long::save(const ls_std::byte_field& _data)
+void ls_std::Long::save(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
@@ -291,21 +302,25 @@ std::string ls_std::Long::toString()
   return std::to_string(this->value);
 }
 
-void ls_std::Long::unmarshal(const ls_std::byte_field& _data)
+void ls_std::Long::unmarshal(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-ls_std::long_type ls_std::Long::getValue() const {
+ls_std::long_type ls_std::Long::getValue() const
+{
   return this->value;
 }
 
-void ls_std::Long::setSerializable(std::shared_ptr<ISerializable> _serializable) {
+void ls_std::Long::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
+{
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::Long::setStorable(std::shared_ptr<IStorable> _storable) {
+void ls_std::Long::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
+{
   this->storable = std::move(_storable);
 }

+ 95 - 50
source/ls_std/boxing/String.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-05-01
  *
  * */
 
@@ -13,78 +13,96 @@
 ls_std::String::String() : ls_std::Class("String")
 {}
 
-ls_std::String::String(std::string _value) : ls_std::Class("String"),
-value(std::move(_value))
+ls_std::String::String(std::string _value)
+    : ls_std::Class("String"),
+      value(std::move(_value))
 {}
 
-ls_std::String::operator const char*() const {
+ls_std::String::operator const char *() const
+{
   return this->value.c_str();
 }
 
-ls_std::String::operator std::string() const {
+ls_std::String::operator std::string() const
+{
   return this->value;
 }
 
-ls_std::String & ls_std::String::operator=(std::string _value) {
+ls_std::String &ls_std::String::operator=(std::string _value)
+{
   this->value = std::move(_value);
   return *this;
 }
 
-std::string ls_std::String::operator+(ls_std::String _string) const {
+std::string ls_std::String::operator+(ls_std::String _string) const
+{
   return this->value + _string.toString();
 }
 
-std::string ls_std::String::operator+(const std::string& _string) const {
+std::string ls_std::String::operator+(const std::string &_string) const
+{
   return this->value + _string;
 }
 
-std::string ls_std::String::operator+(const char *_string) const {
+std::string ls_std::String::operator+(const char *_string) const
+{
   return this->value + _string;
 }
 
-std::string ls_std::String::operator-(int _number) {
+std::string ls_std::String::operator-(int _number)
+{
   std::string copy = this->value;
   return copy.substr(0, copy.size() - _number);
 }
 
-ls_std::String & ls_std::String::operator+=(ls_std::String _string) {
+ls_std::String &ls_std::String::operator+=(ls_std::String _string)
+{
   this->value = this->value + _string.toString();
   return *this;
 }
 
-ls_std::String & ls_std::String::operator+=(const std::string &_text) {
+ls_std::String &ls_std::String::operator+=(const std::string &_text)
+{
   this->value = this->value + _text;
   return *this;
 }
 
-bool ls_std::String::operator==(ls_std::String _string) {
+bool ls_std::String::operator==(ls_std::String _string)
+{
   return this->value == _string.toString();
 }
 
-bool ls_std::String::operator==(const std::string& _value) {
+bool ls_std::String::operator==(const std::string &_value)
+{
   return this->value == _value;
 }
 
-bool ls_std::String::operator==(const char *_value) {
+bool ls_std::String::operator==(const char *_value)
+{
   return this->value == _value;
 }
 
-bool ls_std::String::operator!=(ls_std::String _string) {
+bool ls_std::String::operator!=(ls_std::String _string)
+{
   return this->value != _string.toString();
 }
 
-bool ls_std::String::operator!=(const std::string& _value) {
+bool ls_std::String::operator!=(const std::string &_value)
+{
   return this->value != _value;
 }
 
-bool ls_std::String::operator!=(const char *_value) {
+bool ls_std::String::operator!=(const char *_value)
+{
   return this->value != _value;
 }
 
-ls_std::byte_field ls_std::String::load() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::String::load()
+{
+  ls_std::byte_field data{};
 
-  if(this->storable != nullptr && this->serializable != nullptr) {
+  if (this->storable != nullptr && this->serializable != nullptr)
+  {
     data = this->storable->load();
     this->serializable->unmarshal(data);
   }
@@ -92,53 +110,68 @@ ls_std::byte_field ls_std::String::load() {
   return data;
 }
 
-ls_std::byte_field ls_std::String::marshal() {
-  ls_std::byte_field data {};
+ls_std::byte_field ls_std::String::marshal()
+{
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
   return data;
 }
 
-void ls_std::String::parse(std::string _parseText) {
+void ls_std::String::parse(std::string _parseText)
+{
   this->value = std::move(_parseText);
 }
 
-void ls_std::String::save(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
-    if(_data.empty()) {
+void ls_std::String::save(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
+    if (_data.empty())
+    {
       this->storable->save(this->serializable->marshal());
-    } else {
+    }
+    else
+    {
       this->storable->save(_data);
     }
   }
 }
 
-std::string ls_std::String::toString() {
+std::string ls_std::String::toString()
+{
   return this->value;
 }
 
-void ls_std::String::unmarshal(const ls_std::byte_field &_data) {
-  if(this->serializable != nullptr) {
+void ls_std::String::unmarshal(const ls_std::byte_field &_data)
+{
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
-bool ls_std::String::contains(const std::string& _text) {
+bool ls_std::String::contains(const std::string &_text)
+{
   return this->value.find(_text) != std::string::npos;
 }
 
-bool ls_std::String::endsWith(const std::string &_text) {
+bool ls_std::String::endsWith(const std::string &_text)
+{
   return this->value.rfind(_text) == (this->value.size() - _text.size());
 }
 
-bool ls_std::String::equalsIgnoreCase(ls_std::String _string) {
+bool ls_std::String::equalsIgnoreCase(ls_std::String _string)
+{
   return this->toLowerCase() == _string.toLowerCase();
 }
 
-bool ls_std::String::equalsIgnoreCase(std::string _text) {
+bool ls_std::String::equalsIgnoreCase(std::string _text)
+{
   return this->toLowerCase() == ls_std::String{std::move(_text)}.toLowerCase();
 }
 
@@ -150,62 +183,74 @@ std::vector<ls_std::byte> ls_std::String::getByteData()
   return byteData;
 }
 
-std::string ls_std::String::padLeft(size_t _width, const char _fillCharacter) {
+std::string ls_std::String::padLeft(size_t _width, const char _fillCharacter)
+{
   return ls_std::String::_createFillContent(this->value, _width, _fillCharacter) + this->value;
 }
 
-std::string ls_std::String::padRight(size_t _width, const char _fillCharacter) {
+std::string ls_std::String::padRight(size_t _width, const char _fillCharacter)
+{
   return this->value + ls_std::String::_createFillContent(this->value, _width, _fillCharacter);
 }
 
-std::string ls_std::String::reverse() {
+std::string ls_std::String::reverse()
+{
   std::string copy = this->value;
   std::reverse(copy.begin(), copy.end());
 
   return copy;
 }
 
-void ls_std::String::setSerializable(std::shared_ptr<ISerializable> _serializable) {
+void ls_std::String::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
+{
   this->serializable = std::move(_serializable);
 }
 
-void ls_std::String::setStorable(std::shared_ptr<IStorable> _storable) {
+void ls_std::String::setStorable(std::shared_ptr<ls_std::IStorable> _storable)
+{
   this->storable = std::move(_storable);
 }
 
-bool ls_std::String::startsWith(const std::string &_text) {
+bool ls_std::String::startsWith(const std::string &_text)
+{
   return this->value.rfind(_text, 0) == 0;
 }
 
-std::string ls_std::String::toLowerCase() {
+std::string ls_std::String::toLowerCase()
+{
   std::string copy = this->value;
   std::transform(copy.begin(), copy.end(), copy.begin(), ::tolower);
 
   return copy;
 }
 
-std::string ls_std::String::toUpperCase() {
+std::string ls_std::String::toUpperCase()
+{
   std::string copy = this->value;
   std::transform(copy.begin(), copy.end(), copy.begin(), ::toupper);
 
   return copy;
 }
 
-std::string ls_std::String::_buildCharacterChain(size_t _amount, const char _fillCharacter) {
-  std::string fillContent {};
+std::string ls_std::String::_buildCharacterChain(size_t _amount, const char _fillCharacter)
+{
+  std::string fillContent{};
 
-  for(size_t iteration {} ; iteration < _amount ; iteration++) {
+  for (size_t iteration{}; iteration < _amount; iteration++)
+  {
     fillContent += _fillCharacter;
   }
 
   return fillContent;
 }
 
-std::string ls_std::String::_createFillContent(const std::string& _text, size_t _width, const char _fillCharacter) {
+std::string ls_std::String::_createFillContent(const std::string &_text, size_t _width, const char _fillCharacter)
+{
   size_t fillSize = _text.size() > _width ? 0 : _width - _text.size();
-  std::string fillContent {};
+  std::string fillContent{};
 
-  if(fillSize > 0) {
+  if (fillSize > 0)
+  {
     fillContent = ls_std::String::_buildCharacterChain(fillSize, _fillCharacter);
   }
 

+ 17 - 12
source/ls_std/event/Event.cpp

@@ -3,23 +3,24 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2020-12-23
+ * Changed:         2021-05-01
  *
  * */
 
 #include <ls_std/event/Event.hpp>
 #include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::Event::Event(const ls_std::event_id& _id) : ls_std::Class("Event")
+ls_std::Event::Event(const ls_std::event_id &_id) : ls_std::Class("Event")
 {
   this->_assignId(_id);
 }
 
 ls_std::byte_field ls_std::Event::marshal()
 {
-  ls_std::byte_field data {};
+  ls_std::byte_field data{};
 
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     data = this->serializable->marshal();
   }
 
@@ -28,14 +29,16 @@ ls_std::byte_field ls_std::Event::marshal()
 
 void ls_std::Event::unmarshal(const ls_std::byte_field &_data)
 {
-  if(this->serializable != nullptr) {
+  if (this->serializable != nullptr)
+  {
     this->serializable->unmarshal(_data);
   }
 }
 
 void ls_std::Event::addParameter(const ls_std::event_parameter &_eventParameter)
 {
-  if(!this->_hasParameter(_eventParameter.first)) {
+  if (!this->_hasParameter(_eventParameter.first))
+  {
     this->parameterList.insert(_eventParameter);
   }
 }
@@ -57,20 +60,22 @@ ls_std::event_parameter_list ls_std::Event::getParameterList()
 
 void ls_std::Event::removeParameter(const ls_std::event_parameter_id &_id)
 {
-  if(this->_hasParameter(_id)) {
+  if (this->_hasParameter(_id))
+  {
     this->parameterList.erase(_id);
   }
 }
 
-void ls_std::Event::setId(const ls_std::event_id&  _id)
+void ls_std::Event::setId(const ls_std::event_id &_id)
 {
   this->_assignId(_id);
 }
 
-void ls_std::Event::_assignId(const ls_std::event_id& _id)
+void ls_std::Event::_assignId(const ls_std::event_id &_id)
 {
-  if(_id.empty()) {
-    throw ls_std::IllegalArgumentException {};
+  if (_id.empty())
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->id = _id;
@@ -81,7 +86,7 @@ bool ls_std::Event::_hasParameter(const ls_std::event_id &_id)
   return this->parameterList.find(_id) != this->parameterList.end();
 }
 
-void ls_std::Event::setSerializable(std::shared_ptr<ISerializable> _serializable)
+void ls_std::Event::setSerializable(std::shared_ptr<ls_std::ISerializable> _serializable)
 {
   this->serializable = std::move(_serializable);
 }

+ 4 - 3
source/ls_std/event/EventHandler.cpp

@@ -3,14 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2020-11-28
+ * Changed:         2021-04-23
  *
  * */
 
 #include <ls_std/event/EventHandler.hpp>
 
-ls_std::EventHandler::EventHandler(ls_std::event_id  _id) : ls_std::Narrator(),
-id(std::move(_id))
+ls_std::EventHandler::EventHandler(ls_std::event_id _id)
+    : ls_std::Narrator(),
+      id(std::move(_id))
 {}
 
 ls_std::event_id ls_std::EventHandler::getId()

+ 11 - 7
source/ls_std/event/EventManager.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2020-11-29
+ * Changed:         2021-05-01
  *
  * */
 
@@ -12,23 +12,26 @@
 ls_std::EventManager::EventManager() : ls_std::Class("EventManager")
 {}
 
-void ls_std::EventManager::subscribe(const ls_std::event_id &_id, const std::shared_ptr<IListener> &_listener)
+void ls_std::EventManager::subscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener)
 {
-  if(this->_hasEventHandler(_id)) {
+  if (this->_hasEventHandler(_id))
+  {
     this->eventHandlers.at(_id)->addListener(_listener);
   }
 }
 
-void ls_std::EventManager::unsubscribe(const ls_std::event_id &_id, const std::shared_ptr<IListener> &_listener)
+void ls_std::EventManager::unsubscribe(const ls_std::event_id &_id, const std::shared_ptr<ls_std::IListener> &_listener)
 {
-  if(this->_hasEventHandler(_id)) {
+  if (this->_hasEventHandler(_id))
+  {
     this->eventHandlers.at(_id)->removeListener(_listener);
   }
 }
 
 void ls_std::EventManager::addEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler)
 {
-  if(!this->_hasEventHandler(_eventHandler->getId())) {
+  if (!this->_hasEventHandler(_eventHandler->getId()))
+  {
     std::pair<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> element = std::make_pair(_eventHandler->getId(), _eventHandler);
     this->eventHandlers.insert(element);
   }
@@ -36,7 +39,8 @@ void ls_std::EventManager::addEventHandler(const std::shared_ptr<ls_std::EventHa
 
 void ls_std::EventManager::fire(ls_std::Event _event)
 {
-  if(this->_hasEventHandler(_event.getId())) {
+  if (this->_hasEventHandler(_event.getId()))
+  {
     this->eventHandlers.at(_event.getId())->tell(_event);
   }
 }

+ 102 - 0
source/ls_std/factory/serialization/json/SerializableJSONFactory.cpp

@@ -0,0 +1,102 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#include <ls_std/factory/serialization/json/SerializableJSONFactory.hpp>
+#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/factory/serialization/json/boxing/SerializableJSONBooleanFactory.hpp>
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.hpp>
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.hpp>
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONIntegerFactory.hpp>
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONLongFactory.hpp>
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONStringFactory.hpp>
+#include <ls_std/exception/IllegalArgumentException.hpp>
+#include <ls_std/exception/NullPointerException.hpp>
+
+ls_std::SerializableJSONFactory::SerializableJSONFactory() : ls_std::Class("SerializableJSONFactory")
+{
+  this->_init();
+}
+
+bool ls_std::SerializableJSONFactory::addFactory(const std::pair<std::string, std::shared_ptr<ls_std::IFactory>> &_factoryInsertion)
+{
+  bool factoryAdded{};
+
+  if (_factoryInsertion.first.empty())
+  {
+    throw ls_std::IllegalArgumentException{};
+  }
+
+  if (_factoryInsertion.second == nullptr)
+  {
+    throw ls_std::NullPointerException{};
+  }
+
+  if (!this->_hasFactory(_factoryInsertion.first))
+  {
+    factoryAdded = this->factories.insert(_factoryInsertion).second;
+  }
+
+  return factoryAdded;
+}
+
+std::shared_ptr<ls_std::Class> ls_std::SerializableJSONFactory::build(const std::string &_relatedObjectName)
+{
+  std::shared_ptr<ls_std::Class> requestedBuiltObject{};
+
+  if (this->_hasFactory(_relatedObjectName))
+  {
+    requestedBuiltObject = this->factories.at(_relatedObjectName)->build();
+  }
+
+  return requestedBuiltObject;
+}
+
+bool ls_std::SerializableJSONFactory::clear()
+{
+  this->factories.clear();
+  return factories.empty();
+}
+
+bool ls_std::SerializableJSONFactory::hasFactory(const std::string &_relatedObjectName)
+{
+  return this->_hasFactory(_relatedObjectName);
+}
+
+bool ls_std::SerializableJSONFactory::removeFactory(const std::string &_relatedObjectName)
+{
+  bool wasRemoved{};
+
+  if (this->_hasFactory(_relatedObjectName))
+  {
+    this->factories.erase(_relatedObjectName);
+    wasRemoved = !this->_hasFactory(_relatedObjectName);
+  }
+
+  return wasRemoved;
+}
+
+bool ls_std::SerializableJSONFactory::_hasFactory(const std::string &_relatedObjectName)
+{
+  return this->factories.find(_relatedObjectName) != this->factories.end();
+}
+
+void ls_std::SerializableJSONFactory::_init()
+{
+  this->factories.insert({ls_std::Boolean{}.getClassName(), std::make_shared<ls_std::SerializableJSONBooleanFactory>()});
+  this->factories.insert({ls_std::Double{}.getClassName(), std::make_shared<ls_std::SerializableJSONDoubleFactory>()});
+  this->factories.insert({ls_std::Float{}.getClassName(), std::make_shared<ls_std::SerializableJSONFloatFactory>()});
+  this->factories.insert({ls_std::Integer{}.getClassName(), std::make_shared<ls_std::SerializableJSONIntegerFactory>()});
+  this->factories.insert({ls_std::Long{}.getClassName(), std::make_shared<ls_std::SerializableJSONLongFactory>()});
+  this->factories.insert({ls_std::String{}.getClassName(), std::make_shared<ls_std::SerializableJSONStringFactory>()});
+}

+ 24 - 0
source/ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.cpp

@@ -0,0 +1,24 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-23
+ * Changed:         2021-05-01
+ *
+ * */
+
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONBooleanFactory.hpp>
+#include <ls_std/boxing/Boolean.hpp>
+#include <ls_std/serialization/json/boxing/SerializableJSONBoolean.hpp>
+
+ls_std::SerializableJSONBooleanFactory::SerializableJSONBooleanFactory() : ls_std::Class("SerializableJSONBooleanFactory")
+{}
+
+std::shared_ptr<ls_std::Class> ls_std::SerializableJSONBooleanFactory::build()
+{
+  std::shared_ptr<ls_std::Boolean> requestedObject = std::make_shared<ls_std::Boolean>();
+  std::shared_ptr<ls_std::ISerializable> serializable = std::make_shared<ls_std::SerializableJSONBoolean>(requestedObject);
+  requestedObject->setSerializable(serializable);
+
+  return std::dynamic_pointer_cast<ls_std::Class>(requestedObject);
+}

+ 24 - 0
source/ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.cpp

@@ -0,0 +1,24 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-24
+ * Changed:         2021-05-01
+ *
+ * */
+
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONDoubleFactory.hpp>
+#include <ls_std/boxing/Double.hpp>
+#include <ls_std/serialization/json/boxing/SerializableJSONDouble.hpp>
+
+ls_std::SerializableJSONDoubleFactory::SerializableJSONDoubleFactory() : ls_std::Class("SerializableJSONDoubleFactory")
+{}
+
+std::shared_ptr<ls_std::Class> ls_std::SerializableJSONDoubleFactory::build()
+{
+  std::shared_ptr<ls_std::Double> requestedObject = std::make_shared<ls_std::Double>();
+  std::shared_ptr<ls_std::ISerializable> serializable = std::make_shared<ls_std::SerializableJSONDouble>(requestedObject);
+  requestedObject->setSerializable(serializable);
+
+  return std::dynamic_pointer_cast<ls_std::Class>(requestedObject);
+}

+ 24 - 0
source/ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.cpp

@@ -0,0 +1,24 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2021-04-25
+ * Changed:         2021-05-01
+ *
+ * */
+
+#include <ls_std/factory/serialization/json/boxing/SerializableJSONFloatFactory.hpp>
+#include <ls_std/boxing/Float.hpp>
+#include <ls_std/serialization/json/boxing/SerializableJSONFloat.hpp>
+
+ls_std::SerializableJSONFloatFactory::SerializableJSONFloatFactory() : ls_std::Class("SerializableJSONFloatFactory")
+{}
+
+std::shared_ptr<ls_std::Class> ls_std::SerializableJSONFloatFactory::build()
+{
+  std::shared_ptr<ls_std::Float> requestedObject = std::make_shared<ls_std::Float>();
+  std::shared_ptr<ls_std::ISerializable> serializable = std::make_shared<ls_std::SerializableJSONFloat>(requestedObject);
+  requestedObject->setSerializable(serializable);
+
+  return std::dynamic_pointer_cast<ls_std::Class>(requestedObject);
+}

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff