Parcourir la source

Merge branch 'rc-2023-2-1' of public/ls-standard-library into main

patrick-christopher.mattulat il y a 1 an
Parent
commit
3bd0559603
100 fichiers modifiés avec 635 ajouts et 531 suppressions
  1. 9 1
      CMakeLists.txt
  2. 1 1
      LICENSE.MIT
  3. 4 15
      README.md
  4. 3 2
      include/ls-std/boxing/Boolean.hpp
  5. 3 2
      include/ls-std/boxing/Double.hpp
  6. 4 2
      include/ls-std/boxing/Float.hpp
  7. 4 9
      include/ls-std/boxing/Integer.hpp
  8. 4 9
      include/ls-std/boxing/Long.hpp
  9. 21 20
      include/ls-std/boxing/String.hpp
  10. 2 2
      include/ls-std/core/Class.hpp
  11. 3 2
      include/ls-std/core/Version.hpp
  12. 2 3
      include/ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp
  13. 1 3
      include/ls-std/core/evaluator/NullPointerEvaluator.hpp
  14. 53 0
      include/ls-std/core/evaluator/RawNullPointerArgumentEvaluator.hpp
  15. 53 0
      include/ls-std/core/evaluator/RawNullPointerEvaluator.hpp
  16. 2 2
      include/ls-std/core/exception/EventNotHandledException.hpp
  17. 2 2
      include/ls-std/core/exception/EventNotSubscribedException.hpp
  18. 8 5
      include/ls-std/core/exception/Exception.hpp
  19. 2 2
      include/ls-std/core/exception/FileNotFoundException.hpp
  20. 2 2
      include/ls-std/core/exception/FileOperationException.hpp
  21. 2 2
      include/ls-std/core/exception/IllegalArgumentException.hpp
  22. 2 2
      include/ls-std/core/exception/IllegalArithmeticOperationException.hpp
  23. 2 2
      include/ls-std/core/exception/IncompleteJsonException.hpp
  24. 2 2
      include/ls-std/core/exception/IndexOutOfBoundsException.hpp
  25. 2 2
      include/ls-std/core/exception/NotImplementedException.hpp
  26. 2 2
      include/ls-std/core/exception/NullPointerException.hpp
  27. 2 2
      include/ls-std/core/interface/IBoxing.hpp
  28. 2 2
      include/ls-std/core/jni/JniClass.hpp
  29. 2 2
      include/ls-std/core/jni/JniClassParameter.hpp
  30. 6 5
      include/ls-std/core/jni/JniMethod.hpp
  31. 3 2
      include/ls-std/core/type/EventTypes.hpp
  32. 35 0
      include/ls-std/core/type/RawPointer.hpp
  33. 2 2
      include/ls-std/core/type/Types.hpp
  34. 8 7
      include/ls-std/encoding/Base64.hpp
  35. 3 3
      include/ls-std/event/Event.hpp
  36. 2 2
      include/ls-std/event/EventHandler.hpp
  37. 3 3
      include/ls-std/event/EventManager.hpp
  38. 3 3
      include/ls-std/event/Narrator.hpp
  39. 2 2
      include/ls-std/event/serialization/SerializableJsonEvent.hpp
  40. 22 22
      include/ls-std/io/File.hpp
  41. 3 3
      include/ls-std/io/FileOutputStream.hpp
  42. 3 3
      include/ls-std/io/FileReader.hpp
  43. 3 3
      include/ls-std/io/FileWriter.hpp
  44. 2 2
      include/ls-std/io/StorableFile.hpp
  45. 11 10
      include/ls-std/io/logging/LogLevel.hpp
  46. 2 2
      include/ls-std/io/logging/LogLevelValue.hpp
  47. 12 11
      include/ls-std/io/logging/Logger.hpp
  48. 2 2
      include/ls-std/io/section-pair/SectionPairRowEnumType.hpp
  49. 9 8
      include/ls-std/io/section-pair/model/SectionPairDocument.hpp
  50. 7 6
      include/ls-std/io/section-pair/model/SectionPairRow.hpp
  51. 4 4
      include/ls-std/io/section-pair/model/SectionPairRowListValue.hpp
  52. 2 2
      include/ls-std/io/section-pair/model/SectionPairRowSingleValue.hpp
  53. 8 2
      include/ls-std/io/section-pair/model/SectionPairRowValue.hpp
  54. 9 8
      include/ls-std/io/section-pair/model/SectionPairSection.hpp
  55. 3 3
      include/ls-std/io/section-pair/reader/SectionPairFileReader.hpp
  56. 7 6
      include/ls-std/io/section-pair/reader/SectionPairFileReaderParameter.hpp
  57. 7 6
      include/ls-std/io/section-pair/serialization/SerializableSectionPairDocument.hpp
  58. 4 3
      include/ls-std/io/section-pair/serialization/SerializableSectionPairParameter.hpp
  59. 5 5
      include/ls-std/io/section-pair/serialization/SerializableSectionPairRow.hpp
  60. 5 4
      include/ls-std/io/section-pair/serialization/SerializableSectionPairRowListValue.hpp
  61. 2 2
      include/ls-std/io/section-pair/serialization/SerializableSectionPairRowSingleValue.hpp
  62. 15 14
      include/ls-std/io/section-pair/serialization/SerializableSectionPairSection.hpp
  63. 4 4
      include/ls-std/io/xml/XmlAttribute.hpp
  64. 6 6
      include/ls-std/io/xml/XmlDeclaration.hpp
  65. 4 4
      include/ls-std/io/xml/XmlDocument.hpp
  66. 9 9
      include/ls-std/io/xml/XmlNode.hpp
  67. 2 2
      include/ls-std/io/xml/XmlParseMode.hpp
  68. 2 2
      include/ls-std/io/xml/XmlParseParameter.hpp
  69. 15 13
      include/ls-std/io/xml/XmlParser.hpp
  70. 4 4
      include/ls-std/io/xml/XmlReader.hpp
  71. 4 1
      include/ls-std/ls-std-core.hpp
  72. 9 9
      include/ls-std/time/Date.hpp
  73. 4 2
      include/ls-std/time/system-time/SystemTime.hpp
  74. 2 2
      include/ls-std/time/system-time/SystemTimeParameter.hpp
  75. 17 12
      source/ls-std/boxing/Boolean.cpp
  76. 11 5
      source/ls-std/boxing/Double.cpp
  77. 11 7
      source/ls-std/boxing/Float.cpp
  78. 11 37
      source/ls-std/boxing/Integer.cpp
  79. 11 37
      source/ls-std/boxing/Long.cpp
  80. 22 21
      source/ls-std/boxing/String.cpp
  81. 2 2
      source/ls-std/core/Class.cpp
  82. 2 2
      source/ls-std/core/LibraryVersion.cpp
  83. 3 2
      source/ls-std/core/Version.cpp
  84. 2 2
      source/ls-std/core/evaluator/IndexOutOfBoundsEvaluator.cpp
  85. 1 18
      source/ls-std/core/evaluator/NullPointerArgumentEvaluator.cpp
  86. 1 18
      source/ls-std/core/evaluator/NullPointerEvaluator.cpp
  87. 3 3
      source/ls-std/core/exception/EventNotHandledException.cpp
  88. 3 3
      source/ls-std/core/exception/EventNotSubscribedException.cpp
  89. 7 1
      source/ls-std/core/exception/Exception.cpp
  90. 8 2
      source/ls-std/core/exception/ExceptionMessage.cpp
  91. 3 3
      source/ls-std/core/exception/FileNotFoundException.cpp
  92. 3 3
      source/ls-std/core/exception/FileOperationException.cpp
  93. 3 3
      source/ls-std/core/exception/IllegalArgumentException.cpp
  94. 3 3
      source/ls-std/core/exception/IllegalArithmeticOperationException.cpp
  95. 3 3
      source/ls-std/core/exception/IncompleteJsonException.cpp
  96. 3 3
      source/ls-std/core/exception/IndexOutOfBoundsException.cpp
  97. 3 3
      source/ls-std/core/exception/NotImplementedException.cpp
  98. 3 3
      source/ls-std/core/exception/NullPointerException.cpp
  99. 6 6
      source/ls-std/core/jni/JniApi.cpp
  100. 10 9
      source/ls-std/core/jni/JniClass.cpp

+ 9 - 1
CMakeLists.txt

@@ -11,7 +11,7 @@
 ##########################################################
 
 cmake_minimum_required(VERSION 3.17)
-project(ls-std VERSION 2023.2.0)
+project(ls-std VERSION 2023.2.1)
 
 set(MODULE_NAME_BOXING ls-std-boxing)
 set(MODULE_NAME_CORE ls-std-core)
@@ -309,6 +309,8 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/evaluator/IndexOutOfBoundsEvaluatorTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/evaluator/NullPointerArgumentEvaluatorTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/evaluator/NullPointerEvaluatorTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/evaluator/RawNullPointerArgumentEvaluatorTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/evaluator/RawNullPointerEvaluatorTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/EventNotHandledExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/EventNotSubscribedExceptionTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/exception/ExceptionMessageTest.cpp
@@ -475,6 +477,7 @@ endif ()
 if (${LS_STD_BUILD_WITH_TESTS})
     message("${MODULE_NAME_IO}: Building unit tests...")
     add_executable(${MODULE_NAME_IO}-unit-test
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
             ${UNIT_TEST_FILES_IO})
 endif ()
@@ -496,6 +499,7 @@ if (${LS_STD_BUILD_WITH_TESTS})
     if (${LS_STD_BUILD_WITH_JNI})
         message("${PROJECT_NAME}: Building unit tests with JNI support...")
         add_executable(${PROJECT_NAME}-unit-test
+                ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
                 ${UNIT_TEST_FILES_BOXING}
                 ${UNIT_TEST_FILES_CORE}
@@ -508,6 +512,7 @@ if (${LS_STD_BUILD_WITH_TESTS})
     else ()
         message("${PROJECT_NAME}: Building unit tests...")
         add_executable(${PROJECT_NAME}-unit-test
+                ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
                 ${UNIT_TEST_FILES_BOXING}
                 ${UNIT_TEST_FILES_CORE}
@@ -547,6 +552,7 @@ endif ()
 if (${LS_STD_BUILD_WITH_TESTS})
     message("${MODULE_NAME_IO}: Building integration tests...")
     add_executable(${MODULE_NAME_IO}-integration-test
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
             ${INTEGRATION_TEST_FILES_IO})
 endif ()
@@ -563,6 +569,7 @@ if (${LS_STD_BUILD_WITH_TESTS})
     if (${LS_STD_BUILD_WITH_JNI})
         message("${PROJECT_NAME}: Building all tests...")
         add_executable(${PROJECT_NAME}-test
+                ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
                 ${UNIT_TEST_FILES_BOXING}
                 ${UNIT_TEST_FILES_CORE}
@@ -576,6 +583,7 @@ if (${LS_STD_BUILD_WITH_TESTS})
     else ()
         message("${PROJECT_NAME}: Building all tests with JNI support...")
         add_executable(${PROJECT_NAME}-test
+                ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestException.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/TestHelper.cpp
                 ${UNIT_TEST_FILES_BOXING}
                 ${UNIT_TEST_FILES_CORE}

+ 1 - 1
LICENSE.MIT

@@ -1,4 +1,4 @@
-Copyright (c) 2020 Patrick-Christopher Mattulat (webmaster@lynarstudios.com)
+Copyright (c) 2020-2023 Patrick-Christopher Mattulat (webmaster@lynarstudios.com)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 documentation files (the "Software"), to deal in the Software without restriction, including without limitation the

+ 4 - 15
README.md

@@ -1,4 +1,4 @@
-# Lynar Studios - Standard Library 2023.2.0 #
+# Lynar Studios - Standard Library 2023.2.1 #
 
 This is a cross-platform standard library written in C++ offering functionalities you would usually miss in C++'s standard template library (STL), especially if you would search for cross-platform implementations.  
 This library has been tested on __Windows__, __Linux__ and __MacOS__ systems.
@@ -34,26 +34,15 @@ A __Date__ class comes with this submodule, which you can use to represent a dat
 
 #### Features ####
 
-- added NotImplementedException class, which can be thrown in case a method is provided, but not implemented
-- a JNI class is now available, wrapping C-like JNI functionalities, which can be found in __ls-std-core__ module - in
-  order to use this feature the CMake option __LS_STD_BUILD_WITH_JNI__ has to be enabled - please note, that this
-  feature is experimental and incomplete
-- a SystemTime class has been added to the library's time module for setting the local system time
-- Logger class is now configurable to silent log level or timestamp output
+- Section Pair values now support backslash characters, which are common on Windows to describe a file path
 
 #### Improvements ####
 
-- made test constructors public and reduced test setup overhead
-- added missing __nodiscard__ attributes to test package
-- made __Exception__ base class abstract, which prevents it from being instantiated
-- __NullPointerEvaluator__ & __NullPointerArgumentEvaluator__ now except raw pointers
-- Section-Pair identifiers can now have a length of 64 characters
-- Section-Pair values can now have a length of 512 characters
-- exceptions for creation of files or directories have been improved and now show the absolute file path
+- solved more than 400 SonarLint findings, which were mostly on critical level
 
 #### Fixes ####
 
-- no comment
+- none
 
 ---
 ### Documentation ###

+ 3 - 2
include/ls-std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -56,7 +56,7 @@ namespace ls::std::boxing
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
@@ -74,6 +74,7 @@ namespace ls::std::boxing
       const ::std::string FALSE_STRING = "false";
       const ::std::string TRUE_STRING = "true";
 
+      [[nodiscard]] static ::std::string _fetchClassName();
       [[nodiscard]] ::std::string _toString() const;
   };
 }

+ 3 - 2
include/ls-std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -74,7 +74,7 @@ namespace ls::std::boxing
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
@@ -89,6 +89,7 @@ namespace ls::std::boxing
       double value{};
 
       void _assignEpsilon(double _epsilon);
+      [[nodiscard]] static ::std::string _fetchClassName();
   };
 }
 

