Browse Source

Merged in dev (pull request #1)

Dev
Patrick-Christopher Mattulat 3 years ago
parent
commit
04e44fda43
97 changed files with 323 additions and 305 deletions
  1. 8 59
      CMakeLists.txt
  2. 10 1
      README.md
  3. 1 1
      include/ls_std/base/Class.hpp
  4. 1 1
      include/ls_std/base/Types.hpp
  5. 2 2
      include/ls_std/base/Version.hpp
  6. 1 1
      include/ls_std/boxing/Boolean.hpp
  7. 1 1
      include/ls_std/boxing/Double.hpp
  8. 1 1
      include/ls_std/boxing/Float.hpp
  9. 1 1
      include/ls_std/boxing/IBoxing.hpp
  10. 1 1
      include/ls_std/boxing/Integer.hpp
  11. 1 1
      include/ls_std/boxing/Long.hpp
  12. 1 1
      include/ls_std/boxing/String.hpp
  13. 2 2
      include/ls_std/exception/FileNotFoundException.hpp
  14. 2 2
      include/ls_std/exception/FileOperationException.hpp
  15. 2 2
      include/ls_std/exception/IllegalArgumentException.hpp
  16. 2 2
      include/ls_std/exception/IllegalArithmeticOperationException.hpp
  17. 27 0
      include/ls_std/exception/NullPointerException.hpp
  18. 1 1
      include/ls_std/io/File.hpp
  19. 2 2
      include/ls_std/io/FileOutputStream.hpp
  20. 1 1
      include/ls_std/io/FilePathSeparator.hpp
  21. 1 1
      include/ls_std/io/FilePathSeparatorMatch.hpp
  22. 1 1
      include/ls_std/io/FileReader.hpp
  23. 1 1
      include/ls_std/io/FileWriter.hpp
  24. 1 1
      include/ls_std/io/IReader.hpp
  25. 1 1
      include/ls_std/io/IStorable.hpp
  26. 1 1
      include/ls_std/io/IWriter.hpp
  27. 1 1
      include/ls_std/io/NewLine.hpp
  28. 26 0
      include/ls_std/io/StandardOutputWriter.hpp
  29. 1 1
      include/ls_std/io/StorableFile.hpp
  30. 1 1
      include/ls_std/io/logging/LogLevel.hpp
  31. 1 1
      include/ls_std/io/logging/LogLevelValue.hpp
  32. 3 6
      include/ls_std/io/logging/Logger.hpp
  33. 1 1
      include/ls_std/io/xml/XMLAttribute.hpp
  34. 1 1
      include/ls_std/io/xml/XMLDeclaration.hpp
  35. 1 1
      include/ls_std/io/xml/XMLDocument.hpp
  36. 1 1
      include/ls_std/io/xml/XMLNode.hpp
  37. 1 1
      include/ls_std/io/xml/XMLParseData.hpp
  38. 1 1
      include/ls_std/io/xml/XMLParseMode.hpp
  39. 1 1
      include/ls_std/io/xml/XMLReader.hpp
  40. 1 1
      include/ls_std/io/xml/XMLReaderMock.hpp
  41. 0 0
      include/ls_std/lib/nlohmann_json/LICENSE.MIT
  42. 0 0
      include/ls_std/lib/nlohmann_json/include/nlohmann/json.hpp
  43. 0 0
      include/ls_std/lib/nlohmann_json/include/nlohmann/json_fwd.hpp
  44. 1 1
      include/ls_std/logic/State.hpp
  45. 1 1
      include/ls_std/logic/StateConnection.hpp
  46. 1 1
      include/ls_std/logic/StateMachine.hpp
  47. 1 1
      include/ls_std/logic/StateMachineTypes.hpp
  48. 10 10
      include/ls_std/ls_std.hpp
  49. 1 1
      include/ls_std/serialization/ISerializable.hpp
  50. 4 4
      include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp
  51. 4 4
      include/ls_std/serialization/boxing/SerializableJSONDouble.hpp
  52. 4 4
      include/ls_std/serialization/boxing/SerializableJSONFloat.hpp
  53. 4 4
      include/ls_std/serialization/boxing/SerializableJSONInteger.hpp
  54. 4 4
      include/ls_std/serialization/boxing/SerializableJSONLong.hpp
  55. 3 3
      include/ls_std/serialization/boxing/SerializableJSONString.hpp
  56. 4 4
      include/ls_std/serialization/logic/SerializableJSONState.hpp
  57. 4 4
      include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp
  58. 4 4
      include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp
  59. 1 1
      include/ls_std/time/Date.hpp
  60. 1 1
      include/ls_std/utils/RegexUtils.hpp
  61. 1 1
      include/ls_std/utils/STLUtils.hpp
  62. 2 2
      source/ls_std/base/Class.cpp
  63. 2 2
      source/ls_std/base/Version.cpp
  64. 3 3
      source/ls_std/boxing/Boolean.cpp
  65. 2 2
      source/ls_std/boxing/Double.cpp
  66. 2 2
      source/ls_std/boxing/Float.cpp
  67. 3 3
      source/ls_std/boxing/Integer.cpp
  68. 3 5
      source/ls_std/boxing/Long.cpp
  69. 2 3
      source/ls_std/boxing/String.cpp
  70. 4 4
      source/ls_std/io/File.cpp
  71. 4 4
      source/ls_std/io/FileOutputStream.cpp
  72. 4 4
      source/ls_std/io/FileReader.cpp
  73. 4 4
      source/ls_std/io/FileWriter.cpp
  74. 17 0
      source/ls_std/io/StandardOutputWriter.cpp
  75. 4 4
      source/ls_std/io/StorableFile.cpp
  76. 2 2
      source/ls_std/io/logging/LogLevel.cpp
  77. 12 24
      source/ls_std/io/logging/Logger.cpp
  78. 2 2
      source/ls_std/io/xml/XMLAttribute.cpp
  79. 2 2
      source/ls_std/io/xml/XMLDeclaration.cpp
  80. 2 2
      source/ls_std/io/xml/XMLDocument.cpp
  81. 3 3
      source/ls_std/io/xml/XMLNode.cpp
  82. 5 5
      source/ls_std/io/xml/XMLReader.cpp
  83. 2 2
      source/ls_std/io/xml/XMLReaderMock.cpp
  84. 2 2
      source/ls_std/logic/State.cpp
  85. 2 2
      source/ls_std/logic/StateConnection.cpp
  86. 2 4
      source/ls_std/logic/StateMachine.cpp
  87. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONBoolean.cpp
  88. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONDouble.cpp
  89. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONFloat.cpp
  90. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONInteger.cpp
  91. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONLong.cpp
  92. 2 2
      source/ls_std/serialization/json/boxing/SerializableJSONString.cpp
  93. 3 3
      source/ls_std/serialization/json/logic/SerializableJSONState.cpp
  94. 2 4
      source/ls_std/serialization/json/logic/SerializableJSONStateConnection.cpp
  95. 3 3
      source/ls_std/serialization/json/logic/SerializableJSONStateMachine.cpp
  96. 2 2
      source/ls_std/time/Date.cpp
  97. 41 29
      test/cases/io/logging/LoggerTest.cpp

+ 8 - 59
CMakeLists.txt

@@ -4,7 +4,7 @@
 
 cmake_minimum_required(VERSION 3.17)
 set(PROJECT_NAME ls_std)
-set(RELEASE_VERSION 2020.1.0)
+set(RELEASE_VERSION 2020.2.0)
 project(${PROJECT_NAME})
 
 ##########################################################
@@ -23,8 +23,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 message("${PROJECT_NAME}: Adding include directories...")
 
 include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googletest/include)