+ 4 - 2
include/ls-std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -14,6 +14,7 @@
 #include <ls-std/core/interface/IBoxing.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
+#include <string>
 
 namespace ls::std::boxing
 {
@@ -74,7 +75,7 @@ namespace ls::std::boxing
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
@@ -89,6 +90,7 @@ namespace ls::std::boxing
       float value{};
 
       void _assignEpsilon(float _epsilon);
+      [[nodiscard]] static ::std::string _fetchClassName();
   };
 }
 

+ 4 - 9
include/ls-std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -76,13 +76,6 @@ namespace ls::std::boxing
         return !_integer.value;
       }
 
-      bool operator&&(const ls::std::boxing::Integer &_integer) const;
-      bool operator&&(int _value) const;
-      bool operator&&(bool _expression) const;
-      bool operator||(const ls::std::boxing::Integer &_integer) const;
-      bool operator||(int _value) const;
-      bool operator||(bool _expression) const;
-
       // increment / decrement operator
 
       void operator++();
@@ -90,7 +83,7 @@ namespace ls::std::boxing
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
@@ -100,6 +93,8 @@ namespace ls::std::boxing
     private:
 
       int value{};
+
+      [[nodiscard]] static ::std::string _fetchClassName();
   };
 }
 

+ 4 - 9
include/ls-std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -77,13 +77,6 @@ namespace ls::std::boxing
         return !_long.value;
       }
 
-      bool operator&&(const ls::std::boxing::Long &_long) const;
-      bool operator&&(ls::std::core::type::long_type _value) const;
-      bool operator&&(bool _expression) const;
-      bool operator||(const ls::std::boxing::Long &_long) const;
-      bool operator||(ls::std::core::type::long_type _value) const;
-      bool operator||(bool _expression) const;
-
       // increment / decrement operator
 
       void operator++();
@@ -91,7 +84,7 @@ namespace ls::std::boxing
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
@@ -101,6 +94,8 @@ namespace ls::std::boxing
     private:
 
       ls::std::core::type::long_type value{};
+
+      [[nodiscard]] static ::std::string _fetchClassName();
   };
 }
 

+ 21 - 20
include/ls-std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -16,6 +16,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
+#include <string_view>
 #include <vector>
 
 namespace ls::std::boxing
@@ -37,7 +38,7 @@ namespace ls::std::boxing
       ::std::string operator+(ls::std::boxing::String _string) const;
       ::std::string operator+(const ::std::string &_string) const;
       ::std::string operator+(const char *_string) const;
-      ::std::string operator-(int _number);
+      ::std::string operator-(int _number) const;
 
       // compound operators
 
@@ -46,38 +47,38 @@ namespace ls::std::boxing
 
       // comparison operators
 
-      bool operator==(ls::std::boxing::String _string);
-      bool operator==(const ::std::string &_value);
-      bool operator==(const char *_value);
-      bool operator!=(ls::std::boxing::String _string);
-      bool operator!=(const ::std::string &_value);
-      bool operator!=(const char *_value);
+      bool operator==(ls::std::boxing::String _string) const;
+      bool operator==(::std::string_view _value) const;
+      bool operator==(const char *_value) const;
+      bool operator!=(ls::std::boxing::String _string) const;
+      bool operator!=(::std::string_view _value) const;
+      bool operator!=(const char *_value) const;
 
       // implementation
 
-      void parse(::std::string _parseText) override;
+      void parse(const ::std::string &_parseText) override;
       [[nodiscard]] ::std::string toString() override;
 
       // additional functionality
 
-      [[nodiscard]] bool contains(const ::std::string &_text);
-      [[nodiscard]] bool endsWith(const ::std::string &_text);
-      [[nodiscard]] bool equalsIgnoreCase(ls::std::boxing::String _string);
-      [[nodiscard]] bool equalsIgnoreCase(::std::string _text);
+      [[nodiscard]] bool contains(::std::string_view _text) const;
+      [[nodiscard]] bool endsWith(::std::string_view _text) const;
+      [[nodiscard]] bool equalsIgnoreCase(const ls::std::boxing::String &_string) const;
+      [[nodiscard]] bool equalsIgnoreCase(::std::string _text) const;
       [[nodiscard]] ::std::vector<ls::std::core::type::byte_type> getByteData();
-      [[nodiscard]] ::std::string padLeft(size_t _width, char _fillCharacter);
-      [[nodiscard]] ::std::string padRight(size_t _width, char _fillCharacter);
-      [[nodiscard]] ::std::string reverse();
-      [[nodiscard]] bool startsWith(const ::std::string &_text);
-      [[nodiscard]] ::std::string toLowerCase();
-      [[nodiscard]] ::std::string toUpperCase();
+      [[nodiscard]] ::std::string padLeft(size_t _width, char _fillCharacter) const;
+      [[nodiscard]] ::std::string padRight(size_t _width, char _fillCharacter) const;
+      [[nodiscard]] ::std::string reverse() const;
+      [[nodiscard]] bool startsWith(::std::string_view _text) const;
+      [[nodiscard]] ::std::string toLowerCase() const;
+      [[nodiscard]] ::std::string toUpperCase() const;
 
     private:
 
       ::std::string value{};
 
       [[nodiscard]] static ::std::string _buildCharacterChain(size_t _amount, char _fillCharacter);
-      [[nodiscard]] static ::std::string _createFillContent(const ::std::string &_text, size_t _width, char _fillCharacter);
+      [[nodiscard]] static ::std::string _createFillContent(::std::string_view _text, size_t _width, char _fillCharacter);
   };
 }
 

+ 2 - 2
include/ls-std/core/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-06
+ * Changed:         2023-05-15
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls::std::core
       explicit Class(const ::std::string &_name);
       virtual ~Class();
 
-      [[nodiscard]] ::std::string getClassName();
+      [[nodiscard]] ::std::string getClassName() const;
 
     private:
 

+ 3 - 2
include/ls-std/core/Version.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -14,6 +14,7 @@
 #include <ls-std/core/interface/ISerializable.hpp>
 #include <ls-std/core/type/Types.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 
 namespace ls::std::core
 {
@@ -45,7 +46,7 @@ namespace ls::std::core
       ls::std::core::type::version_type minorVersion{};
       ls::std::core::type::version_type patchVersion{};
 
-      [[nodiscard]] static bool _isValid(const ::std::string &_versionString);
+      [[nodiscard]] static bool _isValid(::std::string_view _versionString);
   };
 }
 

+ 2 - 3
include/ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-04-07
+* Changed:         2023-05-23
 *
 * */
 
@@ -11,6 +11,7 @@
 #define LS_STD_NULL_POINTER_ARGUMENT_EVALUATOR_HPP
 
 #include <ls-std/core/interface/IEvaluator.hpp>
+#include <ls-std/core/type/RawPointer.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
@@ -21,8 +22,6 @@ namespace ls::std::core
   {
     public:
 
-      explicit NullPointerArgumentEvaluator(const void *_rawArgument);
-      explicit NullPointerArgumentEvaluator(const void *_rawArgument, ::std::string _message);
       explicit NullPointerArgumentEvaluator(const ::std::shared_ptr<void> &_argument);
       explicit NullPointerArgumentEvaluator(const ::std::shared_ptr<void> &_argument, ::std::string _message);
       ~NullPointerArgumentEvaluator() noexcept override;

+ 1 - 3
include/ls-std/core/evaluator/NullPointerEvaluator.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-04-04
+* Changed:         2023-05-24
 *
 * */
 
@@ -21,8 +21,6 @@ namespace ls::std::core
   {
     public:
 
-      explicit NullPointerEvaluator(const void *_rawArgument);
-      explicit NullPointerEvaluator(const void *_rawArgument, ::std::string _message);
       explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument);
       explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument, ::std::string _message);
       ~NullPointerEvaluator() noexcept override;

+ 53 - 0
include/ls-std/core/evaluator/RawNullPointerArgumentEvaluator.hpp

@@ -0,0 +1,53 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-05-23
+* Changed:         2023-05-24
+*
+* */
+
+#ifndef LS_STD_RAW_NULL_POINTER_ARGUMENT_EVALUATOR_HPP
+#define LS_STD_RAW_NULL_POINTER_ARGUMENT_EVALUATOR_HPP
+
+#include <ls-std/core/exception/IllegalArgumentException.hpp>
+#include <ls-std/core/interface/IEvaluator.hpp>
+#include <ls-std/core/type/RawPointer.hpp>
+#include <string>
+
+namespace ls::std::core
+{
+  template<typename T>
+  class RawNullPointerArgumentEvaluator : public ls::std::core::interface_type::IEvaluator
+  {
+    public:
+
+      explicit RawNullPointerArgumentEvaluator(const ls::std::core::type::RawPointer<T> &_argument) : argument(_argument)
+      {}
+      explicit RawNullPointerArgumentEvaluator(const ls::std::core::type::RawPointer<T> &_argument, const ::std::string &_message) : argument(_argument), message(_message)
+      {}
+      ~RawNullPointerArgumentEvaluator() noexcept override = default;
+
+      void evaluate() override
+      {
+        if (this->argument.get() == nullptr)
+        {
+          if (this->message.empty())
+          {
+            throw ls::std::core::IllegalArgumentException{"passed argument is null!"};
+          }
+          else
+          {
+            throw ls::std::core::IllegalArgumentException{this->message};
+          }
+        }
+      }
+
+    private:
+
+      ls::std::core::type::RawPointer<T> argument{};
+      ::std::string message{};
+  };
+}
+
+#endif

+ 53 - 0
include/ls-std/core/evaluator/RawNullPointerEvaluator.hpp

@@ -0,0 +1,53 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-05-24
+* Changed:         2023-05-24
+*
+* */
+
+#ifndef LS_STD_RAW_NULL_POINTER_EVALUATOR_HPP
+#define LS_STD_RAW_NULL_POINTER_EVALUATOR_HPP
+
+#include <ls-std/core/exception/NullPointerException.hpp>
+#include <ls-std/core/interface/IEvaluator.hpp>
+#include <ls-std/core/type/RawPointer.hpp>
+#include <string>
+
+namespace ls::std::core
+{
+  template<typename T>
+  class RawNullPointerEvaluator : public ls::std::core::interface_type::IEvaluator
+  {
+    public:
+
+      explicit RawNullPointerEvaluator(const ls::std::core::type::RawPointer<T> &_argument) : argument(_argument)
+      {}
+      RawNullPointerEvaluator(const ls::std::core::type::RawPointer<T> &_argument, const ::std::string &_message) : argument(_argument), message(_message)
+      {}
+      ~RawNullPointerEvaluator() noexcept override = default;
+
+      void evaluate() override
+      {
+        if (this->argument.get() == nullptr)
+        {
+          if (this->message.empty())
+          {
+            throw ls::std::core::NullPointerException{"reference in use is null!"};
+          }
+          else
+          {
+            throw ls::std::core::NullPointerException{this->message};
+          }
+        }
+      }
+
+    private:
+
+      ls::std::core::type::RawPointer<T> argument{};
+      ::std::string message{};
+  };
+}
+
+#endif

+ 2 - 2
include/ls-std/core/exception/EventNotHandledException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       EventNotHandledException();
-      explicit EventNotHandledException(::std::string _message);
+      explicit EventNotHandledException(const ::std::string &_message);
       ~EventNotHandledException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/EventNotSubscribedException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       EventNotSubscribedException();
-      explicit EventNotSubscribedException(::std::string _message);
+      explicit EventNotSubscribedException(const ::std::string &_message);
       ~EventNotSubscribedException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 8 - 5
include/ls-std/core/exception/Exception.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-22
-* Changed:         2023-03-28
+* Changed:         2023-05-19
 *
 * */
 
@@ -13,6 +13,7 @@
 #include <exception>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
+#include <string_view>
 
 namespace ls::std::core
 {
@@ -21,17 +22,19 @@ namespace ls::std::core
     public:
 
       explicit Exception(::std::string _name);
-      ~Exception() noexcept override;
+      ~Exception() noexcept override = 0;
 
       [[nodiscard]] ::std::string getName() const;
-      [[nodiscard]] const char *what() const noexcept override = 0;
 
     protected:
 
+      [[nodiscard]] const char *_getIdentifiedMessage(const ::std::string &_defaultMessage) const;
+      void _setMessage(::std::string_view _message);
+
+    private:
+
       ::std::string message{};
       ::std::string name{};
-
-      [[nodiscard]] const char *_getIdentifiedMessage(const ::std::string &_defaultMessage) const;
   };
 }
 

+ 2 - 2
include/ls-std/core/exception/FileNotFoundException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       FileNotFoundException();
-      explicit FileNotFoundException(::std::string _message);
+      explicit FileNotFoundException(const ::std::string &_message);
       ~FileNotFoundException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/FileOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       FileOperationException();
-      explicit FileOperationException(::std::string _message);
+      explicit FileOperationException(const ::std::string &_message);
       ~FileOperationException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/IllegalArgumentException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       IllegalArgumentException();