-include_directories(${CMAKE_CURRENT_LIST_DIR}/source/ls_std/lib/nlohmann_json/include/nlohmann)
-include_directories(${CMAKE_CURRENT_LIST_DIR}/source)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/include/ls_std/lib/nlohmann_json/include/nlohmann)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
 
 ######################################################
 # Add Other CMake Dependencies
@@ -38,93 +38,41 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1)
 ##########################################################
 
 set(SOURCE_FILES
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Integer.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Class.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Class.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Integer.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/IBoxing.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/exception/IllegalArithmeticOperationException.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Types.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Boolean.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Boolean.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/exception/IllegalArgumentException.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Float.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Float.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Double.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Double.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/String.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/String.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/time/Date.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/time/Date.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/File.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/File.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/exception/FileOperationException.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FilePathSeparatorMatch.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FilePathSeparator.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/utils/STLUtils.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Long.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/boxing/Long.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/IWriter.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileWriter.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileWriter.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/exception/FileNotFoundException.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/IReader.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileReader.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileReader.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/NewLine.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/utils/RegexUtils.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/IStorable.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StorableFile.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StorableFile.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/LogLevel.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileOutputStream.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/FileOutputStream.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/Logger.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/Logger.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/LogLevel.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/logging/LogLevelValue.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/ISerializable.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONInteger.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONInteger.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONLong.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONLong.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONString.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONString.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONFloat.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONFloat.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONDouble.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONDouble.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONBoolean.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/boxing/SerializableJSONBoolean.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateMachine.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateMachine.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/State.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/State.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateConnection.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateConnection.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/StateMachineTypes.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONStateConnection.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONStateConnection.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONState.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONState.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONStateMachine.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJSONStateMachine.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLAttribute.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLAttribute.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLNode.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLNode.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDocument.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDeclaration.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Version.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Version.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDeclaration.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDocument.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReader.hpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReader.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLParseMode.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLParseData.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReaderMock.hpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReaderMock.cpp)
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReaderMock.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StandardOutputWriter.cpp)
 
 set(TEST_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/IntegerTest.cpp
@@ -174,8 +122,9 @@ set(TEST_FILES
 message("${PROJECT_NAME}: Building version ${RELEASE_VERSION}...")
 
 add_executable(${PROJECT_NAME}_test ${TEST_FILES})
-add_library("${PROJECT_NAME}_${RELEASE_VERSION}_static" ${SOURCE_FILES})
-add_library("${PROJECT_NAME}_${RELEASE_VERSION}" SHARED ${SOURCE_FILES})
+add_library("${PROJECT_NAME}_${RELEASE_VERSION}_static" STATIC ${SOURCE_FILES})
+add_library("${PROJECT_NAME}_${RELEASE_VERSION}_shared" SHARED ${SOURCE_FILES})
+add_library("${PROJECT_NAME}_${RELEASE_VERSION}_module" MODULE ${SOURCE_FILES})
 
 ##########################################################
 # Linking

+ 10 - 1
README.md

@@ -1,4 +1,4 @@
-# Lynar Studios - Standard Library 2020.1.0 #
+# Lynar Studios - Standard Library 2020.2.0 #
 
 This is a cross-platform standard library written in C++ which provides basic functionality and implementation, like:
  
@@ -14,6 +14,15 @@ This is a cross-platform standard library written in C++ which provides basic fu
 
 It has been tested on __Windows__, __Linux__ and __MacOS__ systems.
 
+### Change Log ###
+
+- isolated header files by restructuring the project
+- improved Logger class by passing IWriter implementation to constructor
+- improved exceptions by adding exception name to messages
+- added NullPointerException
+- added StandardOutputWriter class, which is an IWriter implementation
+- improved CMakeLists.txt by removing unnecessary header files and also generating static, shared and module libraries now
+
 ### Documentation ###
 
 You can find a detailed documentation on Lynar Studios Website: lynarstudios.com

+ 1 - 1
source/ls_std/base/Class.hpp → include/ls_std/base/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/base/Types.hpp → include/ls_std/base/Types.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -12,7 +12,7 @@
 
 #include "Class.hpp"
 #include "../serialization/ISerializable.hpp"
-#include "../base/Types.hpp"
+#include "Types.hpp"
 
 namespace ls_std {
   class Version : public ISerializable {

+ 1 - 1
source/ls_std/boxing/Boolean.hpp → include/ls_std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/Double.hpp → include/ls_std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/Float.hpp → include/ls_std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/IBoxing.hpp → include/ls_std/boxing/IBoxing.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/Integer.hpp → include/ls_std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/Long.hpp → include/ls_std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/boxing/String.hpp → include/ls_std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 2 - 2
source/ls_std/exception/FileNotFoundException.hpp → include/ls_std/exception/FileNotFoundException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
       FileNotFoundException() = default;
 
       const char *what() const noexcept override {
-        return "file not found!";
+        return "FileNotFoundException thrown - file not found!";
       };
   };
 }

+ 2 - 2
source/ls_std/exception/FileOperationException.hpp → include/ls_std/exception/FileOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
       explicit FileOperationException() = default;
 
       const char *what() const noexcept override {
-        return "file operation failed!";
+        return "FileOperationException thrown - file operation failed!";
       }
   };
 }