-      explicit IllegalArgumentException(::std::string _message);
+      explicit IllegalArgumentException(const ::std::string &_message);
       ~IllegalArgumentException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/IllegalArithmeticOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       IllegalArithmeticOperationException();
-      explicit IllegalArithmeticOperationException(::std::string _message);
+      explicit IllegalArithmeticOperationException(const ::std::string &_message);
       ~IllegalArithmeticOperationException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/IncompleteJsonException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-04-30
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       IncompleteJsonException();
-      explicit IncompleteJsonException(::std::string _message);
+      explicit IncompleteJsonException(const ::std::string &_message);
       ~IncompleteJsonException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/IndexOutOfBoundsException.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-22
+* Changed:         2023-05-19
 *
 * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       IndexOutOfBoundsException();
-      explicit IndexOutOfBoundsException(::std::string _message);
+      explicit IndexOutOfBoundsException(const ::std::string &_message);
       ~IndexOutOfBoundsException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/NotImplementedException.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-27
-* Changed:         2023-03-27
+* Changed:         2023-05-19
 *
 * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       NotImplementedException();
-      explicit NotImplementedException(::std::string _message);
+      explicit NotImplementedException(const ::std::string &_message);
       ~NotImplementedException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/exception/NullPointerException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls::std::core
     public:
 
       NullPointerException();
-      explicit NullPointerException(::std::string _message);
+      explicit NullPointerException(const ::std::string &_message);
       ~NullPointerException() noexcept override;
 
       [[nodiscard]] const char *what() const noexcept override;

+ 2 - 2
include/ls-std/core/interface/IBoxing.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-05
+ * Changed:         2023-05-17
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls::std::core::interface_type
       IBoxing();
       virtual ~IBoxing();
 
-      virtual void parse(::std::string _parseText) = 0;
+      virtual void parse(const ::std::string &_parseText) = 0;
       virtual ::std::string toString() = 0;
   };
 }

+ 2 - 2
include/ls-std/core/jni/JniClass.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-07
-* Changed:         2023-04-11
+* Changed:         2023-05-16
 *
 * */
 
@@ -49,7 +49,7 @@ namespace ls::std::core::experimental
       void _callIntMethod(const ::std::string &_methodIdentifier, ls::std::core::experimental::JniReturnValue &_returnValue);
       void _callLongMethod(const ::std::string &_methodIdentifier, ls::std::core::experimental::JniReturnValue &_returnValue);
       void _callShortMethod(const ::std::string &_methodIdentifier, ls::std::core::experimental::JniReturnValue &_returnValue);
-      void _createJniApi();
+      void _createJniApi() const;
       [[nodiscard]] bool _hasMethod(const ::std::string &_methodIdentifier);
   };
 }

+ 2 - 2
include/ls-std/core/jni/JniClassParameter.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-07
-* Changed:         2023-04-10
+* Changed:         2023-05-16
 *
 * */
 
@@ -27,7 +27,7 @@ namespace ls::std::core::experimental
 
       [[nodiscard]] JNIEnv *getJavaEnvironment();
       [[nodiscard]] jobject getJavaObject();
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> getJniApi();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> getJniApi() const;
       void setJavaEnvironment(JNIEnv *_environment);
       void setJavaObject(jobject _javaObject);
       void setJniApi(const ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> &_jniApi);

+ 6 - 5
include/ls-std/core/jni/JniMethod.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-08
-* Changed:         2023-04-10
+* Changed:         2023-05-16
 *
 * */
 
@@ -13,6 +13,7 @@
 #include <jni.h>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
+#include <string_view>
 
 namespace ls::std::core::experimental
 {
@@ -24,11 +25,11 @@ namespace ls::std::core::experimental
       ~JniMethod();
 
       [[nodiscard]] jmethodID getMethodId();
-      [[nodiscard]] ::std::string getMethodIdentifier();
-      [[nodiscard]] ::std::string getMethodSignature();
+      [[nodiscard]] ::std::string getMethodIdentifier() const;
+      [[nodiscard]] ::std::string getMethodSignature() const;
       void setMethodId(jmethodID _methodId);
-      void setMethodIdentifier(const ::std::string &_methodIdentifier);
-      void setMethodSignature(const ::std::string &_methodSignature);
+      void setMethodIdentifier(::std::string_view _methodIdentifier);
+      void setMethodSignature(::std::string_view _methodSignature);
 
     private:
 

+ 3 - 2
include/ls-std/core/type/EventTypes.hpp

@@ -3,13 +3,14 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2023-02-08
+ * Changed:         2023-05-17
  *
  * */
 
 #ifndef LS_STD_EVENT_TYPES_HPP
 #define LS_STD_EVENT_TYPES_HPP
 
+#include <functional>
 #include <map>
 #include <string>
 #include <vector>
@@ -20,7 +21,7 @@ namespace ls::std::core::type
   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<ls::std::core::type::event_parameter_id, ls::std::core::type::event_parameter_value>;
+  using event_parameter_list = ::std::map<ls::std::core::type::event_parameter_id, ls::std::core::type::event_parameter_value, ::std::less<>>;
 }
 
 #endif

+ 35 - 0
include/ls-std/core/type/RawPointer.hpp

@@ -0,0 +1,35 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-05-23
+* Changed:         2023-05-23
+*
+* */
+
+#ifndef LS_STD_RAW_POINTER_HPP
+#define LS_STD_RAW_POINTER_HPP
+
+namespace ls::std::core::type
+{
+  template<typename T>
+  class RawPointer
+  {
+    public:
+
+      explicit RawPointer(T *_pointer) : pointer(_pointer)
+      {}
+      ~RawPointer() = default;
+
+      [[nodiscard]] T *get() const
+      {
+        return this->pointer;
+      }
+
+    private:
+
+      T *pointer{};
+  };
+}
+
+#endif

+ 2 - 2
include/ls-std/core/type/Types.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-23
+ * Changed:         2023-05-16
  *
  * */
 
@@ -18,7 +18,7 @@ namespace ls::std::core::type
   using byte_type = char;
   using byte_field = ::std::string;
   using long_type = long long int;
-  using version_type = uint16_t;
+  using version_type = int;
   using json = nlohmann::json;
 }
 

+ 8 - 7
include/ls-std/encoding/Base64.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-01-03
- * Changed:         2023-02-22
+ * Changed:         2023-05-15
  *
  * */
 
@@ -13,6 +13,7 @@
 #include <bitset>
 #include <ls-std/core/interface/IEncoding.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 #include <unordered_map>
 #include <vector>
 
@@ -33,17 +34,17 @@ namespace ls::std::encoding
     private:
 
       [[nodiscard]] static ::std::string _applyEndingRule(::std::string _encodedString, size_t _sequenceSize);
-      [[nodiscard]] static ::std::string _decodeByteQuadruple(const ::std::string &_quadruple);
-      [[nodiscard]] static ::std::string _encodeByteTriple(const ::std::string &_byteTriple);
+      [[nodiscard]] static ::std::string _decodeByteQuadruple(::std::string_view _quadruple);
+      [[nodiscard]] static ::std::string _encodeByteTriple(::std::string_view _byteTriple);
       [[nodiscard]] static uint32_t _extractBitSequence(uint32_t _bitMask, uint32_t _bitStorage);
       [[nodiscard]] static uint32_t _generateBitMask(uint32_t _maskValue, uint8_t _shiftValue);
       [[nodiscard]] static ::std::unordered_map<char, uint8_t> _getDecodingMap();
       [[nodiscard]] static ::std::unordered_map<uint8_t, char> _getEncodingMap();
-      [[nodiscard]] static ::std::string _getNextByteQuadruple(const ::std::string &_sequence, size_t _index);
-      [[nodiscard]] static ::std::string _getNextByteTriple(const ::std::string &_sequence, size_t _index);
+      [[nodiscard]] static ::std::string_view _getNextByteQuadruple(::std::string_view _sequence, size_t _index);
+      [[nodiscard]] static ::std::string_view _getNextByteTriple(::std::string_view _sequence, size_t _index);
       static void _mergeBitSequence(uint32_t &_bitStorage, const uint32_t &_bitMask);
-      [[nodiscard]] static uint32_t _toDecodingBitStorage(const ::std::string &_quadruple);
-      [[nodiscard]] static uint32_t _toEncodingBitStorage(const ::std::string &_triple);
+      [[nodiscard]] static uint32_t _toDecodingBitStorage(::std::string_view _quadruple);
+      [[nodiscard]] static uint32_t _toEncodingBitStorage(::std::string_view _triple);
   };
 }
 

+ 3 - 3
include/ls-std/event/Event.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -29,8 +29,8 @@ namespace ls::std::event
 
       bool addParameter(const ls::std::core::type::event_parameter &_eventParameter); // nodiscard is optional here
       void clearParameterList();
-      [[nodiscard]] ls::std::core::type::event_id getId();
-      [[nodiscard]] ls::std::core::type::event_parameter_list getParameterList();
+      [[nodiscard]] ls::std::core::type::event_id getId() const;
+      [[nodiscard]] ls::std::core::type::event_parameter_list getParameterList() const;
       bool removeParameter(const ls::std::core::type::event_parameter_id &_id); // nodiscard is optional here
       void setId(const ls::std::core::type::event_id &_id);
 

+ 2 - 2
include/ls-std/event/EventHandler.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -27,7 +27,7 @@ namespace ls::std::event
       explicit EventHandler(const ls::std::core::type::event_id &_id);
       ~EventHandler() noexcept override;
 
-      [[nodiscard]] ls::std::core::type::event_id getId();
+      [[nodiscard]] ls::std::core::type::event_id getId() const;
 
     private:
 

+ 3 - 3
include/ls-std/event/EventManager.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -35,13 +35,13 @@ namespace ls::std::event
       // additional functionality
 
       bool addEventHandler(const ::std::shared_ptr<ls::std::event::EventHandler> &_eventHandler); // nodiscard is optional here
-      void fire(ls::std::event::Event _event);
+      void fire(const ls::std::event::Event &_event);
       [[nodiscard]] bool hasEventHandler(const ls::std::core::type::event_id &_id);
       bool removeEventHandler(const ::std::shared_ptr<ls::std::event::EventHandler> &_eventHandler); // nodiscard is optional here
 
     private:
 
-      ::std::map<ls::std::core::type::event_id, ::std::shared_ptr<ls::std::event::EventHandler>> eventHandlers{};
+      ::std::map<ls::std::core::type::event_id, ::std::shared_ptr<ls::std::event::EventHandler>, ::std::less<>> eventHandlers{};
 
       [[nodiscard]] bool _hasEventHandler(const ls::std::core::type::event_id &_id);
       [[nodiscard]] bool _removeEventHandler(const ::std::shared_ptr<ls::std::event::EventHandler> &_eventHandler);

+ 3 - 3
include/ls-std/event/Narrator.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -27,9 +27,9 @@ namespace ls::std::event
 
       bool addListener(const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener); // nodiscard is optional here
       void clear();
-      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::core::interface_type::IListener>> getListeners();
+      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::core::interface_type::IListener>> getListeners() const;
       bool removeListener(const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener); // nodiscard is optional here
-      void tell(const ls::std::core::Class &_info);
+      void tell(const ls::std::core::Class &_info) const;
 
     private:
 

+ 2 - 2
include/ls-std/event/serialization/SerializableJsonEvent.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-07
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -33,7 +33,7 @@ namespace ls::std::event
 
       // additional functionality
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::event::Event> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::event::Event> getValue() const;
       void setValue(const ::std::shared_ptr<ls::std::event::Event> &_value);
 
     private:

+ 22 - 22
include/ls-std/io/File.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -34,29 +34,29 @@ namespace ls::std::io
 
       // comparison operators
 
-      bool operator==(ls::std::io::File &_file);
-      bool operator!=(ls::std::io::File &_file);
+      bool operator==(const ls::std::io::File &_file) const;
+      bool operator!=(const ls::std::io::File &_file) const;
 
       // additional functionality
 
-      [[nodiscard]] bool canExecute();
-      [[nodiscard]] bool canRead();
-      [[nodiscard]] bool canWrite();
-      void createNewFile();
-      [[nodiscard]] bool exists();
-      [[nodiscard]] ::std::string getAbsoluteFilePath();
-      [[nodiscard]] ::std::string getName();
-      [[nodiscard]] ::std::string getParent();
-      [[nodiscard]] long getSize();
+      [[nodiscard]] bool canExecute() const;
+      [[nodiscard]] bool canRead() const;
+      [[nodiscard]] bool canWrite() const;
+      void createNewFile() const;
+      [[nodiscard]] bool exists() const;
+      [[nodiscard]] ::std::string getAbsoluteFilePath() const;
+      [[nodiscard]] ::std::string getName() const;
+      [[nodiscard]] ::std::string getParent() const;
+      [[nodiscard]] long getSize() const;
       [[nodiscard]] static ::std::string getWorkingDirectory();
-      [[nodiscard]] bool isDirectory();
-      [[nodiscard]] bool isFile();
-      [[nodiscard]] time_t lastModified();
-      [[nodiscard]] ::std::list<::std::string> list();
-      [[nodiscard]] ::std::list<::std::string> listFiles();
-      void makeDirectory();
-      void makeDirectories();
-      void remove();
+      [[nodiscard]] bool isDirectory() const;
+      [[nodiscard]] bool isFile() const;
+      [[nodiscard]] time_t lastModified() const;
+      [[nodiscard]] ::std::list<::std::string> list() const;
+      [[nodiscard]] ::std::list<::std::string> listFiles() const;
+      void makeDirectory() const;
+      void makeDirectories() const;
+      void remove() const;
       bool renameTo(const ::std::string &_newName); // nodiscard is optional here
       void reset(const ::std::string &_newPath);
 
@@ -65,12 +65,12 @@ namespace ls::std::io
       ::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, const 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);
 #endif
-      [[nodiscard]] static bool _equals(ls::std::io::File &_file, ls::std::io::File &_foreignFile);
+      [[nodiscard]] static bool _equals(const ls::std::io::File &_file, const ls::std::io::File &_foreignFile);
       [[nodiscard]] static bool _exists(const ::std::string &_path);
       [[nodiscard]] static ::std::string _getParent(const ::std::string &_path);
 #if defined(unix) || defined(__APPLE__)

+ 3 - 3
include/ls-std/io/FileOutputStream.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -22,8 +22,8 @@ namespace ls::std::io
   {
     public:
 
-      explicit FileOutputStream(ls::std::io::File &_file);
-      explicit FileOutputStream(ls::std::io::File &_file, bool _append);
+      explicit FileOutputStream(const ls::std::io::File &_file);
+      explicit FileOutputStream(const ls::std::io::File &_file, bool _append);
       ~FileOutputStream() noexcept override;
 
       void close();

+ 3 - 3
include/ls-std/io/FileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -21,11 +21,11 @@ namespace ls::std::io
   {
     public:
 
-      explicit FileReader(ls::std::io::File &_file);
+      explicit FileReader(const ls::std::io::File &_file);
       ~FileReader() noexcept override;
 
       [[nodiscard]] ls::std::core::type::byte_field read() override;
-      void reset(ls::std::io::File &_file);
+      void reset(const ls::std::io::File &_file);
 
     private:
 

+ 3 - 3
include/ls-std/io/FileWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -21,10 +21,10 @@ namespace ls::std::io
   {
     public:
 
-      explicit FileWriter(ls::std::io::File &_file);
+      explicit FileWriter(const ls::std::io::File &_file);
       ~FileWriter() noexcept override;
 
-      void reset(ls::std::io::File &_file);
+      void reset(const ls::std::io::File &_file);
       bool write(const ls::std::core::type::byte_field &_data) override; // nodiscard is optional here
 
     private:

+ 2 - 2
include/ls-std/io/StorableFile.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -25,7 +25,7 @@ namespace ls::std::io
       explicit StorableFile(const ::std::string &_path);
       ~StorableFile() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::File> getFile();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::File> getFile() const;
       [[nodiscard]] ls::std::core::type::byte_field load() override;
       void reset(const ::std::string &_path);
       void save(const ls::std::core::type::byte_field &_data) override;

+ 11 - 10
include/ls-std/io/logging/LogLevel.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -13,6 +13,7 @@
 #include "LogLevelValue.hpp"
 #include <ls-std/core/Class.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 #include <unordered_map>
 
 namespace ls::std::io
@@ -24,27 +25,27 @@ namespace ls::std::io
       explicit LogLevel(const ls::std::io::LogLevelValue &_value);
       LogLevel();
       ~LogLevel() noexcept override;
-      ;
+
       ls::std::io::LogLevel &operator=(const ls::std::io::LogLevelValue &_value);
-      bool operator<(const ls::std::io::LogLevelValue &_value);
-      bool operator<=(const ls::std::io::LogLevelValue &_value);
-      bool operator>(const ls::std::io::LogLevelValue &_value);
-      bool operator>=(const ls::std::io::LogLevelValue &_value);
-      bool operator==(const ls::std::io::LogLevelValue &_value);
+      bool operator<(const ls::std::io::LogLevelValue &_value) const;
+      bool operator<=(const ls::std::io::LogLevelValue &_value) const;
+      bool operator>(const ls::std::io::LogLevelValue &_value) const;
+      bool operator>=(const ls::std::io::LogLevelValue &_value) const;
+      bool operator==(const ls::std::io::LogLevelValue &_value) const;
 
-      [[nodiscard]] ls::std::io::LogLevelValue getValue();
+      [[nodiscard]] ls::std::io::LogLevelValue getValue() const;
       void setLogLevel(const ls::std::io::LogLevelValue &_value);
       void setLogLevel(const ::std::string &_value);
       [[nodiscard]] ::std::string toString() const;
 
     private:
 
-      ::std::unordered_map<uint8_t, ::std::string> level{};
+      ::std::unordered_map<ls::std::io::LogLevelValue, ::std::string> level{};
       ls::std::io::LogLevelValue value{};
 
       [[nodiscard]] ls::std::io::LogLevelValue _getValueFromString(const ::std::string &_value);
       void _init();
-      [[nodiscard]] bool _isValidLogLevelString(const ::std::string &_value);
+      [[nodiscard]] bool _isValidLogLevelString(::std::string_view _value) const;
   };
 }
 

+ 2 - 2
include/ls-std/io/logging/LogLevelValue.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-04
+ * Changed:         2023-05-19
  *
  * */
 
@@ -12,7 +12,7 @@
 
 namespace ls::std::io
 {
-  enum LogLevelValue
+  enum class LogLevelValue
   {
     FATAL = 0,
     ERR,

+ 12 - 11
include/ls-std/io/logging/Logger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-04-12
+ * Changed:         2023-05-18
  *
  * */
 
@@ -17,6 +17,7 @@
 #include <ls-std/io/FileOutputStream.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <string>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -27,18 +28,18 @@ namespace ls::std::io
       explicit Logger(const ::std::shared_ptr<ls::std::core::interface_type::IWriter> &_writer);
       ~Logger() noexcept override;
 
-      void debug(const ls::std::core::type::byte_type *_data);
-      void error(const ls::std::core::type::byte_type *_data);
-      void fatal(const ls::std::core::type::byte_type *_data);
-      [[nodiscard]] ls::std::io::LogLevel getLogLevel();
+      void debug(const ls::std::core::type::byte_type *_data) const;
+      void error(const ls::std::core::type::byte_type *_data) const;
+      void fatal(const ls::std::core::type::byte_type *_data) const;
+      [[nodiscard]] ls::std::io::LogLevel getLogLevel() const;
       void hideLogLevel();
       void hideTimestamp();
-      void info(const ls::std::core::type::byte_type *_data);
+      void info(const ls::std::core::type::byte_type *_data) const;
       void setLogLevel(const ls::std::io::LogLevelValue &_logLevelValue);
       void showLogLevel();
       void showTimestamp();
-      void trace(const ls::std::core::type::byte_type *_data);
-      void warn(const ls::std::core::type::byte_type *_data);
+      void trace(const ls::std::core::type::byte_type *_data) const;
+      void warn(const ls::std::core::type::byte_type *_data) const;
 
     private:
 
@@ -49,11 +50,11 @@ namespace ls::std::io
 
       void _assignWriter(const ::std::shared_ptr<ls::std::core::interface_type::IWriter> &_writer);
       [[nodiscard]] static ::std::string _buildCharacterChain(size_t _amount);
-      [[nodiscard]] static ::std::string _createFillContent(const ::std::string &_text);
-      [[nodiscard]] static ::std::string _generateTimeString(tm *_localTime);
+      [[nodiscard]] static ::std::string _createFillContent(::std::string_view _text);
+      [[nodiscard]] static ::std::string _generateTimeString(const tm *_localTime);
       [[nodiscard]] ::std::string _getLogLevelString(const ls::std::io::LogLevel &_logLevel) const;
       [[nodiscard]] ::std::string _getTimestampString() const;
-      void _log(const ls::std::core::type::byte_type *_data, const ls::std::io::LogLevel &_logLevel);
+      void _log(const ls::std::core::type::byte_type *_data, const ls::std::io::LogLevel &_logLevel) const;
       [[nodiscard]] static ::std::string _padRight(const ::std::string &_text);
   };
 }

+ 2 - 2
include/ls-std/io/section-pair/SectionPairRowEnumType.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-02-10
+* Changed:         2023-05-18
 *
 * */
 
@@ -12,7 +12,7 @@
 
 namespace ls::std::io
 {
-  enum SectionPairRowEnumType
+  enum class SectionPairRowEnumType
   {
     SECTION_PAIR_ROW_NOT_IMPLEMENTED = 0,
     SECTION_PAIR_ROW_LIST_VALUE,

+ 9 - 8
include/ls-std/io/section-pair/model/SectionPairDocument.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-15
-* Changed:         2023-02-23
+* Changed:         2023-05-16
 *
 * */
 
@@ -16,6 +16,7 @@
 #include <ls-std/io/section-pair/type/SectionPairDocumentTypes.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -28,14 +29,14 @@ namespace ls::std::io
 
       void add(const ls::std::io::section_pair_document_section_list_element &_section);
       void clear();
-      [[nodiscard]] ls::std::io::section_pair_document_section_list_element get(size_t _index);
-      [[nodiscard]] ls::std::io::section_pair_document_section_list_element get(const ls::std::io::section_pair_identifier &_sectionId);
-      [[nodiscard]] size_t getAmountOfSections();
-      [[nodiscard]] ::std::string getHeader();
-      [[nodiscard]] ls::std::io::section_pair_document_section_list getSectionList();
+      [[nodiscard]] ls::std::io::section_pair_document_section_list_element get(size_t _index) const;
+      [[nodiscard]] ls::std::io::section_pair_document_section_list_element get(const ls::std::io::section_pair_identifier &_sectionId) const;
+      [[nodiscard]] size_t getAmountOfSections() const;
+      [[nodiscard]] ::std::string getHeader() const;
+      [[nodiscard]] ls::std::io::section_pair_document_section_list getSectionList() const;
       [[nodiscard]] bool hasSection(const ls::std::io::section_pair_identifier &_sectionId);
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
-      void reserveNewLine(const ::std::string &_reservedNewLine);
+      void reserveNewLine(::std::string_view _reservedNewLine);
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
     private:
@@ -47,7 +48,7 @@ namespace ls::std::io
 
       void _checkSectionExistence(const ls::std::io::section_pair_identifier &_sectionId);
       void _createSerializable();
-      [[nodiscard]] ls::std::io::section_pair_document_section_list_element _get(const ls::std::io::section_pair_identifier &_sectionId);
+      [[nodiscard]] ls::std::io::section_pair_document_section_list_element _get(const ls::std::io::section_pair_identifier &_sectionId) const;
       [[nodiscard]] bool _hasSection(const ls::std::io::section_pair_identifier &_identifier);
   };
 }

+ 7 - 6
include/ls-std/io/section-pair/model/SectionPairRow.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -18,6 +18,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -28,12 +29,12 @@ namespace ls::std::io
       explicit SectionPairRow(const ls::std::io::section_pair_identifier &_key, const ls::std::io::SectionPairRowEnumType &_type);
       ~SectionPairRow() noexcept override;
 
-      [[nodiscard]] ls::std::io::section_pair_identifier getKey();
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairRowValue> getValue();
-      [[nodiscard]] bool isList();
-      [[nodiscard]] bool isSingleValue();
+      [[nodiscard]] ls::std::io::section_pair_identifier getKey() const;
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairRowValue> getValue() const;
+      [[nodiscard]] bool isList() const;
+      [[nodiscard]] bool isSingleValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
-      void reserveNewLine(const ::std::string &_reservedNewLine);
+      void reserveNewLine(::std::string_view _reservedNewLine);
       void setKey(const ls::std::io::section_pair_identifier &_key);
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 

+ 4 - 4
include/ls-std/io/section-pair/model/SectionPairRowListValue.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -27,9 +27,9 @@ namespace ls::std::io
 
       void add(const ls::std::io::section_pair_row_value &_value);
       void clear();
-      [[nodiscard]] ls::std::io::section_pair_row_value get(size_t _index);
-      [[nodiscard]] ::std::list<ls::std::io::section_pair_row_value> getList();
-      [[nodiscard]] size_t getSize();
+      [[nodiscard]] ls::std::io::section_pair_row_value get(size_t _index) const;
+      [[nodiscard]] ::std::list<ls::std::io::section_pair_row_value> getList() const;
+      [[nodiscard]] size_t getSize() const;
       [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;

+ 2 - 2
include/ls-std/io/section-pair/model/SectionPairRowSingleValue.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -26,7 +26,7 @@ namespace ls::std::io
       explicit SectionPairRowSingleValue(const ls::std::io::section_pair_row_value &_value);
       ~SectionPairRowSingleValue() noexcept override;
 
-      [[nodiscard]] ls::std::io::section_pair_row_value get();
+      [[nodiscard]] ls::std::io::section_pair_row_value get() const;
       [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void set(const ls::std::io::section_pair_row_value &_value);

+ 8 - 2
include/ls-std/io/section-pair/model/SectionPairRowValue.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-22
+* Changed:         2023-05-22
 *
 * */
 
@@ -13,6 +13,7 @@
 #include <ls-std/core/interface/ISerializable.hpp>
 #include <ls-std/io/section-pair/SectionPairRowEnumType.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -25,11 +26,16 @@ namespace ls::std::io
 
       virtual ls::std::io::SectionPairRowEnumType getType() = 0;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
-      void reserveNewLine(const ::std::string &_reservedNewLine);
+      void reserveNewLine(::std::string_view _reservedNewLine);
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
     protected:
 
+      [[nodiscard]] ::std::string _getReservedNewLine() const;
+      [[nodiscard]] ls::std::io::SectionPairRowEnumType _getType() const;
+
+    private:
+
       ::std::string reservedNewLine{};
       ls::std::io::SectionPairRowEnumType type{};
   };

+ 9 - 8
include/ls-std/io/section-pair/model/SectionPairSection.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-13
-* Changed:         2023-02-23
+* Changed:         2023-05-18
 *
 * */
 
@@ -18,6 +18,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -30,14 +31,14 @@ namespace ls::std::io
 
       void add(const ls::std::io::section_pair_row_list_element &_row);
       void clear();
-      [[nodiscard]] ls::std::io::section_pair_row_list_element get(size_t _index);
-      [[nodiscard]] ls::std::io::section_pair_row_list_element get(const ls::std::io::section_pair_identifier &_key);
-      [[nodiscard]] ls::std::io::section_pair_row_list getList();
-      [[nodiscard]] size_t getRowAmount();
-      [[nodiscard]] ls::std::io::section_pair_identifier getSectionId();
+      [[nodiscard]] ls::std::io::section_pair_row_list_element get(size_t _index) const;
+      [[nodiscard]] ls::std::io::section_pair_row_list_element get(const ls::std::io::section_pair_identifier &_key) const;
+      [[nodiscard]] ls::std::io::section_pair_row_list getList() const;
+      [[nodiscard]] size_t getRowAmount() const;
+      [[nodiscard]] ls::std::io::section_pair_identifier getSectionId() const;
       [[nodiscard]] bool hasRow(const ls::std::io::section_pair_identifier &_key);
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
-      void reserveNewLine(const ::std::string &_reservedNewLine);
+      void reserveNewLine(::std::string_view _reservedNewLine);
       void setSectionId(const ls::std::io::section_pair_identifier &_sectionId);
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
@@ -49,7 +50,7 @@ namespace ls::std::io
       ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
 
       void _createSerializable();
-      [[nodiscard]] ls::std::io::section_pair_row_list_element _get(const ls::std::io::section_pair_identifier &_key);
+      [[nodiscard]] ls::std::io::section_pair_row_list_element _get(const ls::std::io::section_pair_identifier &_key) const;
       [[nodiscard]] bool _hasRow(const ls::std::io::section_pair_identifier &_key);
       void _rowExistenceCheck(const ls::std::io::section_pair_identifier &_key);
       void _setSectionId(const ls::std::io::section_pair_identifier &_sectionId);

+ 3 - 3
include/ls-std/io/section-pair/reader/SectionPairFileReader.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -25,14 +25,14 @@ namespace ls::std::io
       explicit SectionPairFileReader(const ls::std::io::SectionPairFileReaderParameter &_parameter);
       ~SectionPairFileReader() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairDocument> getDocument();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairDocument> getDocument() const;
       ls::std::core::type::byte_field read() override; // nodiscard is optional here
 
     private:
 
       ls::std::io::SectionPairFileReaderParameter parameter{};
 
-      void _checkFileExtension();
+      void _checkFileExtension() const;
       void _createDocument();
       void _createFileExistenceEvaluator();
       void _createReader();

+ 7 - 6
include/ls-std/io/section-pair/reader/SectionPairFileReaderParameter.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-02-21
+* Changed:         2023-05-18
 *
 * */
 
@@ -16,6 +16,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -26,13 +27,13 @@ namespace ls::std::io
       SectionPairFileReaderParameter();
       ~SectionPairFileReaderParameter();
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairDocument> getDocument();
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::interface_type::IEvaluator> getFileExistenceEvaluator();
-      [[nodiscard]] ::std::string getFilePath();
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::interface_type::IReader> getReader();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::SectionPairDocument> getDocument() const;
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::interface_type::IEvaluator> getFileExistenceEvaluator() const;
+      [[nodiscard]] ::std::string getFilePath() const;
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::interface_type::IReader> getReader() const;
       void setDocument(const ::std::shared_ptr<ls::std::io::SectionPairDocument> &_document);
       void setFileExistenceEvaluator(const ::std::shared_ptr<ls::std::core::interface_type::IEvaluator> &_fileExistenceEvaluator);
-      void setFilePath(const ::std::string &_filePath);
+      void setFilePath(::std::string_view _filePath);
       void setReader(const ::std::shared_ptr<ls::std::core::interface_type::IReader> &_reader);
 
     private:

+ 7 - 6
include/ls-std/io/section-pair/serialization/SerializableSectionPairDocument.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-16
-* Changed:         2023-02-22
+* Changed:         2023-05-19
 *
 * */
 
@@ -15,6 +15,7 @@
 #include <ls-std/core/interface/ISerializable.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -25,7 +26,7 @@ namespace ls::std::io
       explicit SerializableSectionPairDocument(const ls::std::io::SerializableSectionPairParameter &_parameter);
       ~SerializableSectionPairDocument() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
@@ -33,10 +34,10 @@ namespace ls::std::io
 
       ls::std::io::SerializableSectionPairParameter parameter{};
 
-      [[nodiscard]] ls::std::core::type::byte_field _getCurrentRow(size_t _iterations, const ls::std::core::type::byte_field &_serializedDocument);
-      [[nodiscard]] ls::std::core::type::byte_field _getNextSerializedSection(const ls::std::core::type::byte_field &_serializedDocument);
-      [[nodiscard]] bool _isNotNewSection(const ls::std::core::type::byte_field &_currentRow);
-      void _addSection(const ls::std::core::type::byte_field &_serializedSection);
+      [[nodiscard]] ls::std::core::type::byte_field _getCurrentRow(size_t _iterations, ::std::string_view _serializedDocument) const;
+      [[nodiscard]] ls::std::core::type::byte_field _getNextSerializedSection(const ls::std::core::type::byte_field &_serializedDocument) const;
+      [[nodiscard]] bool _isNotNewSection(::std::string_view _currentRow) const;
+      void _addSection(const ls::std::core::type::byte_field &_serializedSection) const;
   };
 }
 