+ 2 - 2
source/ls_std/exception/IllegalArgumentException.hpp → include/ls_std/exception/IllegalArgumentException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -19,7 +19,7 @@ namespace ls_std {
       IllegalArgumentException() = default;
 
       const char *what() const noexcept override {
-        return "passed argument is not valid!";
+        return "IllegalArgumentException thrown - passed argument is not valid!";
       }
   };
 }

+ 2 - 2
source/ls_std/exception/IllegalArithmeticOperationException.hpp → include/ls_std/exception/IllegalArithmeticOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -19,7 +19,7 @@ namespace ls_std {
       IllegalArithmeticOperationException() = default;
 
       const char *what() const noexcept override {
-        return "arithmetic operation is not valid!";
+        return "IllegalArithmeticOperationException thrown - arithmetic operation is not valid!";
       }
   };
 }

+ 27 - 0
include/ls_std/exception/NullPointerException.hpp

@@ -0,0 +1,27 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-06
+ * Changed:         2020-11-06
+ *
+ * */
+
+#ifndef LS_STD_NULL_POINTER_EXCEPTION_HPP
+#define LS_STD_NULL_POINTER_EXCEPTION_HPP
+
+#include <exception>
+
+namespace ls_std {
+  class NullPointerException : public std::exception {
+    public:
+
+      explicit NullPointerException() = default;
+
+      const char *what() const noexcept override {
+        return "NullPointerException thrown - reference is null!";
+      }
+  };
+}
+
+#endif