+ 4 - 3
include/ls-std/io/section-pair/serialization/SerializableSectionPairParameter.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-17
-* Changed:         2023-02-17
+* Changed:         2023-05-18
 *
 * */
 
@@ -14,6 +14,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
 #include <string>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -24,9 +25,9 @@ namespace ls::std::io
       SerializableSectionPairParameter();
       ~SerializableSectionPairParameter();
 
-      [[nodiscard]] ::std::string getNewLine();
+      [[nodiscard]] ::std::string getNewLine() const;
       [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
-      void setNewLine(const ::std::string &_newLine);
+      void setNewLine(::std::string_view _newLine);
       void setValue(const ::std::shared_ptr<ls::std::core::Class> &_value);
 
     private:

+ 5 - 5
include/ls-std/io/section-pair/serialization/SerializableSectionPairRow.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -26,7 +26,7 @@ namespace ls::std::io
       explicit SerializableSectionPairRow(const ls::std::io::SerializableSectionPairParameter &_parameter);
       ~SerializableSectionPairRow() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
@@ -34,9 +34,9 @@ namespace ls::std::io
 
       ls::std::io::SerializableSectionPairParameter parameter{};
 
-      [[nodiscard]] ::std::string _marshalKey();
-      void _unmarshalListValue(const ls::std::core::type::byte_field &_data);
-      void _unmarshalSingleValue(const ls::std::core::type::byte_field &_data);
+      [[nodiscard]] ::std::string _marshalKey() const;
+      void _unmarshalListValue(const ls::std::core::type::byte_field &_data) const;
+      void _unmarshalSingleValue(const ls::std::core::type::byte_field &_data) const;
   };
 }
 

+ 5 - 4
include/ls-std/io/section-pair/serialization/SerializableSectionPairRowListValue.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -15,6 +15,7 @@
 #include <ls-std/core/interface/ISerializable.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
 #include <memory>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -25,7 +26,7 @@ namespace ls::std::io
       explicit SerializableSectionPairRowListValue(const ls::std::io::SerializableSectionPairParameter &_parameter);
       ~SerializableSectionPairRowListValue() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
@@ -33,8 +34,8 @@ namespace ls::std::io
 
       ls::std::io::SerializableSectionPairParameter parameter{};
 
-      [[nodiscard]] static ::std::string _getLine(::std::string::size_type _position, const ls::std::core::type::byte_field &_searchText);
-      void _updateSearchText(::std::string::size_type _position, ls::std::core::type::byte_field &_searchText);
+      [[nodiscard]] static ::std::string _getLine(::std::string::size_type _position, ::std::string_view _searchText);
+      void _updateSearchText(::std::string::size_type _position, ls::std::core::type::byte_field &_searchText) const;
   };
 }
 

+ 2 - 2
include/ls-std/io/section-pair/serialization/SerializableSectionPairRowSingleValue.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2023-02-22
+* Changed:         2023-05-18
 *
 * */
 
@@ -25,7 +25,7 @@ namespace ls::std::io
       explicit SerializableSectionPairRowSingleValue(const ls::std::io::SerializableSectionPairParameter &_parameter);
       ~SerializableSectionPairRowSingleValue() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 

+ 15 - 14
include/ls-std/io/section-pair/serialization/SerializableSectionPairSection.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-14
-* Changed:         2023-02-22
+* Changed:         2023-05-19
 *
 * */
 
@@ -15,6 +15,7 @@
 #include <ls-std/core/interface/ISerializable.hpp>
 #include <ls-std/io/section-pair/SectionPairRowEnumType.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -25,7 +26,7 @@ namespace ls::std::io
       explicit SerializableSectionPairSection(const ls::std::io::SerializableSectionPairParameter &_parameter);
       ~SerializableSectionPairSection() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue();
+      [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
       [[nodiscard]] ls::std::core::type::byte_field marshal() override;
       void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
@@ -33,20 +34,20 @@ namespace ls::std::io
 
       ls::std::io::SerializableSectionPairParameter parameter{};
 
-      [[nodiscard]] ls::std::core::type::byte_field _collectSectionRow(const ls::std::core::type::byte_field &_currentRows, ls::std::io::SectionPairRowEnumType &_type);
-      [[nodiscard]] ls::std::core::type::byte_field _collectSectionListValueRow(const core::type::byte_field &_currentRows, ls::std::io::SectionPairRowEnumType &_type);
+      [[nodiscard]] ls::std::core::type::byte_field _collectSectionRow(const ls::std::core::type::byte_field &_currentRows, ls::std::io::SectionPairRowEnumType &_type) const;
+      [[nodiscard]] ls::std::core::type::byte_field _collectSectionListValueRow(const core::type::byte_field &_currentRows, ls::std::io::SectionPairRowEnumType &_type) const;
       [[nodiscard]] static core::type::byte_field _collectSectionSingleValueRow(const ls::std::core::type::byte_field &_firstRow, ls::std::io::SectionPairRowEnumType &type);
-      [[nodiscard]] static size_t _getNthSubStringPosition(const ls::std::core::type::byte_field &_text, const ls::std::core::type::byte_field &_subText);
-      [[nodiscard]] ls::std::core::type::byte_field _getSectionHeader(const ls::std::core::type::byte_field &_data);
-      [[nodiscard]] static ls::std::core::type::byte_field _getSectionId(const ls::std::core::type::byte_field &_sectionHeader);
-      [[nodiscard]] static bool _isListValueRow(const ::std::string &_currentRow);
+      [[nodiscard]] static size_t _getNthSubStringPosition(::std::string_view _text, ::std::string_view _subText);
+      [[nodiscard]] ls::std::core::type::byte_field _getSectionHeader(const ls::std::core::type::byte_field &_data) const;
+      [[nodiscard]] static ls::std::core::type::byte_field _getSectionId(::std::string_view _sectionHeader);
+      [[nodiscard]] static bool _isListValueRow(::std::string_view _currentRow);
       [[nodiscard]] static bool _isStartingValueRow(const ::std::string &_currentRow);
-      [[nodiscard]] static bool _isSingleValueRow(const ::std::string &_currentRow);
-      [[nodiscard]] ls::std::core::type::byte_field _marshalRows();
-      [[nodiscard]] ls::std::core::type::byte_field _marshalSectionId();
-      void _unmarshalRow(const ::std::string &_sectionRow, ls::std::io::SectionPairRowEnumType _type);
-      void _unmarshalRows(const ls::std::core::type::byte_field &_serializedRows);
-      [[nodiscard]] size_t _unmarshalSectionHeader(const ls::std::core::type::byte_field &_data);
+      [[nodiscard]] static bool _isSingleValueRow(::std::string_view _currentRow);
+      [[nodiscard]] ls::std::core::type::byte_field _marshalRows() const;
+      [[nodiscard]] ls::std::core::type::byte_field _marshalSectionId() const;
+      void _unmarshalRow(const ::std::string &_sectionRow, ls::std::io::SectionPairRowEnumType _type) const;
+      void _unmarshalRows(const ls::std::core::type::byte_field &_serializedRows) const;
+      [[nodiscard]] size_t _unmarshalSectionHeader(const ls::std::core::type::byte_field &_data) const;
   };
 }
 

+ 4 - 4
include/ls-std/io/xml/XmlAttribute.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -23,11 +23,11 @@ namespace ls::std::io
       explicit XmlAttribute(const ::std::string &_name);
       ~XmlAttribute() noexcept override;
 
-      [[nodiscard]] ::std::string getName();
-      [[nodiscard]] ::std::string getValue();
+      [[nodiscard]] ::std::string getName() const;
+      [[nodiscard]] ::std::string getValue() const;
       void setName(const ::std::string &_name);
       void setValue(const ::std::string &_value);
-      [[nodiscard]] ::std::string toXml();
+      [[nodiscard]] ::std::string toXml() const;
 
     private:
 

+ 6 - 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:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -23,13 +23,13 @@ namespace ls::std::io
       explicit XmlDeclaration(const ::std::string &_version);
       ~XmlDeclaration() noexcept override;
 
-      [[nodiscard]] ::std::string getEncoding();
-      [[nodiscard]] ::std::string getStandalone();
-      [[nodiscard]] ::std::string getVersion();
+      [[nodiscard]] ::std::string getEncoding() const;
+      [[nodiscard]] ::std::string getStandalone() const;
+      [[nodiscard]] ::std::string getVersion() const;
       void setEncoding(const ::std::string &_encoding);
       void setStandalone(const ::std::string &_standalone);
       void setVersion(const ::std::string &_version);
-      [[nodiscard]] ::std::string toXml();
+      [[nodiscard]] ::std::string toXml() const;
 
     private:
 
@@ -37,7 +37,7 @@ namespace ls::std::io
       ls::std::io::XmlAttribute standalone{"standalone"};
       ls::std::io::XmlAttribute version{"version"};
 
-      [[nodiscard]] static ::std::string _toXmlAttribute(ls::std::io::XmlAttribute _attribute);
+      [[nodiscard]] static ::std::string _toXmlAttribute(const ls::std::io::XmlAttribute &_attribute);
   };
 }
 

+ 4 - 4
include/ls-std/io/xml/XmlDocument.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -25,11 +25,11 @@ namespace ls::std::io
       XmlDocument();
       ~XmlDocument() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDeclaration> getDeclaration();
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlNode> getRootElement();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDeclaration> getDeclaration() const;
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlNode> getRootElement() const;
       void setDeclaration(const ::std::shared_ptr<ls::std::io::XmlDeclaration> &_declaration);
       void setRootElement(const ::std::shared_ptr<ls::std::io::XmlNode> &_rootElement);
-      [[nodiscard]] ::std::string toXml();
+      [[nodiscard]] ::std::string toXml() const;
 
     private:
 

+ 9 - 9
include/ls-std/io/xml/XmlNode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -34,11 +34,11 @@ namespace ls::std::io
       bool addChildToBeginning(const ::std::shared_ptr<ls::std::io::XmlNode> &_child);                                                    // nodiscard is optional here
       bool addChildToEnd(const ::std::shared_ptr<ls::std::io::XmlNode> &_child);                                                          // nodiscard is optional here
       void clearValue();
-      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::io::XmlAttribute>> getAttributes();
-      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::io::XmlNode>> getChildren();
+      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::io::XmlAttribute>> getAttributes() const;
+      [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::io::XmlNode>> getChildren() const;
       [[nodiscard]] ::std::list<::std::shared_ptr<ls::std::io::XmlNode>> getChildren(const ::std::string &_name);
-      [[nodiscard]] ::std::string getName();
-      [[nodiscard]] ::std::string getValue();
+      [[nodiscard]] ::std::string getName() const;
+      [[nodiscard]] ::std::string getValue() const;
       [[nodiscard]] bool hasAttribute(const ::std::string &_name);
       [[nodiscard]] bool hasChild(const ::std::string &_name);
       [[nodiscard]] bool hasChild(const ::std::shared_ptr<ls::std::io::XmlNode> &_child);
@@ -70,10 +70,10 @@ namespace ls::std::io
       [[nodiscard]] bool _hasChild(const ::std::string &_name);
       [[nodiscard]] ::std::string _toXmlAttributes();
       [[nodiscard]] ::std::string _toXmlChildren(uint8_t _tabSize);
-      [[nodiscard]] ::std::string _toXmlCloseTag();
-      [[nodiscard]] ::std::string _toXmlOpenTag();
-      [[nodiscard]] ::std::string _toXmlOpenTagClose();
-      [[nodiscard]] ::std::string _toXmlValue();
+      [[nodiscard]] ::std::string _toXmlCloseTag() const;
+      [[nodiscard]] ::std::string _toXmlOpenTag() const;
+      [[nodiscard]] ::std::string _toXmlOpenTagClose() const;
+      [[nodiscard]] ::std::string _toXmlValue() const;
   };
 }
 

+ 2 - 2
include/ls-std/io/xml/XmlParseMode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-13
- * Changed:         2023-02-04
+ * Changed:         2023-05-18
  *
  * */
 