+ 1 - 1
source/ls_std/io/File.hpp → include/ls_std/io/File.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -16,7 +16,7 @@
 #include <fstream>
 
 namespace ls_std {
-  class FileOutputStream : public Class, IWriter {
+  class FileOutputStream : public Class, public IWriter {
     public:
 
       explicit FileOutputStream(File& _file);

+ 1 - 1
source/ls_std/io/FilePathSeparator.hpp → include/ls_std/io/FilePathSeparator.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/FilePathSeparatorMatch.hpp → include/ls_std/io/FilePathSeparatorMatch.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/FileReader.hpp → include/ls_std/io/FileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/FileWriter.hpp → include/ls_std/io/FileWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/IReader.hpp → include/ls_std/io/IReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/IStorable.hpp → include/ls_std/io/IStorable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/IWriter.hpp → include/ls_std/io/IWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/NewLine.hpp → include/ls_std/io/NewLine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 26 - 0
include/ls_std/io/StandardOutputWriter.hpp

@@ -0,0 +1,26 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-06
+ * Changed:         2020-11-06
+ *
+ * */
+
+#ifndef LS_STD_STANDARD_OUTPUT_WRITER_HPP
+#define LS_STD_STANDARD_OUTPUT_WRITER_HPP
+
+#include "IWriter.hpp"
+
+namespace ls_std {
+  class StandardOutputWriter : public IWriter {
+    public:
+
+      StandardOutputWriter() = default;
+      ~StandardOutputWriter() = default;
+
+      bool write(const ls_std::byte_field& _data) override;
+  };
+}
+
+#endif

+ 1 - 1
source/ls_std/io/StorableFile.hpp → include/ls_std/io/StorableFile.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/logging/LogLevel.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/logging/LogLevelValue.hpp → include/ls_std/io/logging/LogLevelValue.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 3 - 6
source/ls_std/io/logging/Logger.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -21,10 +21,9 @@ namespace ls_std {
   class Logger : public Class {
     public:
 
-      explicit Logger(const std::string& _path);
+      explicit Logger(const std::shared_ptr<ls_std::IWriter>& _writer);
       ~Logger() = default;
 
-      void close();
       void debug(const ls_std::byte* _data);
       void error(const ls_std::byte* _data);
       void fatal(const ls_std::byte* _data);
@@ -36,11 +35,9 @@ namespace ls_std {
 
     private:
 
-      ls_std::File file;
       ls_std::LogLevel logLevel {};
-      std::shared_ptr<ls_std::FileOutputStream> outputStream {};
+      std::shared_ptr<ls_std::IWriter> writer {};
 
-      void _init();
       void _log(const ls_std::byte* _data, const ls_std::LogLevel& _logLevel);
   };
 }

+ 1 - 1
source/ls_std/io/xml/XMLAttribute.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLDeclaration.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLDocument.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLNode.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLParseData.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLParseMode.hpp → include/ls_std/io/xml/XMLParseMode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-13
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLReader.hpp → 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-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/io/xml/XMLReaderMock.hpp → include/ls_std/io/xml/XMLReaderMock.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 0 - 0
source/ls_std/lib/nlohmann_json/LICENSE.MIT → include/ls_std/lib/nlohmann_json/LICENSE.MIT


+ 0 - 0
source/ls_std/lib/nlohmann_json/include/nlohmann/json.hpp → include/ls_std/lib/nlohmann_json/include/nlohmann/json.hpp


+ 0 - 0
source/ls_std/lib/nlohmann_json/include/nlohmann/json_fwd.hpp → include/ls_std/lib/nlohmann_json/include/nlohmann/json_fwd.hpp


+ 1 - 1
source/ls_std/logic/State.hpp → include/ls_std/logic/State.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/logic/StateConnection.hpp → include/ls_std/logic/StateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/logic/StateMachine.hpp → include/ls_std/logic/StateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/logic/StateMachineTypes.hpp → include/ls_std/logic/StateMachineTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 10 - 10
source/ls_std/ls_std.hpp → include/ls_std/ls_std.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-29
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -55,15 +55,15 @@
 #include "logic/StateMachine.hpp"
 #include "logic/StateMachineTypes.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/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/ISerializable.hpp"
 
 #include "time/Date.hpp"

+ 1 - 1
source/ls_std/serialization/ISerializable.hpp → include/ls_std/serialization/ISerializable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 4 - 4
source/ls_std/serialization/json/boxing/SerializableJSONBoolean.hpp → include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -12,9 +12,9 @@
 
 #include <memory>
 #include <json.hpp>
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../boxing/Boolean.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../boxing/Boolean.hpp"
 
 namespace ls_std {
   class SerializableJSONBoolean : public Class, public ISerializable {

+ 4 - 4
source/ls_std/serialization/json/boxing/SerializableJSONDouble.hpp → include/ls_std/serialization/boxing/SerializableJSONDouble.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -12,9 +12,9 @@
 
 #include <memory>
 #include <json.hpp>
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../boxing/Double.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../boxing/Double.hpp"
 
 namespace ls_std {
   class SerializableJSONDouble : public Class, public ISerializable {

+ 4 - 4
source/ls_std/serialization/json/boxing/SerializableJSONFloat.hpp → include/ls_std/serialization/boxing/SerializableJSONFloat.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -12,9 +12,9 @@
 
 #include <memory>
 #include <json.hpp>
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../boxing/Float.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../boxing/Float.hpp"
 
 namespace ls_std {
   class SerializableJSONFloat : public Class, public ISerializable {

+ 4 - 4
source/ls_std/serialization/json/boxing/SerializableJSONInteger.hpp → include/ls_std/serialization/boxing/SerializableJSONInteger.hpp

@@ -3,16 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_INTEGER_HPP
 #define LS_STD_SERIALIZABLE_JSON_INTEGER_HPP
 
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../boxing/Integer.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../boxing/Integer.hpp"
 #include <json.hpp>
 
 namespace ls_std {

+ 4 - 4
source/ls_std/serialization/json/boxing/SerializableJSONLong.hpp → include/ls_std/serialization/boxing/SerializableJSONLong.hpp

@@ -3,16 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_LONG_HPP
 #define LS_STD_SERIALIZABLE_JSON_LONG_HPP
 
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../boxing/Long.hpp"
+#include "../../../../../include/ls_std/base/Class.hpp"
+#include "../../../../../include/ls_std/serialization/ISerializable.hpp"
+#include "../../../../../include/ls_std/boxing/Long.hpp"
 #include <json.hpp>
 
 namespace ls_std {

+ 3 - 3
source/ls_std/serialization/json/boxing/SerializableJSONString.hpp → include/ls_std/serialization/boxing/SerializableJSONString.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -12,8 +12,8 @@
 
 #include <memory>
 #include <json.hpp>
-#include "../../ISerializable.hpp"
-#include "../../../boxing/String.hpp"
+#include "../../../../../include/ls_std/serialization/ISerializable.hpp"
+#include "../../../../../include/ls_std/boxing/String.hpp"
 
 namespace ls_std {
   class SerializableJSONString : public Class, public ISerializable {

+ 4 - 4
source/ls_std/serialization/json/logic/SerializableJSONState.hpp → include/ls_std/serialization/logic/SerializableJSONState.hpp

@@ -3,16 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_HPP
 
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../logic/State.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../logic/State.hpp"
 #include <memory>
 #include <json.hpp>
 

+ 4 - 4
source/ls_std/serialization/json/logic/SerializableJSONStateConnection.hpp → include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp

@@ -3,16 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_CONNECTION_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_CONNECTION_HPP
 
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../logic/StateConnection.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../logic/StateConnection.hpp"
 #include <memory>
 #include <json.hpp>
 

+ 4 - 4
source/ls_std/serialization/json/logic/SerializableJSONStateMachine.hpp → include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp

@@ -3,16 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
 #ifndef LS_STD_SERIALIZABLE_JSON_STATE_MACHINE_HPP
 #define LS_STD_SERIALIZABLE_JSON_STATE_MACHINE_HPP
 
-#include "../../../base/Class.hpp"
-#include "../../ISerializable.hpp"
-#include "../../../logic/StateMachine.hpp"
+#include "../../base/Class.hpp"
+#include "../ISerializable.hpp"
+#include "../../logic/StateMachine.hpp"
 #include <memory>
 #include <json.hpp>
 

+ 1 - 1
source/ls_std/time/Date.hpp → include/ls_std/time/Date.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/utils/RegexUtils.hpp → include/ls_std/utils/RegexUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

+ 1 - 1
source/ls_std/utils/STLUtils.hpp → include/ls_std/utils/STLUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 17 - 0
source/ls_std/io/StandardOutputWriter.cpp

@@ -0,0 +1,17 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-06
+ * Changed:         2020-11-06
+ *
+ * */
+
+#include <iostream>
+#include "../../../include/ls_std/io/StandardOutputWriter.hpp"
+
+bool ls_std::StandardOutputWriter::write(const ls_std::byte_field &_data)
+{
+  std::cout << _data;
+  return !_data.empty();
+}

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

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

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

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

+ 12 - 24
source/ls_std/io/logging/Logger.cpp

@@ -3,25 +3,24 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "Logger.hpp"
-#include "../../time/Date.hpp"
-#include "../NewLine.hpp"
-#include "../../boxing/String.hpp"
+#include "../../../../include/ls_std/io/logging/Logger.hpp"
+#include "../../../../include/ls_std/time/Date.hpp"
+#include "../../../../include/ls_std/io/NewLine.hpp"
+#include "../../../../include/ls_std/boxing/String.hpp"
+#include "../../../../include/ls_std/exception/NullPointerException.hpp"
 
-ls_std::Logger::Logger(const std::string &_path) : Class("Logger"),
-file(ls_std::File{_path}),
+ls_std::Logger::Logger(const std::shared_ptr<ls_std::IWriter> &_writer) : Class("Logger"),
 logLevel(ls_std::LogLevelValue::INFO)
 {
-  this->_init();
-}
+  if(_writer == nullptr) {
+    throw ls_std::NullPointerException {};
+  }
 
-void ls_std::Logger::close()
-{
-  this->outputStream->close();
+  this->writer = _writer;
 }
 
 void ls_std::Logger::debug(const ls_std::byte *_data)
@@ -76,19 +75,8 @@ void ls_std::Logger::warn(const ls_std::byte *_data)
   }
 }
 
-void ls_std::Logger::_init()
-{
-  if(!this->file.exists()) {
-    this->file.createNewFile();
-  }
-}
-
 void ls_std::Logger::_log(const ls_std::byte *_data, const ls_std::LogLevel& _logLevel)
 {
-  if(this->outputStream == nullptr) {
-    this->outputStream = std::make_shared<ls_std::FileOutputStream>(this->file, true);
-  }
-
   ls_std::Date date {};
 
   std::string message = "[" +
@@ -97,5 +85,5 @@ void ls_std::Logger::_log(const ls_std::byte *_data, const ls_std::LogLevel& _lo
       std::string(_data) +
       ls_std::NewLine::getUnixNewLine();
 
-  outputStream->write(message);
+  this->writer->write(message);
 }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONBoolean.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONBoolean.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp"
 
 ls_std::SerializableJSONBoolean::SerializableJSONBoolean(std::shared_ptr<ls_std::Boolean> _value) :
 Class("SerializableJSONBoolean"),

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONDouble.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONDouble.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONDouble.hpp"
 
 ls_std::SerializableJSONDouble::SerializableJSONDouble(std::shared_ptr<ls_std::Double> _value) :
 Class("SerializableJSONDouble"),

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONFloat.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONFloat.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONFloat.hpp"
 
 ls_std::SerializableJSONFloat::SerializableJSONFloat(std::shared_ptr<ls_std::Float> _value) :
 Class("SerializableJSONFloat"),

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONInteger.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONInteger.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONInteger.hpp"
 
 ls_std::SerializableJSONInteger::SerializableJSONInteger(std::shared_ptr<ls_std::Integer> _value) :
 Class("SerializableJSONInteger"),

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONLong.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONLong.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONLong.hpp"
 
 ls_std::SerializableJSONLong::SerializableJSONLong(std::shared_ptr<ls_std::Long> _value) :
 Class("SerializableJSONLong"),

+ 2 - 2
source/ls_std/serialization/json/boxing/SerializableJSONString.cpp

@@ -3,11 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONString.hpp"
+#include "../../../../../include/ls_std/serialization/boxing/SerializableJSONString.hpp"
 
 ls_std::SerializableJSONString::SerializableJSONString(std::shared_ptr<ls_std::String> _value) :
 Class("SerializableJSONString"),

+ 3 - 3
source/ls_std/serialization/json/logic/SerializableJSONState.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONState.hpp"
-#include "SerializableJSONStateConnection.hpp"
+#include "../../../../../include/ls_std/serialization/logic/SerializableJSONState.hpp"
+#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp"
 
 ls_std::SerializableJSONState::SerializableJSONState(std::shared_ptr<State> _value) :
 Class("SerializableJSONState"),

+ 2 - 4
source/ls_std/serialization/json/logic/SerializableJSONStateConnection.cpp

@@ -3,13 +3,11 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONStateConnection.hpp"
-
-#include <utility>
+#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp"
 
 ls_std::SerializableJSONStateConnection::SerializableJSONStateConnection(std::shared_ptr<ls_std::StateConnection> _value) :
 Class("SerializableJSONStateConnection"),

+ 3 - 3
source/ls_std/serialization/json/logic/SerializableJSONStateMachine.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
-#include "SerializableJSONStateMachine.hpp"
-#include "SerializableJSONState.hpp"
+#include "../../../../../include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp"
+#include "../../../../../include/ls_std/serialization/logic/SerializableJSONState.hpp"
 
 ls_std::SerializableJSONStateMachine::SerializableJSONStateMachine(std::shared_ptr<StateMachine> _value) :
 Class("SerializableJSONStateMachine"),

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

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

+ 41 - 29
test/cases/io/logging/LoggerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-10-29
+ * Changed:         2020-11-06
  *
  * */
 
@@ -20,13 +20,26 @@ namespace {
 
       void SetUp() override {}
       void TearDown() override {}
+
+      static std::shared_ptr<ls_std::IWriter> createFileLogger(const std::string& _logName) {
+        std::string path = TestHelper::getResourcesFolderLocation() + _logName;
+        ls_std::File file {path};
+
+        if(!file.exists()) {
+          file.createNewFile();
+        }
+
+        std::shared_ptr<ls_std::IWriter> writer = std::dynamic_pointer_cast<ls_std::IWriter>(std::make_shared<ls_std::FileOutputStream>(file));
+
+        return writer;
+      }
   };
 
   TEST_F(LoggerTest, debug)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_debug.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_debug.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::DEBUG);
     logger.debug("1. line!");
     logger.info("2. line!");
@@ -35,11 +48,12 @@ namespace {
     logger.warn("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
 
-    ls_std::File file {path};
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_debug.log"};
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};
+    file.remove();
 
     ASSERT_TRUE(content.contains("1. line!"));
     ASSERT_TRUE(content.contains("2. line!"));
@@ -47,15 +61,13 @@ namespace {
     ASSERT_TRUE(content.contains("4. line!"));
     ASSERT_TRUE(content.contains("5. line!"));
     ASSERT_FALSE(content.contains("6. line!"));
-
-    file.remove();
   }
 
   TEST_F(LoggerTest, error)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_error.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_error.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::ERR);
     logger.debug("1. line!");
     logger.info("2. line!");
@@ -64,9 +76,9 @@ namespace {
     logger.warn("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
 
-    ls_std::File file {path};
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_error.log"};
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};
 
@@ -82,9 +94,9 @@ namespace {
 
   TEST_F(LoggerTest, fatal)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_fatal.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_fatal.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::FATAL);
     logger.debug("1. line!");
     logger.info("2. line!");
@@ -93,8 +105,8 @@ namespace {
     logger.warn("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
-    ls_std::File file {path};
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_fatal.log"};
 
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};
@@ -111,15 +123,15 @@ namespace {
 
   TEST_F(LoggerTest, getLogLevel)
   {
-    ls_std::Logger logger {TestHelper::getResourcesFolderLocation() + "output.log"};
+    ls_std::Logger logger {createFileLogger("output.log")};
     ASSERT_EQ(ls_std::LogLevelValue::INFO, logger.getLogLevel());
   }
 
   TEST_F(LoggerTest, info)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_info.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_info.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::INFO);
     logger.fatal("1. line!");
     logger.error("2. line!");
@@ -128,8 +140,8 @@ namespace {
     logger.debug("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
-    ls_std::File file {path};
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_info.log"};
 
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};
@@ -146,7 +158,7 @@ namespace {
 
   TEST_F(LoggerTest, setLogLevel)
   {
-    ls_std::Logger logger {TestHelper::getResourcesFolderLocation() + "output.log"};
+    ls_std::Logger logger {createFileLogger("output.log")};
     logger.setLogLevel(ls_std::LogLevelValue::ERR);
 
     ASSERT_EQ(ls_std::LogLevelValue::ERR, logger.getLogLevel());
@@ -154,9 +166,9 @@ namespace {
 
   TEST_F(LoggerTest, trace)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_trace.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_trace.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::TRACE);
     logger.fatal("1. line!");
     logger.error("2. line!");
@@ -165,8 +177,8 @@ namespace {
     logger.debug("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
-    ls_std::File file {path};
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_trace.log"};
 
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};
@@ -183,9 +195,9 @@ namespace {
 
   TEST_F(LoggerTest, warn)
   {
-    std::string path = TestHelper::getResourcesFolderLocation() + "output_warn.log";
+    std::shared_ptr<ls_std::IWriter> writer = createFileLogger("output_warn.log");
 
-    ls_std::Logger logger {path};
+    ls_std::Logger logger {writer};
     logger.setLogLevel(ls_std::LogLevelValue::WARN);
     logger.fatal("1. line!");
     logger.error("2. line!");
@@ -194,8 +206,8 @@ namespace {
     logger.debug("5. line!");
     logger.trace("6. line!");
 
-    logger.close();
-    ls_std::File file {path};
+    std::dynamic_pointer_cast<ls_std::FileOutputStream>(writer)->close();
+    ls_std::File file {TestHelper::getResourcesFolderLocation() + "output_warn.log"};
 
     ls_std::FileReader reader {file};
     ls_std::String content {reader.read()};