@@ -12,7 +12,7 @@
 
 namespace ls::std::io
 {
-  enum XmlParseMode
+  enum class XmlParseMode
   {
     XML_PARSE_MODE_ANALYZE = 0,
     XML_PARSE_MODE_DECLARATION,

+ 2 - 2
include/ls-std/io/xml/XmlParseParameter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-17
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -25,7 +25,7 @@ namespace ls::std::io
       ~XmlParseParameter();
 
       [[nodiscard]] uint8_t getLevel() const;
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlNode> getNode();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlNode> getNode() const;
       void setLevel(const uint8_t &_level);
       void setNode(const ::std::shared_ptr<ls::std::io::XmlNode> &_node);
 

+ 15 - 13
include/ls-std/io/xml/XmlParser.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-25
- * Changed:         2023-02-22
+ * Changed:         2023-05-16
  *
  * */
 
@@ -17,6 +17,7 @@
 #include <ls-std/core/Class.hpp>
 #include <ls-std/core/type/Types.hpp>
 #include <ls-std/os/dynamic-goal.hpp>
+#include <string_view>
 
 namespace ls::std::io
 {
@@ -27,7 +28,7 @@ namespace ls::std::io
       explicit XmlParser(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
       ~XmlParser() noexcept override;
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDocument> getDocument();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDocument> getDocument() const;
       void parse(const ls::std::core::type::byte_field &_data);
       void setDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
 
@@ -46,28 +47,29 @@ namespace ls::std::io
 
       void _analyze(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
       void _assignDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
-      [[nodiscard]] static bool _contains(const ::std::string &_text, const ::std::string &_searchText);
+      [[nodiscard]] static bool _contains(::std::string_view _text, ::std::string_view _searchText);
       [[nodiscard]] static ::std::shared_ptr<ls::std::io::XmlDeclaration> _createDeclaration(const ::std::list<::std::pair<::std::string, ::std::string>> &_attributes);
-      [[nodiscard]] static ::std::shared_ptr<ls::std::io::XmlNode> _createNode(const ::std::list<::std::pair<::std::string, ::std::string>> &_attributes, const ::std::string &_name);
-      [[nodiscard]] static bool _endsWith(const ::std::string &_text, const ::std::string &_ending);
+      [[nodiscard]] static ::std::shared_ptr<ls::std::io::XmlNode> _createNode(const ::std::list<::std::pair<::std::string, ::std::string>> &_attributes, ::std::string_view _name);
+      [[nodiscard]] static bool _endsWith(::std::string_view _text, ::std::string_view _ending);
       [[nodiscard]] static ::std::pair<::std::string, ::std::string> _findAttribute(const ::std::list<::std::pair<::std::string, ::std::string>> &_attributes, const ::std::string &_name);
       [[nodiscard]] static size_t _findAttributeEndPosition(const ls::std::core::type::byte_field &_data);
-      [[nodiscard]] static ls::std::core::type::byte_field _getNextTagString(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
-      void _isClosingTag(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
-      void _isDeclaration(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
-      void _isOpeningTag(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
+      [[nodiscard]] static ls::std::core::type::byte_field _getNextTagString(::std::string_view _data, ::std::string::size_type _index);
+      void _isClosingTag(::std::string_view _data, ::std::string::size_type _index);
+      void _isDeclaration(::std::string_view _data, ::std::string::size_type _index);
+      void _isOpeningTag(::std::string_view _data, ::std::string::size_type _index);
       void _isValue(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
       void _mergeNodes();
       void _mergeChildrenToParentNode(const ::std::shared_ptr<ls::std::io::XmlNode> &_parent, ::std::list<ls::std::io::XmlParseParameter>::iterator &_iterator, uint8_t _parentLevel);
       void _mergeNodesOnCurrentLevel();
       void _parse(const ls::std::core::type::byte_field &_data);
-      [[nodiscard]] static ::std::pair<::std::string, ::std::string> _parseAttribute(const ls::std::core::type::byte_field &_data);
+      [[nodiscard]] static ::std::pair<::std::string, ::std::string> _parseAttribute(::std::string_view _data);
       [[nodiscard]] static ::std::list<::std::pair<::std::string, ::std::string>> _parseAttributes(ls::std::core::type::byte_field _data);
       [[nodiscard]] size_t _parseClosingTag(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
-      [[nodiscard]] size_t _parseDeclaration(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
+      [[nodiscard]] size_t _parseDeclaration(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index) const;
+      [[nodiscard]] ::std::string::size_type _parseMode(::std::string::size_type _index, const ls::std::core::type::byte_field &_data);
       [[nodiscard]] size_t _parseOpeningTag(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
-      [[nodiscard]] static ls::std::core::type::byte_field _parseTagName(const ls::std::core::type::byte_field &_data);
-      [[nodiscard]] size_t _parseValue(const ls::std::core::type::byte_field &_data, ::std::string::size_type _index);
+      [[nodiscard]] static ::std::string_view _parseTagName(::std::string_view _data);
+      [[nodiscard]] size_t _parseValue(::std::string_view _data, ::std::string::size_type _index);
       void _reset();
       void _setMaxLevel();
   };

+ 4 - 4
include/ls-std/io/xml/XmlReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2023-02-22
+ * Changed:         2023-05-17
  *
  * */
 
@@ -34,17 +34,17 @@ namespace ls::std::io
 
       // additional functionality
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDocument> getDocument();
+      [[nodiscard]] ::std::shared_ptr<ls::std::io::XmlDocument> getDocument() const;
       void setDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
       void setFile(const ls::std::io::File &_xmlFile);
 
     private:
 
       ::std::shared_ptr<ls::std::io::XmlDocument> document{};
-      ls::std::io::File xmlFile;
+      ls::std::io::File xmlFile = ls::std::io::File{""};
 
       void _assignDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
-      void _assignFile(ls::std::io::File _xmlFile);
+      void _assignFile(const ls::std::io::File &_xmlFile);
   };
 }
 

+ 4 - 1
include/ls-std/ls-std-core.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-05-13
- * Changed:         2023-03-27
+ * Changed:         2023-05-24
  *
  * */
 
@@ -14,6 +14,8 @@
 #include <ls-std/core/evaluator/IndexOutOfBoundsEvaluator.hpp>
 #include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
 #include <ls-std/core/evaluator/NullPointerEvaluator.hpp>
+#include <ls-std/core/evaluator/RawNullPointerArgumentEvaluator.hpp>
+#include <ls-std/core/evaluator/RawNullPointerEvaluator.hpp>
 
 #include <ls-std/core/exception/EventNotHandledException.hpp>
 #include <ls-std/core/exception/EventNotSubscribedException.hpp>
@@ -39,6 +41,7 @@
 #include <ls-std/core/interface/IWriter.hpp>
 
 #include <ls-std/core/type/EventTypes.hpp>
+#include <ls-std/core/type/RawPointer.hpp>
 #include <ls-std/core/type/Types.hpp>
 
 #include <ls-std/core/Class.hpp>

+ 9 - 9
include/ls-std/time/Date.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-22
+ * Changed:         2023-05-19
  *
  * */
 
@@ -34,20 +34,20 @@ namespace ls::std::time
 
       [[nodiscard]] bool after(const ls::std::time::Date &_foreignDate) const;
       [[nodiscard]] bool before(const ls::std::time::Date &_foreignDate) const;
-      [[nodiscard]] int getDay();
-      [[nodiscard]] int getHour();
-      [[nodiscard]] int getMinute();
-      [[nodiscard]] int getMonth();
-      [[nodiscard]] int getSecond();
+      [[nodiscard]] int getDay() const;
+      [[nodiscard]] int getHour() const;
+      [[nodiscard]] int getMinute() const;
+      [[nodiscard]] int getMonth() const;
+      [[nodiscard]] int getSecond() const;
       [[nodiscard]] time_t getTime() const;
-      [[nodiscard]] int getYear();
+      [[nodiscard]] int getYear() const;
       void setTime(time_t _timestamp);
-      [[nodiscard]] ::std::string toString();
+      [[nodiscard]] ::std::string toString() const;
 
     private:
 
       time_t timestamp{};
-      tm *localTime{};
+      tm localTime{};
 
       void _decrementByDays(int _value);
       void _incrementByDays(int _value);

+ 4 - 2
include/ls-std/time/system-time/SystemTime.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-07
-* Changed:         2023-03-31
+* Changed:         2023-05-18
 *
 * */
 
@@ -17,6 +17,7 @@
 #include <ls-std/time/common/DateParameter.hpp>
 #include <ls-std/time/type/DateParameterTypes.hpp>
 #include <memory>
+#include <string>
 
 namespace ls::std::time
 {
@@ -28,12 +29,13 @@ namespace ls::std::time
       SystemTime();
       ~SystemTime() noexcept override;
 
-      [[nodiscard]] bool set(const ls::std::time::DateParameter &_dateParameter);
+      [[nodiscard]] bool set(const ls::std::time::DateParameter &_dateParameter) const;
 
     private:
 
       ::std::shared_ptr<ls::std::time::SystemTimeParameter> parameter{};
 
+      [[nodiscard]] static ::std::string _fetchClassName();
       void _generateParameter();
   };
 }

+ 2 - 2
include/ls-std/time/system-time/SystemTimeParameter.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-15
-* Changed:         2023-03-31
+* Changed:         2023-05-18
 *
 * */
 
@@ -23,7 +23,7 @@ namespace ls::std::time
       SystemTimeParameter();
       ~SystemTimeParameter();
 
-      [[nodiscard]] ::std::shared_ptr<ls::std::time::IClock> getClock();
+      [[nodiscard]] ::std::shared_ptr<ls::std::time::IClock> getClock() const;
       void setClock(const ::std::shared_ptr<ls::std::time::IClock> &_clock);
 
     private:

+ 17 - 12
source/ls-std/boxing/Boolean.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -17,12 +17,10 @@ using ls::std::core::IllegalArgumentException;
 using std::string;
 using std::transform;
 
-Boolean::Boolean(bool _value) : Boolean()
-{
-  this->value = _value;
-}
+Boolean::Boolean(bool _value) : Class(Boolean::_fetchClassName()), value(_value)
+{}
 
-Boolean::Boolean() : Class("Boolean")
+Boolean::Boolean() : Class(Boolean::_fetchClassName())
 {}
 
 Boolean::~Boolean() noexcept = default;
@@ -69,22 +67,23 @@ bool Boolean::operator||(int _value) const
   return this->value || _value;
 }
 
-void Boolean::parse(string _parseText)
+void Boolean::parse(const string &_parseText)
 {
-  transform(_parseText.begin(), _parseText.end(), _parseText.begin(), ::tolower);
+  string parseText = _parseText;
+  transform(parseText.begin(), parseText.end(), parseText.begin(), ::tolower);
 
-  if (_parseText != this->TRUE_STRING && _parseText != this->FALSE_STRING)
+  if (parseText != this->TRUE_STRING && parseText != this->FALSE_STRING)
   {
-    throw IllegalArgumentException{_parseText + " is not a valid string representation"};
+    throw IllegalArgumentException{parseText + " is not a valid string representation"};
   }
   else
   {
-    if (_parseText == this->TRUE_STRING)
+    if (parseText == this->TRUE_STRING)
     {
       this->value = true;
     }
 
-    if (_parseText == this->FALSE_STRING)
+    if (parseText == this->FALSE_STRING)
     {
       this->value = false;
     }
@@ -121,6 +120,12 @@ bool Boolean::XOR(bool _leftExpression, bool _rightExpression)
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
+string Boolean::_fetchClassName()
+{
+  static const string className = "Boolean";
+  return className;
+}
+
 string Boolean::_toString() const
 {
   string booleanString{};

+ 11 - 5
source/ls-std/boxing/Double.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -19,14 +19,14 @@ using std::stod;
 using std::string;
 using std::to_string;
 
-Double::Double() : Class("Double")
+Double::Double() : Class(Double::_fetchClassName())
 {
   this->_assignEpsilon(0.00000001);
 }
 
-Double::Double(double _value) : Double()
+Double::Double(double _value) : Class(Double::_fetchClassName()), value(_value)
 {
-  this->value = _value;
+  this->_assignEpsilon(0.00000001);
 }
 
 Double::~Double() noexcept = default;
@@ -200,7 +200,7 @@ void Double::operator--()
   this->value -= 1.0f;
 }
 
-void Double::parse(string _parseText)
+void Double::parse(const string &_parseText)
 {
   this->value = stod(_parseText);
 }
@@ -234,3 +234,9 @@ void Double::_assignEpsilon(double _epsilon)
 
   this->epsilon = _epsilon;
 }
+
+string Double::_fetchClassName()
+{
+  static const string className = "Double";
+  return className;
+}

+ 11 - 7
source/ls-std/boxing/Float.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -19,13 +19,11 @@ using std::stof;
 using std::string;
 using std::to_string;
 
-Float::Float() : Class("Float"), epsilon(0.00001f)
+Float::Float() : Class(Float::_fetchClassName()), epsilon(0.00001F)
 {}
 
-Float::Float(float _value) : Float()
-{
-  this->value = _value;
-}
+Float::Float(float _value) : Class(Float::_fetchClassName()), epsilon(0.00001f), value(_value)
+{}
 
 Float::~Float() noexcept = default;
 
@@ -198,7 +196,7 @@ void Float::operator--()
   this->value -= 1.0f;
 }
 
-void Float::parse(string _parseText)
+void Float::parse(const string &_parseText)
 {
   this->value = stof(_parseText);
 }
@@ -232,3 +230,9 @@ void Float::_assignEpsilon(float _epsilon)
 
   this->epsilon = _epsilon;
 }
+
+string Float::_fetchClassName()
+{
+  static const string className = "Float";
+  return className;
+}

+ 11 - 37
source/ls-std/boxing/Integer.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -17,12 +17,10 @@ using std::stoi;
 using std::string;
 using std::to_string;
 
-Integer::Integer(int _value) : Integer()
-{
-  this->value = _value;
-}
+Integer::Integer(int _value) : Class(Integer::_fetchClassName()), value(_value)
+{}
 
-Integer::Integer() : Class("Integer")
+Integer::Integer() : Class(Integer::_fetchClassName())
 {}
 
 Integer::~Integer() noexcept = default;
@@ -216,36 +214,6 @@ bool Integer::operator<=(int _value) const
   return this->value <= _value;
 }
 
-bool Integer::operator&&(const Integer &_integer) const
-{
-  return this->value && _integer.getValue();
-}
-
-bool Integer::operator&&(int _value) const
-{
-  return this->value && _value;
-}
-
-bool Integer::operator&&(bool _expression) const
-{
-  return this->value && _expression;
-}
-
-bool Integer::operator||(const Integer &_integer) const
-{
-  return this->value || _integer.getValue();
-}
-
-bool Integer::operator||(int _value) const
-{
-  return this->value || _value;
-}
-
-bool Integer::operator||(bool _expression) const
-{
-  return this->value || _expression;
-}
-
 void Integer::operator++()
 {
   this->value += 1;
@@ -256,7 +224,7 @@ void Integer::operator--()
   this->value -= 1;
 }
 
-void Integer::parse(string _parseText)
+void Integer::parse(const string &_parseText)
 {
   this->value = stoi(_parseText);
 }
@@ -270,3 +238,9 @@ int Integer::getValue() const
 {
   return this->value;
 }
+
+string Integer::_fetchClassName()
+{
+  static const string className = "Integer";
+  return className;
+}

+ 11 - 37
source/ls-std/boxing/Long.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -18,12 +18,10 @@ using std::stoll;
 using std::string;
 using std::to_string;
 
-Long::Long(long_type _value) : Long()
-{
-  this->value = _value;
-}
+Long::Long(long_type _value) : Class(Long::_fetchClassName()), value(_value)
+{}
 
-Long::Long() : Class("Long")
+Long::Long() : Class(Long::_fetchClassName())
 {}
 
 Long::~Long() noexcept = default;
@@ -217,36 +215,6 @@ bool Long::operator<=(long_type _value) const
   return this->value <= _value;
 }
 
-bool Long::operator&&(const Long &_long) const
-{
-  return this->value && _long.getValue();
-}
-
-bool Long::operator&&(long_type _value) const
-{
-  return this->value && _value;
-}
-
-bool Long::operator&&(bool _expression) const
-{
-  return this->value && _expression;
-}
-
-bool Long::operator||(const Long &_long) const
-{
-  return this->value || _long.getValue();
-}
-
-bool Long::operator||(long_type _value) const
-{
-  return this->value || _value;
-}
-
-bool Long::operator||(bool _expression) const
-{
-  return this->value || _expression;
-}
-
 void Long::operator++()
 {
   this->value += 1;
@@ -257,7 +225,7 @@ void Long::operator--()
   this->value -= 1;
 }
 
-void Long::parse(string _parseText)
+void Long::parse(const string &_parseText)
 {
   this->value = stoll(_parseText);
 }
@@ -271,3 +239,9 @@ long_type Long::getValue() const
 {
   return this->value;
 }
+
+string Long::_fetchClassName()
+{
+  static const string className = "Long";
+  return className;
+}

+ 22 - 21
source/ls-std/boxing/String.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-02-23
+ * Changed:         2023-05-17
  *
  * */
 
@@ -16,6 +16,7 @@ using ls::std::core::type::byte_type;
 using std::move;
 using std::reverse;
 using std::string;
+using std::string_view;
 using std::transform;
 using std::vector;
 
@@ -50,7 +51,7 @@ string String::operator+(const char *_string) const
   return this->value + _string;
 }
 
-string String::operator-(int _number)
+string String::operator-(int _number) const
 {
   string copy = this->value;
   return copy.substr(0, copy.size() - _number);
@@ -68,39 +69,39 @@ String &String::operator+=(const string &_text)
   return *this;
 }
 
-bool String::operator==(String _string)
+bool String::operator==(String _string) const
 {
   return this->value == _string.toString();
 }
 
-bool String::operator==(const string &_value)
+bool String::operator==(string_view _value) const
 {
   return this->value == _value;
 }
 
-bool String::operator==(const char *_value)
+bool String::operator==(const char *_value) const
 {
   return this->value == _value;
 }
 
-bool String::operator!=(String _string)
+bool String::operator!=(String _string) const
 {
   return this->value != _string.toString();
 }
 
-bool String::operator!=(const string &_value)
+bool String::operator!=(string_view _value) const
 {
   return this->value != _value;
 }
 
-bool String::operator!=(const char *_value)
+bool String::operator!=(const char *_value) const
 {
   return this->value != _value;
 }
 
-void String::parse(string _parseText)
+void String::parse(const string &_parseText)
 {
-  this->value = ::move(_parseText);
+  this->value = _parseText;
 }
 
 string String::toString()
@@ -108,22 +109,22 @@ string String::toString()
   return this->value;
 }
 
-bool String::contains(const string &_text)
+bool String::contains(string_view _text) const
 {
   return this->value.find(_text) != string::npos;
 }
 
-bool String::endsWith(const string &_text)
+bool String::endsWith(string_view _text) const
 {
   return this->value.rfind(_text) == (this->value.size() - _text.size());
 }
 
-bool String::equalsIgnoreCase(String _string)
+bool String::equalsIgnoreCase(const String &_string) const
 {
   return this->toLowerCase() == _string.toLowerCase();
 }
 
-bool String::equalsIgnoreCase(string _text)
+bool String::equalsIgnoreCase(string _text) const
 {
   return this->toLowerCase() == String{::move(_text)}.toLowerCase();
 }
@@ -136,17 +137,17 @@ vector<byte_type> String::getByteData()
   return byteData;
 }
 
-string String::padLeft(size_t _width, const char _fillCharacter)
+string String::padLeft(size_t _width, const char _fillCharacter) const
 {
   return String::_createFillContent(this->value, _width, _fillCharacter) + this->value;
 }
 
-string String::padRight(size_t _width, const char _fillCharacter)
+string String::padRight(size_t _width, const char _fillCharacter) const
 {
   return this->value + String::_createFillContent(this->value, _width, _fillCharacter);
 }
 
-string String::reverse()
+string String::reverse() const
 {
   string copy = this->value;
   ::reverse(copy.begin(), copy.end());
@@ -154,12 +155,12 @@ string String::reverse()
   return copy;
 }
 
-bool String::startsWith(const string &_text)
+bool String::startsWith(string_view _text) const
 {
   return this->value.rfind(_text, 0) == 0;
 }
 
-string String::toLowerCase()
+string String::toLowerCase() const
 {
   string copy = this->value;
   transform(copy.begin(), copy.end(), copy.begin(), ::tolower);
@@ -167,7 +168,7 @@ string String::toLowerCase()
   return copy;
 }
 
-string String::toUpperCase()
+string String::toUpperCase() const
 {
   string copy = this->value;
   transform(copy.begin(), copy.end(), copy.begin(), ::toupper);
@@ -187,7 +188,7 @@ string String::_buildCharacterChain(size_t _amount, const char _fillCharacter)
   return fillContent;
 }
 
-string String::_createFillContent(const string &_text, size_t _width, const char _fillCharacter)
+string String::_createFillContent(string_view _text, size_t _width, const char _fillCharacter)
 {
   size_t fillSize = _text.size() > _width ? 0 : _width - _text.size();
   string fillContent{};

+ 2 - 2
source/ls-std/core/Class.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-02-23
+ * Changed:         2023-05-15
  *
  * */
 
@@ -21,7 +21,7 @@ Class::Class(const string &_name)
 
 Class::~Class() = default;
 
-string Class::getClassName()
+string Class::getClassName() const
 {
   return this->name;
 }

+ 2 - 2
source/ls-std/core/LibraryVersion.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-05
-* Changed:         2023-03-05
+* Changed:         2023-06-08
 *
 * */
 
@@ -18,5 +18,5 @@ LibraryVersion::~LibraryVersion() = default;
 
 string LibraryVersion::getVersion()
 {
-  return "2023.2.0";
+  return "2023.2.1";
 }

+ 3 - 2
source/ls-std/core/Version.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-28
- * Changed:         2023-02-23
+ * Changed:         2023-05-16
  *
  * */
 
@@ -17,6 +17,7 @@ using std::regex;
 using std::regex_match;
 using std::stoi;
 using std::string;
+using std::string_view;
 using std::to_string;
 
 Version::Version(version_type _majorVersion, version_type _minorVersion, version_type _patchVersion) : majorVersion(_majorVersion), minorVersion(_minorVersion), patchVersion(_patchVersion)
@@ -90,7 +91,7 @@ void Version::setPatchVersion(version_type _patch)
   this->patchVersion = _patch;
 }
 
-bool Version::_isValid(const string &_versionString)
+bool Version::_isValid(string_view _versionString)
 {
   bool isValidVersionString{};
   static regex versionRegex{R"(\d+[.]\d+[.]\d+)"};

+ 2 - 2
source/ls-std/core/evaluator/IndexOutOfBoundsEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-02-23
+* Changed:         2023-05-16
 *
 * */
 
@@ -18,7 +18,7 @@ using std::string;
 IndexOutOfBoundsEvaluator::IndexOutOfBoundsEvaluator(size_t _index, size_t _size) : index(_index), size(_size)
 {}
 
-IndexOutOfBoundsEvaluator::IndexOutOfBoundsEvaluator(size_t _index, size_t _size, string _message) : index(_index), size(_size), message(::move(_message))
+IndexOutOfBoundsEvaluator::IndexOutOfBoundsEvaluator(size_t _index, size_t _size, string _message) : index(_index), message(::move(_message)), size(_size)
 {}
 
 IndexOutOfBoundsEvaluator::~IndexOutOfBoundsEvaluator() noexcept = default;

+ 1 - 18
source/ls-std/core/evaluator/NullPointerArgumentEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-04-07
+* Changed:         2023-05-23
 *
 * */
 
@@ -17,23 +17,6 @@ using std::move;
 using std::shared_ptr;
 using std::string;
 
-NullPointerArgumentEvaluator::NullPointerArgumentEvaluator(const void *_rawArgument)
-{
-  shared_ptr<void> value{};
-
-  if (_rawArgument != nullptr)
-  {
-    value = make_shared<int>();
-  }
-
-  this->argument = value;
-}
-
-NullPointerArgumentEvaluator::NullPointerArgumentEvaluator(const void *_rawArgument, string _message) : NullPointerArgumentEvaluator(_rawArgument)
-{
-  this->message = ::move(_message);
-}
-
 NullPointerArgumentEvaluator::NullPointerArgumentEvaluator(const shared_ptr<void> &_argument) : argument(_argument)
 {}
 

+ 1 - 18
source/ls-std/core/evaluator/NullPointerEvaluator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-04-04
+* Changed:         2023-05-24
 *
 * */
 
@@ -17,23 +17,6 @@ using std::move;
 using std::shared_ptr;
 using std::string;
 
-NullPointerEvaluator::NullPointerEvaluator(const void *_rawArgument)
-{
-  shared_ptr<void> value{};
-
-  if (_rawArgument != nullptr)
-  {
-    value = make_shared<int>();
-  }
-
-  this->argument = value;
-}
-
-NullPointerEvaluator::NullPointerEvaluator(const void *_rawArgument, string _message) : NullPointerEvaluator(_rawArgument)
-{
-  this->message = ::move(_message);
-}
-
 NullPointerEvaluator::NullPointerEvaluator(const shared_ptr<void> &_argument) : argument(_argument)
 {}
 

+ 3 - 3
source/ls-std/core/exception/EventNotHandledException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 EventNotHandledException::EventNotHandledException() : Exception("EventNotHandledException")
 {}
 
-EventNotHandledException::EventNotHandledException(string _message) : EventNotHandledException()
+EventNotHandledException::EventNotHandledException(const string &_message) : EventNotHandledException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 EventNotHandledException::~EventNotHandledException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/EventNotSubscribedException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 EventNotSubscribedException::EventNotSubscribedException() : Exception("EventNotSubscribedException")
 {}
 
-EventNotSubscribedException::EventNotSubscribedException(string _message) : EventNotSubscribedException()
+EventNotSubscribedException::EventNotSubscribedException(const string &_message) : EventNotSubscribedException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 EventNotSubscribedException::~EventNotSubscribedException() noexcept = default;

+ 7 - 1
source/ls-std/core/exception/Exception.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-22
-* Changed:         2023-03-28
+* Changed:         2023-05-19
 *
 * */
 
@@ -13,6 +13,7 @@
 using ls::std::core::Exception;
 using std::move;
 using std::string;
+using std::string_view;
 
 Exception::Exception(string _name) : name(::move(_name))
 {}
@@ -39,3 +40,8 @@ const char *Exception::_getIdentifiedMessage(const string &_defaultMessage) cons
 
   return ExceptionMessage{concatenatedMessage}.toCharacterPointer();
 }
+
+void Exception::_setMessage(string_view _message)
+{
+  this->message = _message;
+}

+ 8 - 2
source/ls-std/core/exception/ExceptionMessage.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-07
-* Changed:         2023-02-23
+* Changed:         2023-05-24
 *
 * */
 
@@ -25,8 +25,14 @@ char *ExceptionMessage::toCharacterPointer()
 
   if (!this->message.empty())
   {
-    rawPointerMessage = new char[this->message.size() + 1];
+    size_t initializationSize = this->message.size() + 1;
+    rawPointerMessage = new char[initializationSize];
+#if defined(unix) || defined(__APPLE__)
     strcpy(rawPointerMessage, this->message.c_str());
+#endif
+#ifdef _WIN32
+    strcpy_s(rawPointerMessage, initializationSize, this->message.c_str());
+#endif
     rawPointerMessage[this->message.size()] = '\0';
   }
 

+ 3 - 3
source/ls-std/core/exception/FileNotFoundException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 FileNotFoundException::FileNotFoundException() : Exception("FileNotFoundException")
 {}
 
-FileNotFoundException::FileNotFoundException(string _message) : FileNotFoundException()
+FileNotFoundException::FileNotFoundException(const string &_message) : FileNotFoundException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 FileNotFoundException::~FileNotFoundException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/FileOperationException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 FileOperationException::FileOperationException() : Exception("FileOperationException")
 {}
 
-FileOperationException::FileOperationException(string _message) : FileOperationException()
+FileOperationException::FileOperationException(const string &_message) : FileOperationException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 FileOperationException::~FileOperationException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/IllegalArgumentException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 IllegalArgumentException::IllegalArgumentException() : Exception("IllegalArgumentException")
 {}
 
-IllegalArgumentException::IllegalArgumentException(string _message) : IllegalArgumentException()
+IllegalArgumentException::IllegalArgumentException(const string &_message) : IllegalArgumentException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 IllegalArgumentException::~IllegalArgumentException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/IllegalArithmeticOperationException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 IllegalArithmeticOperationException::IllegalArithmeticOperationException() : Exception("IllegalArithmeticOperationException")
 {}
 
-IllegalArithmeticOperationException::IllegalArithmeticOperationException(string _message) : IllegalArithmeticOperationException()
+IllegalArithmeticOperationException::IllegalArithmeticOperationException(const string &_message) : IllegalArithmeticOperationException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 IllegalArithmeticOperationException::~IllegalArithmeticOperationException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/IncompleteJsonException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 IncompleteJsonException::IncompleteJsonException() : Exception("IncompleteJsonException")
 {}
 
-IncompleteJsonException::IncompleteJsonException(string _message) : IncompleteJsonException()
+IncompleteJsonException::IncompleteJsonException(const string &_message) : IncompleteJsonException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 IncompleteJsonException::~IncompleteJsonException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/IndexOutOfBoundsException.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-03-28
+* Changed:         2023-05-19
 *
 * */
 
@@ -18,9 +18,9 @@ using std::string;
 IndexOutOfBoundsException::IndexOutOfBoundsException() : Exception("IndexOutOfBoundsException")
 {}
 
-IndexOutOfBoundsException::IndexOutOfBoundsException(string _message) : IndexOutOfBoundsException()
+IndexOutOfBoundsException::IndexOutOfBoundsException(const string &_message) : IndexOutOfBoundsException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 IndexOutOfBoundsException::~IndexOutOfBoundsException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/NotImplementedException.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-27
-* Changed:         2023-03-28
+* Changed:         2023-05-19
 *
 * */
 
@@ -20,9 +20,9 @@ using std::string;
 NotImplementedException::NotImplementedException() : Exception("NotImplementedException")
 {}
 
-NotImplementedException::NotImplementedException(string _message) : NotImplementedException()
+NotImplementedException::NotImplementedException(const string &_message) : NotImplementedException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 NotImplementedException::~NotImplementedException() noexcept = default;

+ 3 - 3
source/ls-std/core/exception/NullPointerException.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2023-02-04
- * Changed:         2023-03-28
+ * Changed:         2023-05-19
  *
  * */
 
@@ -18,9 +18,9 @@ using std::string;
 NullPointerException::NullPointerException() : Exception("NullPointerException")
 {}
 
-NullPointerException::NullPointerException(string _message) : NullPointerException()
+NullPointerException::NullPointerException(const string &_message) : NullPointerException()
 {
-  this->message = ::move(_message);
+  this->_setMessage(_message);
 }
 
 NullPointerException::~NullPointerException() noexcept = default;

+ 6 - 6
source/ls-std/core/jni/JniApi.cpp

@@ -3,21 +3,21 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-07
-* Changed:         2023-04-11
+* Changed:         2023-05-23
 *
 * */
 
-#include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
+#include <ls-std/core/evaluator/RawNullPointerArgumentEvaluator.hpp>
 #include <ls-std/core/jni/JniApi.hpp>
 
-using ls::std::core::NullPointerArgumentEvaluator;
+using ls::std::core::RawNullPointerArgumentEvaluator;
 using ls::std::core::experimental::JniApi;
+using ls::std::core::type::RawPointer;
 using std::string;
 
-JniApi::JniApi(JNIEnv *_environment)
+JniApi::JniApi(JNIEnv *_environment) : environment(_environment)
 {
-  NullPointerArgumentEvaluator{_environment, "Java environment is not being provided!"}.evaluate();
-  this->environment = _environment;
+  RawNullPointerArgumentEvaluator<JNIEnv>{RawPointer<JNIEnv>{_environment}, "Java environment is not being provided!"}.evaluate();
 }
 
 JniApi::~JniApi() noexcept = default;

+ 10 - 9
source/ls-std/core/jni/JniClass.cpp

@@ -3,14 +3,15 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-07
-* Changed:         2023-04-11
+* Changed:         2023-05-24
 *
 * */
 
 #include <ls-std/core/ConditionalFunctionExecutor.hpp>
 #include <ls-std/core/evaluator/EmptyStringArgumentEvaluator.hpp>
 #include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
-#include <ls-std/core/evaluator/NullPointerEvaluator.hpp>
+#include <ls-std/core/evaluator/RawNullPointerArgumentEvaluator.hpp>
+#include <ls-std/core/evaluator/RawNullPointerEvaluator.hpp>
 #include <ls-std/core/jni/JniApi.hpp>
 #include <ls-std/core/jni/JniClass.hpp>
 #include <memory>
@@ -18,25 +19,25 @@
 using ls::std::core::ConditionalFunctionExecutor;
 using ls::std::core::EmptyStringArgumentEvaluator;
 using ls::std::core::NullPointerArgumentEvaluator;
-using ls::std::core::NullPointerEvaluator;
+using ls::std::core::RawNullPointerArgumentEvaluator;
+using ls::std::core::RawNullPointerEvaluator;
 using ls::std::core::experimental::JniApi;
 using ls::std::core::experimental::JniClass;
 using ls::std::core::experimental::JniClassParameter;
 using ls::std::core::experimental::JniMethod;
 using ls::std::core::experimental::JniReturnValue;
+using ls::std::core::type::RawPointer;
 using std::make_pair;
 using std::make_shared;
 using std::pair;
 using std::shared_ptr;
 using std::string;
 
-JniClass::JniClass(const shared_ptr<JniClassParameter> &_parameter, const string &_path)
+JniClass::JniClass(const shared_ptr<JniClassParameter> &_parameter, const string &_path) : parameter(_parameter), path(_path)
 {
   NullPointerArgumentEvaluator{_parameter, "no provided reference to JNI class parameter!"}.evaluate();
   EmptyStringArgumentEvaluator{_path, "path to associated Java class is empty!"}.evaluate();
-  NullPointerArgumentEvaluator{_parameter->getJavaEnvironment(), "Java environment is not being provided!"}.evaluate();
-  this->parameter = _parameter;
-  this->path = _path;
+  RawNullPointerArgumentEvaluator<JNIEnv>{RawPointer<JNIEnv>{_parameter->getJavaEnvironment()}, "Java environment is not being provided!"}.evaluate();
   ConditionalFunctionExecutor{_parameter->getJniApi() == nullptr}.execute([this]() { _createJniApi(); });
 }
 
@@ -74,7 +75,7 @@ bool JniClass::load()
 
 bool JniClass::loadMethod(const string &_methodIdentifier, const string &_methodSignature)
 {
-  NullPointerEvaluator{this->javaClass, "no Java class reference available for loading class method!"}.evaluate();
+  RawNullPointerEvaluator<_jclass>{RawPointer<_jclass>{this->javaClass}, "no Java class reference available for loading class method!"}.evaluate();
   jmethodID methodId = this->parameter->getJniApi()->getMethodId(this->javaClass, _methodIdentifier.c_str(), _methodSignature.c_str());
   bool succeeded = methodId != nullptr && !this->_hasMethod(_methodIdentifier);
 
@@ -192,7 +193,7 @@ void JniClass::_callShortMethod(const string &_methodIdentifier, JniReturnValue
   }
 }
 
-void JniClass::_createJniApi()
+void JniClass::_createJniApi() const
 {
   this->parameter->setJniApi(make_shared<JniApi>(this->parameter->getJavaEnvironment()));
 }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff