Browse Source

Update code style and apply it

Patrick-Christopher Mattulat 3 years ago
parent
commit
cff4b345ea
100 changed files with 1814 additions and 1279 deletions
  1. 4 0
      config/LynarStudiosStyle.xml
  2. 6 4
      include/ls_std/base/Class.hpp
  3. 3 2
      include/ls_std/base/Types.hpp
  4. 11 9
      include/ls_std/base/Version.hpp
  5. 21 17
      include/ls_std/boxing/Boolean.hpp
  6. 30 28
      include/ls_std/boxing/Double.hpp
  7. 30 28
      include/ls_std/boxing/Float.hpp
  8. 5 3
      include/ls_std/boxing/IBoxing.hpp
  9. 34 31
      include/ls_std/boxing/Integer.hpp
  10. 34 31
      include/ls_std/boxing/Long.hpp
  11. 24 22
      include/ls_std/boxing/String.hpp
  12. 15 13
      include/ls_std/event/Event.hpp
  13. 7 5
      include/ls_std/event/EventHandler.hpp
  14. 12 10
      include/ls_std/event/EventManager.hpp
  15. 3 2
      include/ls_std/event/EventTypes.hpp
  16. 7 5
      include/ls_std/event/IEventSubscriber.hpp
  17. 7 4
      include/ls_std/exception/FileNotFoundException.hpp
  18. 7 4
      include/ls_std/exception/FileOperationException.hpp
  19. 7 4
      include/ls_std/exception/IllegalArgumentException.hpp
  20. 7 4
      include/ls_std/exception/IllegalArithmeticOperationException.hpp
  21. 7 4
      include/ls_std/exception/NullPointerException.hpp
  22. 35 31
      include/ls_std/io/File.hpp
  23. 10 8
      include/ls_std/io/FileOutputStream.hpp
  24. 13 8
      include/ls_std/io/FilePathSeparator.hpp
  25. 7 4
      include/ls_std/io/FilePathSeparatorMatch.hpp
  26. 7 5
      include/ls_std/io/FileReader.hpp
  27. 9 7
      include/ls_std/io/FileWriter.hpp
  28. 5 3
      include/ls_std/io/IReader.hpp
  29. 6 4
      include/ls_std/io/IStorable.hpp
  30. 6 4
      include/ls_std/io/IWriter.hpp
  31. 14 9
      include/ls_std/io/NewLine.hpp
  32. 6 4
      include/ls_std/io/StandardOutputWriter.hpp
  33. 10 8
      include/ls_std/io/StorableFile.hpp
  34. 9 7
      include/ls_std/io/kv/KVDocument.hpp
  35. 10 8
      include/ls_std/io/kv/KVPair.hpp
  36. 7 5
      include/ls_std/io/kv/KVParseData.hpp
  37. 14 12
      include/ls_std/io/kv/KVParser.hpp
  38. 10 8
      include/ls_std/io/kv/KVReader.hpp
  39. 5 4
      include/ls_std/io/kv/KVTypes.hpp
  40. 10 8
      include/ls_std/io/logging/LogLevel.hpp
  41. 6 10
      include/ls_std/io/logging/LogLevelValue.hpp
  42. 16 14
      include/ls_std/io/logging/Logger.hpp
  43. 7 5
      include/ls_std/io/xml/XMLAttribute.hpp
  44. 8 6
      include/ls_std/io/xml/XMLDeclaration.hpp
  45. 9 7
      include/ls_std/io/xml/XMLDocument.hpp
  46. 25 23
      include/ls_std/io/xml/XMLNode.hpp
  47. 7 5
      include/ls_std/io/xml/XMLParseData.hpp
  48. 6 8
      include/ls_std/io/xml/XMLParseMode.hpp
  49. 32 30
      include/ls_std/io/xml/XMLParser.hpp
  50. 5 3
      include/ls_std/io/xml/XMLParserMock.hpp
  51. 10 8
      include/ls_std/io/xml/XMLReader.hpp
  52. 6 4
      include/ls_std/logic/IListener.hpp
  53. 9 7
      include/ls_std/logic/Narrator.hpp
  54. 11 9
      include/ls_std/logic/State.hpp
  55. 8 6
      include/ls_std/logic/StateConnection.hpp
  56. 14 12
      include/ls_std/logic/StateMachine.hpp
  57. 3 2
      include/ls_std/logic/StateMachineTypes.hpp
  58. 2 1
      include/ls_std/ls_std.hpp
  59. 6 4
      include/ls_std/serialization/ISerializable.hpp
  60. 11 9
      include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp
  61. 11 9
      include/ls_std/serialization/boxing/SerializableJSONDouble.hpp
  62. 11 9
      include/ls_std/serialization/boxing/SerializableJSONFloat.hpp
  63. 11 9
      include/ls_std/serialization/boxing/SerializableJSONInteger.hpp
  64. 11 9
      include/ls_std/serialization/boxing/SerializableJSONLong.hpp
  65. 11 9
      include/ls_std/serialization/boxing/SerializableJSONString.hpp
  66. 11 9
      include/ls_std/serialization/event/SerializableJSONEvent.hpp
  67. 11 9
      include/ls_std/serialization/logic/SerializableJSONState.hpp
  68. 11 9
      include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp
  69. 11 9
      include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp
  70. 11 9
      include/ls_std/time/Date.hpp
  71. 5 3
      include/ls_std/utils/RegexUtils.hpp
  72. 18 11
      include/ls_std/utils/STLUtils.hpp
  73. 9 13
      include/ls_std/utils/WindowsUtils.hpp
  74. 10 9
      source/ls_std/base/Version.cpp
  75. 59 32
      source/ls_std/boxing/Boolean.cpp
  76. 111 58
      source/ls_std/boxing/Double.cpp
  77. 105 56
      source/ls_std/boxing/Float.cpp
  78. 44 31
      source/ls_std/boxing/Integer.cpp
  79. 48 33
      source/ls_std/boxing/Long.cpp
  80. 95 50
      source/ls_std/boxing/String.cpp
  81. 16 11
      source/ls_std/event/Event.cpp
  82. 4 3
      source/ls_std/event/EventHandler.cpp
  83. 9 5
      source/ls_std/event/EventManager.cpp
  84. 139 89
      source/ls_std/io/File.cpp
  85. 31 18
      source/ls_std/io/FileOutputStream.cpp
  86. 13 10
      source/ls_std/io/FileReader.cpp
  87. 15 10
      source/ls_std/io/FileWriter.cpp
  88. 9 6
      source/ls_std/io/StorableFile.cpp
  89. 7 5
      source/ls_std/io/kv/KVDocument.cpp
  90. 7 5
      source/ls_std/io/kv/KVPair.cpp
  91. 18 11
      source/ls_std/io/kv/KVParser.cpp
  92. 13 10
      source/ls_std/io/kv/KVReader.cpp
  93. 5 4
      source/ls_std/io/logging/LogLevel.cpp
  94. 22 20
      source/ls_std/io/logging/Logger.cpp
  95. 4 3
      source/ls_std/io/xml/XMLAttribute.cpp
  96. 5 5
      source/ls_std/io/xml/XMLDeclaration.cpp
  97. 6 4
      source/ls_std/io/xml/XMLDocument.cpp
  98. 95 58
      source/ls_std/io/xml/XMLNode.cpp
  99. 94 56
      source/ls_std/io/xml/XMLParser.cpp
  100. 13 10
      source/ls_std/io/xml/XMLReader.cpp

+ 4 - 0
config/LynarStudiosStyle.xml

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

+ 6 - 4
include/ls_std/base/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-14
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,8 +12,10 @@
 
 #include <string>
 
-namespace ls_std {
-  class Class {
+namespace ls_std
+{
+  class Class
+  {
     public:
 
       explicit Class(std::string _name);
@@ -23,7 +25,7 @@ namespace ls_std {
 
     private:
 
-      std::string name {};
+      std::string name{};
   };
 }
 

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

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

+ 11 - 9
include/ls_std/base/Version.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,8 +14,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include "Types.hpp"
 
-namespace ls_std {
-  class Version : public ISerializable {
+namespace ls_std
+{
+  class Version : public ISerializable
+  {
     public:
 
       explicit Version(ls_std::version_type _majorVersion, ls_std::version_type _minorVersion, ls_std::version_type _patchVersion);
@@ -24,25 +26,25 @@ namespace ls_std {
       // implementation
 
       ls_std::byte_field marshal() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // other functionality
 
       ls_std::version_type getMajorVersion() const;
       ls_std::version_type getMinorVersion() const;
       ls_std::version_type getPatchVersion() const;
-      static bool isValid(const std::string& _versionString);
+      static bool isValid(const std::string &_versionString);
       void setMajorVersion(ls_std::version_type _major);
       void setMinorVersion(ls_std::version_type _minor);
       void setPatchVersion(ls_std::version_type _patch);
 
     private:
 
-      ls_std::version_type majorVersion {};
-      ls_std::version_type minorVersion {};
-      ls_std::version_type patchVersion {};
+      ls_std::version_type majorVersion{};
+      ls_std::version_type minorVersion{};
+      ls_std::version_type patchVersion{};
 
-      static bool _isValid(const std::string& _versionString);
+      static bool _isValid(const std::string &_versionString);
   };
 }
 

+ 21 - 17
include/ls_std/boxing/Boolean.hpp

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

+ 30 - 28
include/ls_std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,8 +16,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/io/IStorable.hpp>
 
-namespace ls_std {
-  class Double : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class Double : public Class, public IBoxing, public ISerializable, public IStorable
+  {
     public:
 
       Double();
@@ -30,44 +32,44 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Double& operator=(double _value);
+      ls_std::Double &operator=(double _value);
 
       // arithmetic operators
 
       double operator-() const;
-      double operator+(const ls_std::Double& _double) const;
+      double operator+(const ls_std::Double &_double) const;
       double operator+(double _value) const;
-      double operator*(const ls_std::Double& _double) const;
+      double operator*(const ls_std::Double &_double) const;
       double operator*(double _value) const;
-      double operator-(const ls_std::Double& _double) const;
+      double operator-(const ls_std::Double &_double) const;
       double operator-(double _value) const;
-      double operator/(const ls_std::Double& _double) const;
+      double operator/(const ls_std::Double &_double) const;
       double operator/(double _value) const;
 
       // compound operators
 
-      ls_std::Double& operator+=(const ls_std::Double& _double);
-      ls_std::Double& operator+=(double _value);
-      ls_std::Double& operator-=(const ls_std::Double& _double);
-      ls_std::Double& operator-=(double _value);
-      ls_std::Double& operator*=(const ls_std::Double& _double);
-      ls_std::Double& operator*=(double _value);
-      ls_std::Double& operator/=(const ls_std::Double& _double);
-      ls_std::Double& operator/=(double _value);
+      ls_std::Double &operator+=(const ls_std::Double &_double);
+      ls_std::Double &operator+=(double _value);
+      ls_std::Double &operator-=(const ls_std::Double &_double);
+      ls_std::Double &operator-=(double _value);
+      ls_std::Double &operator*=(const ls_std::Double &_double);
+      ls_std::Double &operator*=(double _value);
+      ls_std::Double &operator/=(const ls_std::Double &_double);
+      ls_std::Double &operator/=(double _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Double& _double) const;
+      bool operator==(const ls_std::Double &_double) const;
       bool operator==(double _value) const;
-      bool operator!=(const ls_std::Double& _double) const;
+      bool operator!=(const ls_std::Double &_double) const;
       bool operator!=(double _value) const;
-      bool operator>(const ls_std::Double& _double) const;
+      bool operator>(const ls_std::Double &_double) const;
       bool operator>(double _value) const;
-      bool operator>=(const ls_std::Double& _double) const;
+      bool operator>=(const ls_std::Double &_double) const;
       bool operator>=(double _value) const;
-      bool operator<(const ls_std::Double& _double) const;
+      bool operator<(const ls_std::Double &_double) const;
       bool operator<(double _value) const;
-      bool operator<=(const ls_std::Double& _double) const;
+      bool operator<=(const ls_std::Double &_double) const;
       bool operator<=(double _value) const;
 
       // increment / decrement operator
@@ -80,9 +82,9 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
@@ -94,10 +96,10 @@ namespace ls_std {
 
     private:
 
-      double epsilon {};
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      double value {};
+      double epsilon{};
+      std::shared_ptr<ISerializable> serializable{};
+      std::shared_ptr<IStorable> storable{};
+      double value{};
   };
 }
 

+ 30 - 28
include/ls_std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,8 +16,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/io/IStorable.hpp>
 
-namespace ls_std {
-  class Float : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class Float : public Class, public IBoxing, public ISerializable, public IStorable
+  {
     public:
 
       Float();
@@ -30,44 +32,44 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Float& operator=(float _value);
+      ls_std::Float &operator=(float _value);
 
       // arithmetic operators
 
       float operator-() const;
-      float operator+(const ls_std::Float& _float) const;
+      float operator+(const ls_std::Float &_float) const;
       float operator+(float _value) const;
-      float operator*(const ls_std::Float& _float) const;
+      float operator*(const ls_std::Float &_float) const;
       float operator*(float _value) const;
-      float operator-(const ls_std::Float& _float) const;
+      float operator-(const ls_std::Float &_float) const;
       float operator-(float _value) const;
-      float operator/(const ls_std::Float& _float) const;
+      float operator/(const ls_std::Float &_float) const;
       float operator/(float _value) const;
 
       // compound operators
 
-      ls_std::Float& operator+=(const ls_std::Float& _float);
-      ls_std::Float& operator+=(float _value);
-      ls_std::Float& operator-=(const ls_std::Float& _float);
-      ls_std::Float& operator-=(float _value);
-      ls_std::Float& operator*=(const ls_std::Float& _float);
-      ls_std::Float& operator*=(float _value);
-      ls_std::Float& operator/=(const ls_std::Float& _float);
-      ls_std::Float& operator/=(float _value);
+      ls_std::Float &operator+=(const ls_std::Float &_float);
+      ls_std::Float &operator+=(float _value);
+      ls_std::Float &operator-=(const ls_std::Float &_float);
+      ls_std::Float &operator-=(float _value);
+      ls_std::Float &operator*=(const ls_std::Float &_float);
+      ls_std::Float &operator*=(float _value);
+      ls_std::Float &operator/=(const ls_std::Float &_float);
+      ls_std::Float &operator/=(float _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Float& _float) const;
+      bool operator==(const ls_std::Float &_float) const;
       bool operator==(float _value) const;
-      bool operator!=(const ls_std::Float& _float) const;
+      bool operator!=(const ls_std::Float &_float) const;
       bool operator!=(float _value) const;
-      bool operator>(const ls_std::Float& _float) const;
+      bool operator>(const ls_std::Float &_float) const;
       bool operator>(float _value) const;
-      bool operator>=(const ls_std::Float& _float) const;
+      bool operator>=(const ls_std::Float &_float) const;
       bool operator>=(float _value) const;
-      bool operator<(const ls_std::Float& _float) const;
+      bool operator<(const ls_std::Float &_float) const;
       bool operator<(float _value) const;
-      bool operator<=(const ls_std::Float& _float) const;
+      bool operator<=(const ls_std::Float &_float) const;
       bool operator<=(float _value) const;
 
       // increment / decrement operator
@@ -80,9 +82,9 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
@@ -94,10 +96,10 @@ namespace ls_std {
 
     private:
 
-      float epsilon {};
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      float value {};
+      float epsilon{};
+      std::shared_ptr<ISerializable> serializable{};
+      std::shared_ptr<IStorable> storable{};
+      float value{};
   };
 }
 

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

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

+ 34 - 31
include/ls_std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,8 +16,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/io/IStorable.hpp>
 
-namespace ls_std {
-  class Integer : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class Integer : public Class, public IBoxing, public ISerializable, public IStorable
+  {
     public:
 
       explicit Integer(int _value);
@@ -30,58 +32,59 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Integer& operator=(int _value);
+      ls_std::Integer &operator=(int _value);
 
       // arithmetic operators
 
       int operator-() const;
-      int operator+(const ls_std::Integer& _integer) const;
+      int operator+(const ls_std::Integer &_integer) const;
       int operator+(int _value) const;
-      int operator*(const ls_std::Integer& _integer) const;
+      int operator*(const ls_std::Integer &_integer) const;
       int operator*(int _value) const;
-      int operator-(const ls_std::Integer& _integer) const;
+      int operator-(const ls_std::Integer &_integer) const;
       int operator-(int _value) const;
-      int operator/(const ls_std::Integer& _integer) const;
+      int operator/(const ls_std::Integer &_integer) const;
       int operator/(int _value) const;
-      int operator%(const ls_std::Integer& _integer) const;
+      int operator%(const ls_std::Integer &_integer) const;
       int operator%(int _value) const;
 
       // compound operators
 
-      ls_std::Integer& operator+=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator+=(int _value);
-      ls_std::Integer& operator-=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator-=(int _value);
-      ls_std::Integer& operator*=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator*=(int _value);
-      ls_std::Integer& operator/=(const ls_std::Integer& _integer);
-      ls_std::Integer& operator/=(int _value);
+      ls_std::Integer &operator+=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator+=(int _value);
+      ls_std::Integer &operator-=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator-=(int _value);
+      ls_std::Integer &operator*=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator*=(int _value);
+      ls_std::Integer &operator/=(const ls_std::Integer &_integer);
+      ls_std::Integer &operator/=(int _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Integer& _integer) const;
+      bool operator==(const ls_std::Integer &_integer) const;
       bool operator==(int _value) const;
-      bool operator!=(const ls_std::Integer& _integer) const;
+      bool operator!=(const ls_std::Integer &_integer) const;
       bool operator!=(int _value) const;
-      bool operator>(const ls_std::Integer& _integer) const;
+      bool operator>(const ls_std::Integer &_integer) const;
       bool operator>(int _value) const;
-      bool operator>=(const ls_std::Integer& _integer) const;
+      bool operator>=(const ls_std::Integer &_integer) const;
       bool operator>=(int _value) const;
-      bool operator<(const ls_std::Integer& _integer) const;
+      bool operator<(const ls_std::Integer &_integer) const;
       bool operator<(int _value) const;
-      bool operator<=(const ls_std::Integer& _integer) const;
+      bool operator<=(const ls_std::Integer &_integer) const;
       bool operator<=(int _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls_std::Integer& _integer) {
+      friend bool operator!(const ls_std::Integer &_integer)
+      {
         return !_integer.value;
       }
 
-      bool operator&&(const ls_std::Integer& _integer) const;
+      bool operator&&(const ls_std::Integer &_integer) const;
       bool operator&&(int _value) const;
       bool operator&&(bool _expression) const;
-      bool operator||(const ls_std::Integer& _integer) const;
+      bool operator||(const ls_std::Integer &_integer) const;
       bool operator||(int _value) const;
       bool operator||(bool _expression) const;
 
@@ -95,9 +98,9 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
@@ -107,9 +110,9 @@ namespace ls_std {
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      int value {};
+      std::shared_ptr<ISerializable> serializable{};
+      std::shared_ptr<IStorable> storable{};
+      int value{};
   };
 }
 

+ 34 - 31
include/ls_std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -17,8 +17,10 @@
 #include <ls_std/serialization/ISerializable.hpp>
 #include <ls_std/io/IStorable.hpp>
 
-namespace ls_std {
-  class Long : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class Long : public Class, public IBoxing, public ISerializable, public IStorable
+  {
     public:
 
       explicit Long(ls_std::long_type _value);
@@ -31,58 +33,59 @@ namespace ls_std {
 
       // assignment operators
 
-      ls_std::Long& operator=(ls_std::long_type _value);
+      ls_std::Long &operator=(ls_std::long_type _value);
 
       // arithmetic operators
 
       ls_std::long_type operator-() const;
-      ls_std::long_type operator+(const ls_std::Long& _long) const;
+      ls_std::long_type operator+(const ls_std::Long &_long) const;
       ls_std::long_type operator+(ls_std::long_type _value) const;
-      ls_std::long_type operator*(const ls_std::Long& _long) const;
+      ls_std::long_type operator*(const ls_std::Long &_long) const;
       ls_std::long_type operator*(ls_std::long_type _value) const;
-      ls_std::long_type operator-(const ls_std::Long& _long) const;
+      ls_std::long_type operator-(const ls_std::Long &_long) const;
       ls_std::long_type operator-(ls_std::long_type _value) const;
-      ls_std::long_type operator/(const ls_std::Long& _long) const;
+      ls_std::long_type operator/(const ls_std::Long &_long) const;
       ls_std::long_type operator/(ls_std::long_type _value) const;
-      ls_std::long_type operator%(const ls_std::Long& _long) const;
+      ls_std::long_type operator%(const ls_std::Long &_long) const;
       ls_std::long_type operator%(ls_std::long_type _value) const;
 
       // compound operators
 
-      ls_std::Long& operator+=(const ls_std::Long& _long);
-      ls_std::Long& operator+=(ls_std::long_type _value);
-      ls_std::Long& operator-=(const ls_std::Long& _long);
-      ls_std::Long& operator-=(ls_std::long_type _value);
-      ls_std::Long& operator*=(const ls_std::Long& _long);
-      ls_std::Long& operator*=(ls_std::long_type _value);
-      ls_std::Long& operator/=(const ls_std::Long& _long);
-      ls_std::Long& operator/=(ls_std::long_type _value);
+      ls_std::Long &operator+=(const ls_std::Long &_long);
+      ls_std::Long &operator+=(ls_std::long_type _value);
+      ls_std::Long &operator-=(const ls_std::Long &_long);
+      ls_std::Long &operator-=(ls_std::long_type _value);
+      ls_std::Long &operator*=(const ls_std::Long &_long);
+      ls_std::Long &operator*=(ls_std::long_type _value);
+      ls_std::Long &operator/=(const ls_std::Long &_long);
+      ls_std::Long &operator/=(ls_std::long_type _value);
 
       // comparison operators
 
-      bool operator==(const ls_std::Long& _long) const;
+      bool operator==(const ls_std::Long &_long) const;
       bool operator==(ls_std::long_type _value) const;
-      bool operator!=(const ls_std::Long& _long) const;
+      bool operator!=(const ls_std::Long &_long) const;
       bool operator!=(ls_std::long_type _value) const;
-      bool operator>(const ls_std::Long& _long) const;
+      bool operator>(const ls_std::Long &_long) const;
       bool operator>(ls_std::long_type _value) const;
-      bool operator>=(const ls_std::Long& _long) const;
+      bool operator>=(const ls_std::Long &_long) const;
       bool operator>=(ls_std::long_type _value) const;
-      bool operator<(const ls_std::Long& _long) const;
+      bool operator<(const ls_std::Long &_long) const;
       bool operator<(ls_std::long_type _value) const;
-      bool operator<=(const ls_std::Long& _long) const;
+      bool operator<=(const ls_std::Long &_long) const;
       bool operator<=(ls_std::long_type _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls_std::Long& _long) {
+      friend bool operator!(const ls_std::Long &_long)
+      {
         return !_long.value;
       }
 
-      bool operator&&(const ls_std::Long& _long) const;
+      bool operator&&(const ls_std::Long &_long) const;
       bool operator&&(ls_std::long_type _value) const;
       bool operator&&(bool _expression) const;
-      bool operator||(const ls_std::Long& _long) const;
+      bool operator||(const ls_std::Long &_long) const;
       bool operator||(ls_std::long_type _value) const;
       bool operator||(bool _expression) const;
 
@@ -96,9 +99,9 @@ namespace ls_std {
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
@@ -108,9 +111,9 @@ namespace ls_std {
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      ls_std::long_type value {};
+      std::shared_ptr<ISerializable> serializable{};
+      std::shared_ptr<IStorable> storable{};
+      ls_std::long_type value{};
   };
 }
 

+ 24 - 22
include/ls_std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -18,8 +18,10 @@
 #include <memory>
 #include <vector>
 
-namespace ls_std {
-  class String : public Class, public IBoxing, public ISerializable, public IStorable {
+namespace ls_std
+{
+  class String : public Class, public IBoxing, public ISerializable, public IStorable
+  {
     public:
 
       String();
@@ -28,47 +30,47 @@ namespace ls_std {
 
       // conversion operator
 
-      operator const char*() const; // do not make explicit!
+      operator const char *() const; // do not make explicit!
       operator std::string() const; // do not make explicit!
 
       // assignment operators
 
-      ls_std::String& operator=(std::string _value);
+      ls_std::String &operator=(std::string _value);
 
       // arithmetic operators
 
       std::string operator+(ls_std::String _string) const;
-      std::string operator+(const std::string& _string) const;
-      std::string operator+(const char* _string) const;
+      std::string operator+(const std::string &_string) const;
+      std::string operator+(const char *_string) const;
       std::string operator-(int _number);
 
       // compound operators
 
-      ls_std::String& operator+=(ls_std::String _string);
-      ls_std::String& operator+=(const std::string& _text);
+      ls_std::String &operator+=(ls_std::String _string);
+      ls_std::String &operator+=(const std::string &_text);
 
       // comparison operators
 
       bool operator==(ls_std::String _string);
-      bool operator==(const std::string& _value);
-      bool operator==(const char* _value);
+      bool operator==(const std::string &_value);
+      bool operator==(const char *_value);
       bool operator!=(ls_std::String _string);
-      bool operator!=(const std::string& _value);
-      bool operator!=(const char* _value);
+      bool operator!=(const std::string &_value);
+      bool operator!=(const char *_value);
 
       // implementation
 
       ls_std::byte_field load() override;
       ls_std::byte_field marshal() override;
       void parse(std::string _parseText) override;
-      void save(const ls_std::byte_field& _data) override;
+      void save(const ls_std::byte_field &_data) override;
       std::string toString() override;
-      void unmarshal(const ls_std::byte_field& _data) override;
+      void unmarshal(const ls_std::byte_field &_data) override;
 
       // additional functionality
 
-      bool contains(const std::string& _text);
-      bool endsWith(const std::string& _text);
+      bool contains(const std::string &_text);
+      bool endsWith(const std::string &_text);
       bool equalsIgnoreCase(ls_std::String _string);
       bool equalsIgnoreCase(std::string _text);
       std::vector<ls_std::byte> getByteData();
@@ -77,18 +79,18 @@ namespace ls_std {
       std::string reverse();
       void setSerializable(std::shared_ptr<ISerializable> _serializable);
       void setStorable(std::shared_ptr<IStorable> _storable);
-      bool startsWith(const std::string& _text);
+      bool startsWith(const std::string &_text);
       std::string toLowerCase();
       std::string toUpperCase();
 
     private:
 
-      std::shared_ptr<ISerializable> serializable {};
-      std::shared_ptr<IStorable> storable {};
-      std::string value {};
+      std::shared_ptr<ISerializable> serializable{};
+      std::shared_ptr<IStorable> storable{};
+      std::string value{};
 
       static std::string _buildCharacterChain(size_t _amount, char _fillCharacter);
-      static std::string _createFillContent(const std::string& _text, size_t _width, char _fillCharacter);
+      static std::string _createFillContent(const std::string &_text, size_t _width, char _fillCharacter);
   };
 }
 

+ 15 - 13
include/ls_std/event/Event.hpp

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

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

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

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

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

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,7 +14,8 @@
 #include <vector>
 #include <map>
 
-namespace ls_std {
+namespace ls_std
+{
   using event_id = std::string;
   using event_parameter_id = std::string;
   using event_parameter_value = std::string;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 10 - 8
include/ls_std/io/logging/LogLevel.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,24 +14,26 @@
 #include <ls_std/base/Class.hpp>
 #include "LogLevelValue.hpp"
 
-namespace ls_std {
-  class LogLevel : public Class {
+namespace ls_std
+{
+  class LogLevel : public Class
+  {
     public:
 
-      explicit LogLevel(const ls_std::LogLevelValue& _value);
+      explicit LogLevel(const ls_std::LogLevelValue &_value);
       LogLevel();
       ~LogLevel() override = default;
 
       operator unsigned char() const;
-      LogLevel& operator=(const ls_std::LogLevelValue& _value);
-      bool operator<=(const ls_std::LogLevelValue& _value);
+      LogLevel &operator=(const ls_std::LogLevelValue &_value);
+      bool operator<=(const ls_std::LogLevelValue &_value);
 
       std::string toString() const;
 
     private:
 
-      std::unordered_map<uint8_t , std::string> level {};
-      ls_std::LogLevelValue value {};
+      std::unordered_map<uint8_t, std::string> level{};
+      ls_std::LogLevelValue value{};
 
       void _init();
   };

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

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

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

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

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

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

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

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

+ 9 - 7
include/ls_std/io/xml/XMLDocument.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -15,8 +15,10 @@
 #include "XMLNode.hpp"
 #include "XMLDeclaration.hpp"
 
-namespace ls_std {
-  class XMLDocument : public Class {
+namespace ls_std
+{
+  class XMLDocument : public Class
+  {
     public:
 
       XMLDocument();
@@ -24,14 +26,14 @@ namespace ls_std {
 
       std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
       std::shared_ptr<ls_std::XMLNode> getRootElement();
-      void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration>& _declaration);
-      void setRootElement(const std::shared_ptr<ls_std::XMLNode>& _root);
+      void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration> &_declaration);
+      void setRootElement(const std::shared_ptr<ls_std::XMLNode> &_root);
       std::string toXML();
 
     private:
 
-      std::shared_ptr<ls_std::XMLDeclaration> declaration {};
-      std::shared_ptr<ls_std::XMLNode> rootElement {};
+      std::shared_ptr<ls_std::XMLDeclaration> declaration{};
+      std::shared_ptr<ls_std::XMLNode> rootElement{};
   };
 }
 

+ 25 - 23
include/ls_std/io/xml/XMLNode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -15,30 +15,32 @@
 #include <ls_std/base/Class.hpp>
 #include "XMLAttribute.hpp"
 
-namespace ls_std {
-  class XMLNode : public Class {
+namespace ls_std
+{
+  class XMLNode : public Class
+  {
     public:
 
       explicit XMLNode(std::string _name);
       ~XMLNode() override = default;
 
-      bool addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);
-      bool addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);
-      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute>& _attribute);
-      bool addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute>& _attribute);
-      bool addChildAfter(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search);
-      bool addChildBefore(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search);
-      bool addChildToBeginning(const std::shared_ptr<ls_std::XMLNode>& _child);
-      bool addChildToEnd(const std::shared_ptr<ls_std::XMLNode>& _child);
+      bool addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name);
+      bool addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name);
+      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
+      bool addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
+      bool addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
+      bool addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
+      bool addChildToBeginning(const std::shared_ptr<ls_std::XMLNode> &_child);
+      bool addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_child);
       void clearValue();
       std::list<std::shared_ptr<ls_std::XMLAttribute>> getAttributes();
       std::list<std::shared_ptr<ls_std::XMLNode>> getChildren();
-      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren(const std::string& _name);
+      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren(const std::string &_name);
       std::string getName();
       std::string getValue();
-      bool hasAttribute(const std::string& _name);
-      bool hasChild(const std::string& _name);
-      bool hasChild(const std::shared_ptr<ls_std::XMLNode>& _child);
+      bool hasAttribute(const std::string &_name);
+      bool hasChild(const std::string &_name);
+      bool hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
       void removeFirstAttribute();
       void removeLastAttribute();
       void removeFirstChild();
@@ -53,16 +55,16 @@ namespace ls_std {
 
     private:
 
-      std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes {};
-      std::list<std::shared_ptr<ls_std::XMLNode>> children {};
-      std::string name {};
-      const static uint8_t TAB_SIZE {4};
-      std::string value {};
+      std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes{};
+      std::list<std::shared_ptr<ls_std::XMLNode>> children{};
+      std::string name{};
+      const static uint8_t TAB_SIZE{4};
+      std::string value{};
 
       static std::string _getTab(uint8_t _tabSize);
-      bool _hasAttribute(const std::string& _name);
-      bool _hasChild(const std::shared_ptr<ls_std::XMLNode>& _child);
-      bool _hasChild(const std::string& _name);
+      bool _hasAttribute(const std::string &_name);
+      bool _hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
+      bool _hasChild(const std::string &_name);
       std::string _toXMLAttributes();
       std::string _toXMLChildren(uint8_t _tabSize);
       std::string _toXMLCloseTag();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 11 - 9
include/ls_std/logic/State.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -16,28 +16,30 @@
 #include "StateMachineTypes.hpp"
 #include "StateConnection.hpp"
 
-namespace ls_std {
-  class State : public ls_std::Class {
+namespace ls_std
+{
+  class State : public ls_std::Class
+  {
     public:
 
       explicit State(ls_std::StateId _id);
       ~State() override = default;
 
-      bool addStateConnection(const ls_std::StateConnectionId& _connectionId, const std::shared_ptr<ls_std::State>& _connectedState);
-      bool addStateConnection(const std::shared_ptr<ls_std::StateConnection>& _connection);
+      bool addStateConnection(const ls_std::StateConnectionId &_connectionId, const std::shared_ptr<ls_std::State> &_connectedState);
+      bool addStateConnection(const std::shared_ptr<ls_std::StateConnection> &_connection);
       void clearConnections();
       std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> getConnectedStates();
       ls_std::StateId getId();
-      bool hasConnection(const ls_std::StateConnectionId& _connectionId);
+      bool hasConnection(const ls_std::StateConnectionId &_connectionId);
       void setId(ls_std::StateId _id);
 
     private:
 
-      std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> connectedStates {};
-      ls_std::StateId id {};
+      std::unordered_map<ls_std::StateConnectionId, std::shared_ptr<ls_std::StateConnection>> connectedStates{};
+      ls_std::StateId id{};
 
       void _clearConnections();
-      bool _hasConnection(const ls_std::StateConnectionId& _connectionId);
+      bool _hasConnection(const ls_std::StateConnectionId &_connectionId);
   };
 }
 

+ 8 - 6
include/ls_std/logic/StateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,8 +14,10 @@
 #include <ls_std/base/Class.hpp>
 #include "StateMachineTypes.hpp"
 
-namespace ls_std {
-  class StateConnection : public Class {
+namespace ls_std
+{
+  class StateConnection : public Class
+  {
     public:
 
       explicit StateConnection(ls_std::StateConnectionId _connectionId, ls_std::StateId _stateId);
@@ -30,9 +32,9 @@ namespace ls_std {
 
     private:
 
-      bool condition {};
-      ls_std::StateConnectionId connectionId {};
-      ls_std::StateId stateId {};
+      bool condition{};
+      ls_std::StateConnectionId connectionId{};
+      ls_std::StateId stateId{};
   };
 }
 

+ 14 - 12
include/ls_std/logic/StateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -18,34 +18,36 @@
 #include "State.hpp"
 #include "StateMachineTypes.hpp"
 
-namespace ls_std {
-  class StateMachine : public Class {
+namespace ls_std
+{
+  class StateMachine : public Class
+  {
     public:
 
       explicit StateMachine(std::string _name);
       ~StateMachine() override = default;
 
-      bool addState(const std::shared_ptr<ls_std::State>& _state);
+      bool addState(const std::shared_ptr<ls_std::State> &_state);
       std::shared_ptr<ls_std::State> getCurrentState();
       std::vector<ls_std::StateId> getMemory();
       std::string getName();
       std::unordered_map<StateId, std::shared_ptr<ls_std::State>> getStates();
-      bool hasState(const ls_std::StateId& _id);
+      bool hasState(const ls_std::StateId &_id);
       bool proceed();
       void setMemory(std::vector<ls_std::StateId> _memory);
       void setName(std::string _name);
-      bool setStartState(const ls_std::StateId& _id);
+      bool setStartState(const ls_std::StateId &_id);
 
     private:
 
-      std::shared_ptr<State> currentState {};
-      std::vector<ls_std::StateId> memory {};
-      std::string name {};
-      std::unordered_map<ls_std::StateId, std::shared_ptr<ls_std::State>> states {};
+      std::shared_ptr<State> currentState{};
+      std::vector<ls_std::StateId> memory{};
+      std::string name{};
+      std::unordered_map<ls_std::StateId, std::shared_ptr<ls_std::State>> states{};
 
       std::vector<ls_std::StateId> _getNextValidStates();
-      void _remember(const ls_std::StateId& _id);
-      bool _hasState(const ls_std::StateId& _id);
+      void _remember(const ls_std::StateId &_id);
+      bool _hasState(const ls_std::StateId &_id);
   };
 }
 

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

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

+ 2 - 1
include/ls_std/ls_std.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-29
- * Changed:         2021-04-22
+ * Changed:         2021-04-23
  *
  * */
 
@@ -80,6 +80,7 @@
 
 #include "utils/RegexUtils.hpp"
 #include "utils/STLUtils.hpp"
+
 #if _WIN32
 #include "utils/WindowsUtils.hpp"
 #endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 10 - 9
source/ls_std/base/Version.cpp

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

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

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

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

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

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

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

+ 44 - 31
source/ls_std/boxing/Integer.cpp

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

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

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

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

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

+ 16 - 11
source/ls_std/event/Event.cpp

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

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

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

+ 9 - 5
source/ls_std/event/EventManager.cpp

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

+ 139 - 89
source/ls_std/io/File.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -18,15 +18,18 @@
 #include <sys/stat.h>
 
 #if defined(unix) || defined(__APPLE__)
+
 #include <unistd.h>
+
 #endif
 
 #ifdef _WIN32
 #include <direct.h>
 #endif
 
-ls_std::File::File(std::string _absoluteFilePath) : ls_std::Class("File"),
-absoluteFilePath(ls_std::File::_normalizePath(std::move(_absoluteFilePath)))
+ls_std::File::File(std::string _absoluteFilePath)
+    : ls_std::Class("File"),
+      absoluteFilePath(ls_std::File::_normalizePath(std::move(_absoluteFilePath)))
 {}
 
 bool ls_std::File::operator==(ls_std::File &_file)
@@ -49,10 +52,10 @@ bool ls_std::File::canRead()
   bool readable;
 
   #if defined(unix) || defined(__APPLE__)
-    readable = ls_std::File::_isReadableUnix(this->absoluteFilePath);
+  readable = ls_std::File::_isReadableUnix(this->absoluteFilePath);
   #endif
   #ifdef _WIN32
-    readable = ls_std::File::_isReadableWindows(this->absoluteFilePath);
+  readable = ls_std::File::_isReadableWindows(this->absoluteFilePath);
   #endif
 
   return readable;
@@ -65,10 +68,13 @@ bool ls_std::File::canWrite()
 
 void ls_std::File::createNewFile()
 {
-  if(!ls_std::File::_exists(this->absoluteFilePath)) {
-    std::ofstream file {this->absoluteFilePath};
+  if (!ls_std::File::_exists(this->absoluteFilePath))
+  {
+    std::ofstream file{this->absoluteFilePath};
     file.close();
-  } else {
+  }
+  else
+  {
     throw ls_std::FileOperationException{};
   }
 }
@@ -78,7 +84,8 @@ bool ls_std::File::exists()
   return ls_std::File::_exists(this->absoluteFilePath);
 }
 
-std::string ls_std::File::getAbsoluteFilePath() {
+std::string ls_std::File::getAbsoluteFilePath()
+{
   return this->absoluteFilePath;
 }
 
@@ -88,7 +95,8 @@ std::string ls_std::File::getName()
 
   // if it's a directory, remove separator from end, if it does exist
 
-  if(ls_std::File::_isDirectory(this->absoluteFilePath)) {
+  if (ls_std::File::_isDirectory(this->absoluteFilePath))
+  {
     copy.erase(std::remove_if(copy.end() - 1, copy.end(), ls_std::FilePathSeparatorMatch()), copy.end());
   }
 
@@ -105,9 +113,10 @@ std::string ls_std::File::getParent()
 
 long ls_std::File::getSize()
 {
-  std::streampos fileSize {};
+  std::streampos fileSize{};
 
-  if(ls_std::File::_exists(this->absoluteFilePath)) {
+  if (ls_std::File::_exists(this->absoluteFilePath))
+  {
     std::ifstream fileHandler{this->absoluteFilePath, std::ios::in};
     fileSize = fileHandler.tellg();
     fileHandler.seekg(0, std::ios::end);
@@ -135,9 +144,10 @@ time_t ls_std::File::lastModified()
 
 std::list<std::string> ls_std::File::list()
 {
-  std::list<std::string> fileList {};
+  std::list<std::string> fileList{};
 
-  if(ls_std::File::_isDirectory(this->absoluteFilePath)) {
+  if (ls_std::File::_isDirectory(this->absoluteFilePath))
+  {
     fileList = ls_std::File::_list(this->absoluteFilePath);
   }
 
@@ -146,9 +156,10 @@ std::list<std::string> ls_std::File::list()
 
 std::list<std::string> ls_std::File::listFiles()
 {
-  std::list<std::string> fileList {};
+  std::list<std::string> fileList{};
 
-  if(ls_std::File::_isDirectory(this->absoluteFilePath)) {
+  if (ls_std::File::_isDirectory(this->absoluteFilePath))
+  {
     fileList = ls_std::File::_listFiles(this->absoluteFilePath);
   }
 
@@ -157,20 +168,24 @@ std::list<std::string> ls_std::File::listFiles()
 
 void ls_std::File::makeDirectory()
 {
-  if(ls_std::File::_mkdir(this->absoluteFilePath)) {
-    throw ls_std::FileOperationException {};
+  if (ls_std::File::_mkdir(this->absoluteFilePath))
+  {
+    throw ls_std::FileOperationException{};
   }
 }
 
-void ls_std::File::makeDirectories() {
+void ls_std::File::makeDirectories()
+{
   std::vector<std::string> subDirectories = ls_std::File::_splitIntoSubDirectoryNames(this->absoluteFilePath);
   const char separator = ls_std::FilePathSeparator::get();
-  std::string currentHierarchy {};
+  std::string currentHierarchy{};
 
-  for(const auto& subDirectory : subDirectories) {
+  for (const auto &subDirectory : subDirectories)
+  {
     currentHierarchy += subDirectory;
 
-    if(!ls_std::File::_exists(currentHierarchy)) {
+    if (!ls_std::File::_exists(currentHierarchy))
+    {
       ls_std::File::_mkdir(currentHierarchy);
     }
 
@@ -180,13 +195,16 @@ void ls_std::File::makeDirectories() {
 
 void ls_std::File::remove()
 {
-  if(ls_std::File::_isFile(this->absoluteFilePath)) {
-    if(std::remove(this->absoluteFilePath.c_str())) {
+  if (ls_std::File::_isFile(this->absoluteFilePath))
+  {
+    if (std::remove(this->absoluteFilePath.c_str()))
+    {
       throw ls_std::FileOperationException{};
     }
   }
 
-  if(ls_std::File::_isDirectory(this->absoluteFilePath)) {
+  if (ls_std::File::_isDirectory(this->absoluteFilePath))
+  {
     ls_std::File::_remove(this->absoluteFilePath);
   }
 }
@@ -195,7 +213,8 @@ bool ls_std::File::renameTo(const std::string &_newName)
 {
   bool renamed = ls_std::File::_renameTo(this->absoluteFilePath, _newName);
 
-  if(renamed) {
+  if (renamed)
+  {
     this->absoluteFilePath = _newName;
   }
 
@@ -224,26 +243,33 @@ void ls_std::File::_addToFileListWindows(const std::string& _path, bool _withDir
 #endif
 
 #if defined(unix) || defined(__APPLE__)
-void ls_std::File::_addToFileListUnix(const std::string& _path, bool _withDirectories, dirent* directoryEntity, std::list<std::string>& _list)
+
+void ls_std::File::_addToFileListUnix(const std::string &_path, bool _withDirectories, dirent *directoryEntity, std::list<std::string> &_list)
 {
   const char separator = ls_std::FilePathSeparator::get();
   std::string absolutePath = _path + separator + directoryEntity->d_name;
 
-  if(_withDirectories) {
+  if (_withDirectories)
+  {
     _list.emplace_back(absolutePath);
-  } else {
-    if(ls_std::File::_isFile(absolutePath)) {
+  }
+  else
+  {
+    if (ls_std::File::_isFile(absolutePath))
+    {
       _list.emplace_back(absolutePath);
     }
   }
 }
+
 #endif
 
 bool ls_std::File::_equals(ls_std::File &_file, ls_std::File &_foreignFile)
 {
   bool isEqual = _file.getAbsoluteFilePath() == _foreignFile.getAbsoluteFilePath();
 
-  if(_file.exists() && _foreignFile.exists()) {
+  if (_file.exists() && _foreignFile.exists())
+  {
     isEqual = isEqual && _file.canRead() == _foreignFile.canRead();
     isEqual = isEqual && _file.canWrite() == _foreignFile.canWrite();
     isEqual = isEqual && _file.canExecute() == _foreignFile.canExecute();
@@ -252,32 +278,34 @@ bool ls_std::File::_equals(ls_std::File &_file, ls_std::File &_foreignFile)
   return isEqual;
 }
 
-bool ls_std::File::_exists(const std::string& _path)
+bool ls_std::File::_exists(const std::string &_path)
 {
-  struct stat _stat {};
+  struct stat _stat{};
   return (stat(_path.c_str(), &_stat) == 0);
 }
 
 std::string ls_std::File::_getParent(const std::string &_path)
 {
-  std::string parent {};
+  std::string parent{};
   std::vector<std::string> subDirectoryNames = ls_std::File::_splitIntoSubDirectoryNames(_path);
   const char separator = ls_std::FilePathSeparator::get();
   subDirectoryNames.pop_back();
 
-  for(auto const& subDirectoryName : subDirectoryNames) {
+  for (auto const &subDirectoryName : subDirectoryNames)
+  {
     parent += subDirectoryName + separator;
   }
 
   return parent;
 }
 
-bool ls_std::File::_isDirectory(const std::string& _path)
+bool ls_std::File::_isDirectory(const std::string &_path)
 {
-  bool match {};
-  struct stat _stat {};
+  bool match{};
+  struct stat _stat{};
 
-  if(stat(_path.c_str(), &_stat) == 0) {
+  if (stat(_path.c_str(), &_stat) == 0)
+  {
     match = _stat.st_mode & (unsigned short) S_IFDIR;
   }
 
@@ -286,12 +314,14 @@ bool ls_std::File::_isDirectory(const std::string& _path)
 
 bool ls_std::File::_isExecutable(const std::string &_path)
 {
-  bool executable {};
+  bool executable{};
 
-  if(ls_std::File::_exists(_path)) {
-    struct stat _stat {};
+  if (ls_std::File::_exists(_path))
+  {
+    struct stat _stat{};
 
-    if(stat(_path.c_str(), &_stat) == 0) {
+    if (stat(_path.c_str(), &_stat) == 0)
+    {
       executable = (_stat.st_mode & (unsigned short) S_IEXEC) != 0;
     }
   }
@@ -299,12 +329,13 @@ bool ls_std::File::_isExecutable(const std::string &_path)
   return executable;
 }
 
-bool ls_std::File::_isFile(const std::string& _path)
+bool ls_std::File::_isFile(const std::string &_path)
 {
-  bool match {};
-  struct stat _stat {};
+  bool match{};
+  struct stat _stat{};
 
-  if(stat(_path.c_str(), &_stat) == 0) {
+  if (stat(_path.c_str(), &_stat) == 0)
+  {
     match = _stat.st_mode & (unsigned) S_IFREG;
   }
 
@@ -312,20 +343,24 @@ bool ls_std::File::_isFile(const std::string& _path)
 }
 
 #if defined(unix) || defined(__APPLE__)
+
 bool ls_std::File::_isReadableUnix(const std::string &_path)
 {
-  bool readable {};
+  bool readable{};
 
-  if(ls_std::File::_exists(_path)) {
-    struct stat _stat {};
+  if (ls_std::File::_exists(_path))
+  {
+    struct stat _stat{};
 
-    if(stat(_path.c_str(), &_stat) == 0) {
+    if (stat(_path.c_str(), &_stat) == 0)
+    {
       readable = (_stat.st_mode & (unsigned) S_IREAD) != 0;
     }
   }
 
   return readable;
 }
+
 #endif
 
 #ifdef _WIN32
@@ -347,12 +382,14 @@ bool ls_std::File::_isReadableWindows(const std::string &_path)
 
 bool ls_std::File::_isWritable(const std::string &_path)
 {
-  bool writable {};
+  bool writable{};
 
-  if(ls_std::File::_exists(_path)) {
-    struct stat _stat {};
+  if (ls_std::File::_exists(_path))
+  {
+    struct stat _stat{};
 
-    if(stat(_path.c_str(), &_stat) == 0) {
+    if (stat(_path.c_str(), &_stat) == 0)
+    {
       writable = (_stat.st_mode & (unsigned) S_IWRITE) != 0;
     }
   }
@@ -362,10 +399,11 @@ bool ls_std::File::_isWritable(const std::string &_path)
 
 time_t ls_std::File::_lastModified(const std::string &_path)
 {
-  time_t lastModifiedTimeStamp {};
-  struct stat _stat {};
+  time_t lastModifiedTimeStamp{};
+  struct stat _stat{};
 
-  if(stat(_path.c_str(), &_stat) == 0) {
+  if (stat(_path.c_str(), &_stat) == 0)
+  {
     lastModifiedTimeStamp = _stat.st_mtime;
   }
 
@@ -374,13 +412,13 @@ time_t ls_std::File::_lastModified(const std::string &_path)
 
 std::list<std::string> ls_std::File::_list(const std::string &_path)
 {
-  std::list<std::string> filesInDirectory {};
+  std::list<std::string> filesInDirectory{};
 
   #if defined(unix) || defined(__APPLE__)
-    filesInDirectory = ls_std::File::_listUnix(_path, true);
+  filesInDirectory = ls_std::File::_listUnix(_path, true);
   #endif
   #ifdef _WIN32
-    filesInDirectory = ls_std::File::_listWindows(_path, true);
+  filesInDirectory = ls_std::File::_listWindows(_path, true);
   #endif
 
   return filesInDirectory;
@@ -388,33 +426,36 @@ std::list<std::string> ls_std::File::_list(const std::string &_path)
 
 std::list<std::string> ls_std::File::_listFiles(const std::string &_path)
 {
-  std::list<std::string> filesInDirectory {};
+  std::list<std::string> filesInDirectory{};
 
   #if defined(unix) || defined(__APPLE__)
-    filesInDirectory = ls_std::File::_listUnix(_path, false);
+  filesInDirectory = ls_std::File::_listUnix(_path, false);
   #endif
   #ifdef _WIN32
-    filesInDirectory = ls_std::File::_listWindows(_path, false);
+  filesInDirectory = ls_std::File::_listWindows(_path, false);
   #endif
 
   return filesInDirectory;
 }
 
 #if defined(unix) || defined(__APPLE__)
+
 std::list<std::string> ls_std::File::_listUnix(const std::string &_path, bool withDirectories)
 {
-  std::list<std::string> filesInDirectory {};
-  DIR* directory = opendir(_path.c_str());
-  struct dirent* directoryEntity;
-  std::string absolutePath {};
+  std::list<std::string> filesInDirectory{};
+  DIR *directory = opendir(_path.c_str());
+  struct dirent *directoryEntity;
+  std::string absolutePath{};
 
-  while((directoryEntity = readdir(directory)) != nullptr) {
+  while ((directoryEntity = readdir(directory)) != nullptr)
+  {
     ls_std::File::_addToFileListUnix(_path, withDirectories, directoryEntity, filesInDirectory);
   }
 
   closedir(directory);
   return filesInDirectory;
 }
+
 #endif
 
 #ifdef _WIN32
@@ -438,15 +479,16 @@ std::list<std::string> ls_std::File::_listWindows(const std::string &_path, bool
 }
 #endif
 
-int ls_std::File::_mkdir(const std::string& _path) {
+int ls_std::File::_mkdir(const std::string &_path)
+{
   int result;
 
   #ifdef _WIN32
-    result = mkdir(_path.c_str());
+  result = mkdir(_path.c_str());
   #endif
 
   #if defined(unix) || defined(__APPLE__)
-    result = mkdir(_path.c_str(), 0777);
+  result = mkdir(_path.c_str(), 0777);
   #endif
 
   return result;
@@ -460,21 +502,25 @@ std::string ls_std::File::_normalizePath(std::string _path)
   return _path;
 }
 
-std::string ls_std::File::_reduceSeparators(const std::string& _path)
+std::string ls_std::File::_reduceSeparators(const std::string &_path)
 {
   static const char separator = {ls_std::FilePathSeparator::get()};
-  std::string normalizedPath {};
-  int index {};
+  std::string normalizedPath{};
+  int index{};
 
-  while(index  < _path.size()) {
-    if(_path[index] == separator) {
+  while (index < _path.size())
+  {
+    if (_path[index] == separator)
+    {
       normalizedPath += _path[index];
 
-      do {
+      do
+      {
         index++;
-      }
-      while(_path[index] == separator);
-    } else {
+      } while (_path[index] == separator);
+    }
+    else
+    {
       normalizedPath += _path[index];
       index++;
     }
@@ -489,15 +535,17 @@ void ls_std::File::_remove(const std::string &_path)
   ls_std::File::_removeUnix(_path);
   #endif
   #ifdef _WIN32
-    ls_std::File::_removeWindows(_path);
+  ls_std::File::_removeWindows(_path);
   #endif
 }
 
 #if defined(unix) || defined(__APPLE__)
+
 void ls_std::File::_removeUnix(const std::string &_path)
 {
   rmdir(_path.c_str());
 }
+
 #endif
 
 #ifdef _WIN32
@@ -518,23 +566,25 @@ std::string ls_std::File::_replaceWrongSeparator(std::string _path)
   static const char windowsSeparator = ls_std::FilePathSeparator::getWindowsFilePathSeparator();
 
   #if defined(unix) || defined(__APPLE__)
-    std::replace(_path.begin(), _path.end(), windowsSeparator, unixSeparator);
+  std::replace(_path.begin(), _path.end(), windowsSeparator, unixSeparator);
   #endif
 
   #ifdef _WIN32
-    std::replace(_path.begin(), _path.end(), unixSeparator, windowsSeparator);
+  std::replace(_path.begin(), _path.end(), unixSeparator, windowsSeparator);
   #endif
 
   return _path;
 }
 
-std::vector<std::string> ls_std::File::_splitIntoSubDirectoryNames(const std::string& _path) {
-  std::vector<std::string> subDirectoryNames {};
-  std::stringstream _stream {_path};
-  std::string subDirectoryName {};
+std::vector<std::string> ls_std::File::_splitIntoSubDirectoryNames(const std::string &_path)
+{
+  std::vector<std::string> subDirectoryNames{};
+  std::stringstream _stream{_path};
+  std::string subDirectoryName{};
   const char separator = ls_std::FilePathSeparator::get();
 
-  while(std::getline(_stream, subDirectoryName, separator)) {
+  while (std::getline(_stream, subDirectoryName, separator))
+  {
     subDirectoryNames.push_back(subDirectoryName);
   }
 

+ 31 - 18
source/ls_std/io/FileOutputStream.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -11,15 +11,17 @@
 #include <ls_std/exception/FileNotFoundException.hpp>
 #include <ls_std/exception/FileOperationException.hpp>
 
-ls_std::FileOutputStream::FileOutputStream(ls_std::File &_file) : ls_std::Class("FileOutputStream"),
-file(_file)
+ls_std::FileOutputStream::FileOutputStream(ls_std::File &_file)
+    : ls_std::Class("FileOutputStream"),
+      file(_file)
 {
   this->_init();
 }
 
-ls_std::FileOutputStream::FileOutputStream(ls_std::File &_file, bool _append) : ls_std::Class("FileOutputStream"),
-append(_append),
-file(_file)
+ls_std::FileOutputStream::FileOutputStream(ls_std::File &_file, bool _append)
+    : ls_std::Class("FileOutputStream"),
+      append(_append),
+      file(_file)
 {
   this->_init();
 }
@@ -34,16 +36,20 @@ void ls_std::FileOutputStream::close()
   this->_close();
 }
 
-bool ls_std::FileOutputStream::write(const ls_std::byte_field& _data)
+bool ls_std::FileOutputStream::write(const ls_std::byte_field &_data)
 {
-  bool succeeded {};
+  bool succeeded{};
 
-  if(this->outputStream.is_open()) {
-    if (this->outputStream << _data) {
+  if (this->outputStream.is_open())
+  {
+    if (this->outputStream << _data)
+    {
       succeeded = true;
     }
-  } else {
-    throw ls_std::FileOperationException {};
+  }
+  else
+  {
+    throw ls_std::FileOperationException{};
   }
 
   return succeeded;
@@ -51,19 +57,26 @@ bool ls_std::FileOutputStream::write(const ls_std::byte_field& _data)
 
 void ls_std::FileOutputStream::_close()
 {
-  if(this->outputStream.is_open()) {
+  if (this->outputStream.is_open())
+  {
     this->outputStream.close();
   }
 }
 
 void ls_std::FileOutputStream::_init()
 {
-  if(!this->file.exists()) {
-    throw ls_std::FileNotFoundException {};
-  } else {
-    if(this->append) {
+  if (!this->file.exists())
+  {
+    throw ls_std::FileNotFoundException{};
+  }
+  else
+  {
+    if (this->append)
+    {
       this->outputStream.open(this->file.getAbsoluteFilePath(), std::ios::out | std::ios::app);
-    } else {
+    }
+    else
+    {
       this->outputStream.open(this->file.getAbsoluteFilePath());
     }
   }

+ 13 - 10
source/ls_std/io/FileReader.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,26 +12,28 @@
 #include <ls_std/exception/FileNotFoundException.hpp>
 #include <ls_std/exception/FileOperationException.hpp>
 
-ls_std::FileReader::FileReader(ls_std::File &_file) : ls_std::Class("FileReader"),
-file(_file)
+ls_std::FileReader::FileReader(ls_std::File &_file)
+    : ls_std::Class("FileReader"),
+      file(_file)
 {
   ls_std::FileReader::_init(_file);
 }
 
 ls_std::byte_field ls_std::FileReader::read()
 {
-  ls_std::byte* data;
-  std::ifstream inputStream {this->file.getAbsoluteFilePath(), std::ifstream::binary};
+  ls_std::byte *data;
+  std::ifstream inputStream{this->file.getAbsoluteFilePath(), std::ifstream::binary};
   int length = (int) this->file.getSize();
   data = new ls_std::byte[length];
   inputStream.read(data, length);
 
-  if(!inputStream) {
-    throw ls_std::FileOperationException {};
+  if (!inputStream)
+  {
+    throw ls_std::FileOperationException{};
   }
 
   inputStream.close();
-  ls_std::byte_field readData = ls_std::byte_field {data, (size_t) this->file.getSize()};
+  ls_std::byte_field readData = ls_std::byte_field{data, (size_t) this->file.getSize()};
   delete[] data;
 
   return readData;
@@ -45,7 +47,8 @@ void ls_std::FileReader::reset(ls_std::File &_file)
 
 void ls_std::FileReader::_init(ls_std::File &_file)
 {
-  if(!_file.exists()) {
-    throw ls_std::FileNotFoundException {};
+  if (!_file.exists())
+  {
+    throw ls_std::FileNotFoundException{};
   }
 }

+ 15 - 10
source/ls_std/io/FileWriter.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,8 +12,9 @@
 #include <ls_std/exception/FileNotFoundException.hpp>
 #include <ls_std/exception/FileOperationException.hpp>
 
-ls_std::FileWriter::FileWriter(ls_std::File &_file) : ls_std::Class("FileWriter"),
-file(_file)
+ls_std::FileWriter::FileWriter(ls_std::File &_file)
+    : ls_std::Class("FileWriter"),
+      file(_file)
 {
   ls_std::FileWriter::_init(_file);
 }
@@ -24,16 +25,19 @@ void ls_std::FileWriter::reset(ls_std::File &_file)
   this->file = _file;
 }
 
-bool ls_std::FileWriter::write(const ls_std::byte_field& _data)
+bool ls_std::FileWriter::write(const ls_std::byte_field &_data)
 {
-  std::ofstream outputStream {};
+  std::ofstream outputStream{};
   outputStream.open(this->file.getAbsoluteFilePath());
   bool succeeded;
 
-  if(outputStream << _data) {
+  if (outputStream << _data)
+  {
     succeeded = true;
-  } else {
-    throw ls_std::FileOperationException {};
+  }
+  else
+  {
+    throw ls_std::FileOperationException{};
   }
 
   outputStream.close();
@@ -42,7 +46,8 @@ bool ls_std::FileWriter::write(const ls_std::byte_field& _data)
 
 void ls_std::FileWriter::_init(ls_std::File &_file)
 {
-  if(!_file.exists()) {
-    throw ls_std::FileNotFoundException {};
+  if (!_file.exists())
+  {
+    throw ls_std::FileNotFoundException{};
   }
 }

+ 9 - 6
source/ls_std/io/StorableFile.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2020-11-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -23,7 +23,7 @@ std::shared_ptr<ls_std::File> ls_std::StorableFile::getFile()
 
 ls_std::byte_field ls_std::StorableFile::load()
 {
-  ls_std::FileReader reader {*this->file};
+  ls_std::FileReader reader{*this->file};
   return reader.read();
 }
 
@@ -32,17 +32,20 @@ void ls_std::StorableFile::reset(const std::string &_path)
   this->_init(_path);
 }
 
-void ls_std::StorableFile::save(const ls_std::byte_field& _data)
+void ls_std::StorableFile::save(const ls_std::byte_field &_data)
 {
-  ls_std::FileWriter writer {*this->file};
+  ls_std::FileWriter writer{*this->file};
   writer.write(_data);
 }
 
 void ls_std::StorableFile::_init(const std::string &_path)
 {
-  if(this->file == nullptr) {
+  if (this->file == nullptr)
+  {
     this->file = std::make_shared<ls_std::File>(_path);
-  } else {
+  }
+  else
+  {
     this->file->reset(_path);
   }
 }

+ 7 - 5
source/ls_std/io/kv/KVDocument.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -14,9 +14,10 @@ ls_std::KVDocument::KVDocument() : ls_std::Class("KVDocument")
 
 bool ls_std::KVDocument::addPair(ls_std::KVPair _pair)
 {
-  bool added {};
+  bool added{};
 
-  if(!this->_hasPair(_pair.getKey())) {
+  if (!this->_hasPair(_pair.getKey()))
+  {
     std::pair<ls_std::kv_key, ls_std::KVPair> pair = std::make_pair(_pair.getKey(), _pair);
     added = this->pairs.insert(pair).second;
   }
@@ -41,12 +42,13 @@ bool ls_std::KVDocument::hasPair(const ls_std::kv_key &_key)
 
 void ls_std::KVDocument::removePair(const ls_std::kv_key &_key)
 {
-  if(_hasPair(_key)) {
+  if (_hasPair(_key))
+  {
     this->pairs.erase(_key);
   }
 }
 
-bool ls_std::KVDocument::_hasPair(const ls_std::kv_key& _key)
+bool ls_std::KVDocument::_hasPair(const ls_std::kv_key &_key)
 {
   return this->pairs.find(_key) != this->pairs.end();
 }

+ 7 - 5
source/ls_std/io/kv/KVPair.cpp

@@ -3,15 +3,16 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
 #include <ls_std/io/kv/KVPair.hpp>
 #include <ls_std/exception/IllegalArgumentException.hpp>
 
-ls_std::KVPair::KVPair(const ls_std::kv_key& _key, ls_std::kv_value _value) : ls_std::Class("KVPair"),
-value(std::move(_value))
+ls_std::KVPair::KVPair(const ls_std::kv_key &_key, ls_std::kv_value _value)
+    : ls_std::Class("KVPair"),
+      value(std::move(_value))
 {
   this->_assignKey(_key);
 }
@@ -33,8 +34,9 @@ void ls_std::KVPair::setValue(const ls_std::kv_value &_value)
 
 void ls_std::KVPair::_assignKey(const ls_std::kv_key &_key)
 {
-  if(_key.empty()) {
-    throw ls_std::IllegalArgumentException {};
+  if (_key.empty())
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->key = _key;

+ 18 - 11
source/ls_std/io/kv/KVParser.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -33,8 +33,9 @@ void ls_std::KVParser::setDocument(const std::shared_ptr<ls_std::KVDocument> &_d
 
 void ls_std::KVParser::_assignDocument(const std::shared_ptr<ls_std::KVDocument> &_document)
 {
-  if(_document == nullptr) {
-    throw ls_std::NullPointerException {};
+  if (_document == nullptr)
+  {
+    throw ls_std::NullPointerException{};
   }
 
   this->document = _document;
@@ -47,7 +48,8 @@ bool ls_std::KVParser::_lineHasPair(ls_std::KVParseData _parseData)
 
 void ls_std::KVParser::_parse(const ls_std::byte_field &_data)
 {
-  for(std::string::size_type index = 0 ; index < _data.size() ; index++) {
+  for (std::string::size_type index = 0; index < _data.size(); index++)
+  {
     ls_std::KVParseData parseData = ls_std::KVParser::_readLine(_data, index);
     this->_parsePair(parseData);
     index = parseData.index;
@@ -56,25 +58,30 @@ void ls_std::KVParser::_parse(const ls_std::byte_field &_data)
 
 void ls_std::KVParser::_parsePair(ls_std::KVParseData _parseData)
 {
-  if(ls_std::KVParser::_lineHasPair(_parseData)) {
+  if (ls_std::KVParser::_lineHasPair(_parseData))
+  {
     size_t equalSignPosition = _parseData.line.toString().find('=');
     ls_std::kv_key key = _parseData.line.toString().substr(0, equalSignPosition);
     ls_std::kv_value value = _parseData.line.toString().substr(equalSignPosition + 1);
     value = value.substr(0, value.find(';'));
 
-    this->document->addPair(ls_std::KVPair {key, value});
+    this->document->addPair(ls_std::KVPair{key, value});
   }
 }
 
 ls_std::KVParseData ls_std::KVParser::_readLine(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  ls_std::KVParseData parseData {};
+  ls_std::KVParseData parseData{};
   parseData.line = _data.substr(_index);
 
-  if(parseData.line.contains(ls_std::NewLine::getWindowsNewLine())) {
+  if (parseData.line.contains(ls_std::NewLine::getWindowsNewLine()))
+  {
     ls_std::KVParser::_readLineWithWindowsLineBreak(parseData);
-  } else {
-    if(parseData.line.contains(ls_std::NewLine::getUnixNewLine())) {
+  }
+  else
+  {
+    if (parseData.line.contains(ls_std::NewLine::getUnixNewLine()))
+    {
       ls_std::KVParser::_readLineWithUnixLineBreak(parseData);
     }
   }
@@ -83,7 +90,7 @@ ls_std::KVParseData ls_std::KVParser::_readLine(const ls_std::byte_field &_data,
   return parseData;
 }
 
-void ls_std::KVParser::_readLineWithUnixLineBreak(ls_std::KVParseData& _parseData)
+void ls_std::KVParser::_readLineWithUnixLineBreak(ls_std::KVParseData &_parseData)
 {
   size_t newLinePosition = _parseData.line.toString().find(ls_std::NewLine::getUnixNewLine());
   _parseData.line = _parseData.line.toString().substr(0, newLinePosition);

+ 13 - 10
source/ls_std/io/kv/KVReader.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2020-12-25
+ * Changed:         2021-04-23
  *
  * */
 
@@ -12,17 +12,18 @@
 #include <ls_std/io/FileReader.hpp>
 #include <ls_std/io/kv/KVParser.hpp>
 
-ls_std::KVReader::KVReader(const std::shared_ptr<ls_std::KVDocument> &_document, const std::string &_absolutePath) : ls_std::Class("KVReader"),
-kvFile(ls_std::File {""})
+ls_std::KVReader::KVReader(const std::shared_ptr<ls_std::KVDocument> &_document, const std::string &_absolutePath)
+    : ls_std::Class("KVReader"),
+      kvFile(ls_std::File{""})
 {
   this->_assignDocument(_document);
-  this->_assignFile(ls_std::File {_absolutePath});
+  this->_assignFile(ls_std::File{_absolutePath});
 }
 
 ls_std::byte_field ls_std::KVReader::read()
 {
-  ls_std::byte_field data = ls_std::FileReader {this->kvFile}.read();
-  ls_std::KVParser {this->document}.parse(data);
+  ls_std::byte_field data = ls_std::FileReader{this->kvFile}.read();
+  ls_std::KVParser{this->document}.parse(data);
 
   return data;
 }
@@ -44,8 +45,9 @@ void ls_std::KVReader::setFile(const ls_std::File &_kvFile)
 
 void ls_std::KVReader::_assignDocument(const std::shared_ptr<ls_std::KVDocument> &_document)
 {
-  if(_document == nullptr) {
-    throw ls_std::IllegalArgumentException {};
+  if (_document == nullptr)
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->document = _document;
@@ -53,8 +55,9 @@ void ls_std::KVReader::_assignDocument(const std::shared_ptr<ls_std::KVDocument>
 
 void ls_std::KVReader::_assignFile(ls_std::File _kvFile)
 {
-  if(!_kvFile.exists()) {
-    throw ls_std::IllegalArgumentException {};
+  if (!_kvFile.exists())
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->kvFile = _kvFile;

+ 5 - 4
source/ls_std/io/logging/LogLevel.cpp

@@ -3,14 +3,15 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
 #include <ls_std/io/logging/LogLevel.hpp>
 
-ls_std::LogLevel::LogLevel(const ls_std::LogLevelValue& _value) : ls_std::Class("LogLevel"),
-value(_value)
+ls_std::LogLevel::LogLevel(const ls_std::LogLevelValue &_value)
+    : ls_std::Class("LogLevel"),
+      value(_value)
 {
   this->_init();
 }
@@ -23,7 +24,7 @@ ls_std::LogLevel::operator unsigned char() const
   return this->value;
 }
 
-ls_std::LogLevel & ls_std::LogLevel::operator=(const ls_std::LogLevelValue &_value)
+ls_std::LogLevel &ls_std::LogLevel::operator=(const ls_std::LogLevelValue &_value)
 {
   this->value = _value;
   return *this;

+ 22 - 20
source/ls_std/io/logging/Logger.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,11 +13,13 @@
 #include <ls_std/boxing/String.hpp>
 #include <ls_std/exception/NullPointerException.hpp>
 
-ls_std::Logger::Logger(const std::shared_ptr<ls_std::IWriter> &_writer) : ls_std::Class("Logger"),
-logLevel(ls_std::LogLevelValue::INFO)
+ls_std::Logger::Logger(const std::shared_ptr<ls_std::IWriter> &_writer)
+    : ls_std::Class("Logger"),
+      logLevel(ls_std::LogLevelValue::INFO)
 {
-  if(_writer == nullptr) {
-    throw ls_std::NullPointerException {};
+  if (_writer == nullptr)
+  {
+    throw ls_std::NullPointerException{};
   }
 
   this->writer = _writer;
@@ -25,21 +27,24 @@ logLevel(ls_std::LogLevelValue::INFO)
 
 void ls_std::Logger::debug(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::DEBUG) {
+  if (this->logLevel >= ls_std::LogLevelValue::DEBUG)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::DEBUG));
   }
 }
 
 void ls_std::Logger::error(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::ERR) {
+  if (this->logLevel >= ls_std::LogLevelValue::ERR)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::ERR));
   }
 }
 
 void ls_std::Logger::fatal(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::FATAL) {
+  if (this->logLevel >= ls_std::LogLevelValue::FATAL)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::FATAL));
   }
 }
@@ -51,7 +56,8 @@ ls_std::LogLevel ls_std::Logger::getLogLevel()
 
 void ls_std::Logger::info(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::INFO) {
+  if (this->logLevel >= ls_std::LogLevelValue::INFO)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::INFO));
   }
 }
@@ -63,27 +69,23 @@ void ls_std::Logger::setLogLevel(const ls_std::LogLevelValue &_logLevelValue)
 
 void ls_std::Logger::trace(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::TRACE) {
+  if (this->logLevel >= ls_std::LogLevelValue::TRACE)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::TRACE));
   }
 }
 
 void ls_std::Logger::warn(const ls_std::byte *_data)
 {
-  if(this->logLevel >= ls_std::LogLevelValue::WARN) {
+  if (this->logLevel >= ls_std::LogLevelValue::WARN)
+  {
     this->_log(_data, ls_std::LogLevel(ls_std::LogLevelValue::WARN));
   }
 }
 
-void ls_std::Logger::_log(const ls_std::byte *_data, const ls_std::LogLevel& _logLevel)
+void ls_std::Logger::_log(const ls_std::byte *_data, const ls_std::LogLevel &_logLevel)
 {
-  ls_std::Date date {};
-
-  std::string message = "[" +
-      date.toString() + "] " +
-      ls_std::String {_logLevel.toString() + ":"}.padRight(10, ' ') +
-      std::string(_data) +
-      ls_std::NewLine::getUnixNewLine();
-
+  ls_std::Date date{};
+  std::string message = "[" + date.toString() + "] " + ls_std::String{_logLevel.toString() + ":"}.padRight(10, ' ') + std::string(_data) + ls_std::NewLine::getUnixNewLine();
   this->writer->write(message);
 }

+ 4 - 3
source/ls_std/io/xml/XMLAttribute.cpp

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

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

@@ -3,14 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-29
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
 #include <ls_std/io/xml/XMLDeclaration.hpp>
 
-ls_std::XMLDeclaration::XMLDeclaration(std::string _version) :
-ls_std::Class("XMLDeclaration")
+ls_std::XMLDeclaration::XMLDeclaration(std::string _version) : ls_std::Class("XMLDeclaration")
 {
   this->version.setValue(std::move(_version));
 }
@@ -58,9 +57,10 @@ std::string ls_std::XMLDeclaration::toXML()
 
 std::string ls_std::XMLDeclaration::_toXMLAttribute(ls_std::XMLAttribute _attribute)
 {
-  std::string xmlString {};
+  std::string xmlString{};
 
-  if(!_attribute.getValue().empty()) {
+  if (!_attribute.getValue().empty())
+  {
     xmlString = " " + _attribute.toXML();
   }
 

+ 6 - 4
source/ls_std/io/xml/XMLDocument.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-30
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -34,12 +34,14 @@ void ls_std::XMLDocument::setRootElement(const std::shared_ptr<ls_std::XMLNode>
 
 std::string ls_std::XMLDocument::toXML()
 {
-  std::string xmlString {};
+  std::string xmlString{};
 
-  if(this->declaration != nullptr) {
+  if (this->declaration != nullptr)
+  {
     xmlString = this->declaration->toXML();
 
-    if(!xmlString.empty()) {
+    if (!xmlString.empty())
+    {
       xmlString += "\n";
     }
   }

+ 95 - 58
source/ls_std/io/xml/XMLNode.cpp

@@ -3,24 +3,29 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
 #include <ls_std/io/xml/XMLNode.hpp>
 #include <ls_std/utils/STLUtils.hpp>
 
-ls_std::XMLNode::XMLNode(std::string _name) : ls_std::Class("XMLNode"),
-name(std::move(_name))
+ls_std::XMLNode::XMLNode(std::string _name)
+    : ls_std::Class("XMLNode"),
+      name(std::move(_name))
 {}
 
-bool ls_std::XMLNode::addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name) {
-  bool added {};
+bool ls_std::XMLNode::addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name)
+{
+  bool added{};
   auto iterator = this->attributes.begin();
 
-  if(!this->_hasAttribute(_attribute->getName())) {
-    while(iterator != this->attributes.end()) {
-      if((*iterator)->getName() == _name) {
+  if (!this->_hasAttribute(_attribute->getName()))
+  {
+    while (iterator != this->attributes.end())
+    {
+      if ((*iterator)->getName() == _name)
+      {
         iterator++;
         this->attributes.insert(iterator, _attribute);
         added = true;
@@ -34,13 +39,17 @@ bool ls_std::XMLNode::addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribu
   return added;
 }
 
-bool ls_std::XMLNode::addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name) {
-  bool added {};
+bool ls_std::XMLNode::addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name)
+{
+  bool added{};
   auto iterator = this->attributes.begin();
 
-  if(!this->_hasAttribute(_attribute->getName())) {
-    while(iterator != this->attributes.end()) {
-      if((*iterator)->getName() == _name) {
+  if (!this->_hasAttribute(_attribute->getName()))
+  {
+    while (iterator != this->attributes.end())
+    {
+      if ((*iterator)->getName() == _name)
+      {
         this->attributes.insert(iterator, _attribute);
         added = true;
         break;
@@ -55,9 +64,10 @@ bool ls_std::XMLNode::addAttributeBefore(const std::shared_ptr<ls_std::XMLAttrib
 
 bool ls_std::XMLNode::addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute> &_attribute)
 {
-  bool added {};
+  bool added{};
 
-  if(_attribute != nullptr && !_hasAttribute(_attribute->getName())) {
+  if (_attribute != nullptr && !_hasAttribute(_attribute->getName()))
+  {
     this->attributes.push_front(_attribute);
     added = true;
   }
@@ -67,9 +77,10 @@ bool ls_std::XMLNode::addAttributeToBeginning(const std::shared_ptr<ls_std::XMLA
 
 bool ls_std::XMLNode::addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute> &_attribute)
 {
-  bool added {};
+  bool added{};
 
-  if(_attribute != nullptr && !_hasAttribute(_attribute->getName())) {
+  if (_attribute != nullptr && !_hasAttribute(_attribute->getName()))
+  {
     this->attributes.push_back(_attribute);
     added = true;
   }
@@ -77,14 +88,17 @@ bool ls_std::XMLNode::addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribu
   return added;
 }
 
-bool ls_std::XMLNode::addChildAfter(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search)
+bool ls_std::XMLNode::addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search)
 {
-  bool added {};
+  bool added{};
   auto iterator = this->children.begin();
 
-  if(_child != nullptr && !this->_hasChild(_child)) {
-    while(iterator != this->children.end()) {
-      if(*iterator == _search) {
+  if (_child != nullptr && !this->_hasChild(_child))
+  {
+    while (iterator != this->children.end())
+    {
+      if (*iterator == _search)
+      {
         iterator++;
         this->children.insert(iterator, _child);
         added = true;
@@ -98,14 +112,17 @@ bool ls_std::XMLNode::addChildAfter(const std::shared_ptr<ls_std::XMLNode>& _chi
   return added;
 }
 
-bool ls_std::XMLNode::addChildBefore(const std::shared_ptr<ls_std::XMLNode>& _child, const std::shared_ptr<ls_std::XMLNode>& _search)
+bool ls_std::XMLNode::addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search)
 {
-  bool added {};
+  bool added{};
   auto iterator = this->children.begin();
 
-  if(_child != nullptr && !this->_hasChild(_child)) {
-    while(iterator != this->children.end()) {
-      if(*iterator == _search) {
+  if (_child != nullptr && !this->_hasChild(_child))
+  {
+    while (iterator != this->children.end())
+    {
+      if (*iterator == _search)
+      {
         this->children.insert(iterator, _child);
         added = true;
         break;
@@ -120,9 +137,10 @@ bool ls_std::XMLNode::addChildBefore(const std::shared_ptr<ls_std::XMLNode>& _ch
 
 bool ls_std::XMLNode::addChildToBeginning(const std::shared_ptr<ls_std::XMLNode> &_child)
 {
-  bool added {};
+  bool added{};
 
-  if(_child != nullptr && !this->_hasChild(_child)) {
+  if (_child != nullptr && !this->_hasChild(_child))
+  {
     this->children.push_front(_child);
     added = true;
   }
@@ -130,11 +148,12 @@ bool ls_std::XMLNode::addChildToBeginning(const std::shared_ptr<ls_std::XMLNode>
   return added;
 }
 
-bool ls_std::XMLNode::addChildToEnd(const std::shared_ptr<ls_std::XMLNode>& _child)
+bool ls_std::XMLNode::addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_child)
 {
-  bool added {};
+  bool added{};
 
-  if(_child != nullptr && !this->_hasChild(_child)) {
+  if (_child != nullptr && !this->_hasChild(_child))
+  {
     this->children.push_back(_child);
     added = true;
   }
@@ -159,10 +178,12 @@ std::list<std::shared_ptr<ls_std::XMLNode>> ls_std::XMLNode::getChildren()
 
 std::list<std::shared_ptr<ls_std::XMLNode>> ls_std::XMLNode::getChildren(const std::string &_name)
 {
-  std::list<std::shared_ptr<ls_std::XMLNode>> childrenWithName {};
+  std::list<std::shared_ptr<ls_std::XMLNode>> childrenWithName{};
 
-  for(const auto& child : this->children) {
-    if(child->getName() == _name) {
+  for (const auto &child : this->children)
+  {
+    if (child->getName() == _name)
+    {
       childrenWithName.push_back(child);
     }
   }
@@ -197,28 +218,32 @@ bool ls_std::XMLNode::hasChild(const std::shared_ptr<ls_std::XMLNode> &_child)
 
 void ls_std::XMLNode::removeFirstAttribute()
 {
-  if(!this->attributes.empty()) {
+  if (!this->attributes.empty())
+  {
     this->attributes.pop_front();
   }
 }
 
 void ls_std::XMLNode::removeLastAttribute()
 {
-  if(!this->attributes.empty()) {
+  if (!this->attributes.empty())
+  {
     this->attributes.pop_back();
   }
 }
 
 void ls_std::XMLNode::removeFirstChild()
 {
-  if(!this->children.empty()) {
+  if (!this->children.empty())
+  {
     this->children.pop_front();
   }
 }
 
 void ls_std::XMLNode::removeLastChild()
 {
-  if(!this->children.empty()) {
+  if (!this->children.empty())
+  {
     this->children.pop_back();
   }
 }
@@ -240,7 +265,7 @@ std::string ls_std::XMLNode::toXML()
 
 std::string ls_std::XMLNode::_toXML_(uint8_t _tabSize)
 {
-  std::string xmlStream {};
+  std::string xmlStream{};
 
   xmlStream += ls_std::XMLNode::_getTab(_tabSize);
   xmlStream += this->_toXMLOpenTag();
@@ -256,9 +281,10 @@ std::string ls_std::XMLNode::_toXML_(uint8_t _tabSize)
 
 std::string ls_std::XMLNode::_getTab(uint8_t _tabSize)
 {
-  std::string tab {};
+  std::string tab{};
 
-  for(uint8_t index = 0 ; index < _tabSize ; index++) {
+  for (uint8_t index = 0; index < _tabSize; index++)
+  {
     tab += " ";
   }
 
@@ -267,10 +293,12 @@ std::string ls_std::XMLNode::_getTab(uint8_t _tabSize)
 
 bool ls_std::XMLNode::_hasAttribute(const std::string &_name)
 {
-  bool exists {};
+  bool exists{};
 
-  for(const auto& attribute : this->attributes) {
-    if(attribute->getName() == _name) {
+  for (const auto &attribute : this->attributes)
+  {
+    if (attribute->getName() == _name)
+    {
       exists = true;
       break;
     }
@@ -286,10 +314,12 @@ bool ls_std::XMLNode::_hasChild(const std::shared_ptr<ls_std::XMLNode> &_child)
 
 bool ls_std::XMLNode::_hasChild(const std::string &_name)
 {
-  bool exists {};
+  bool exists{};
 
-  for(const auto& attribute : this->children) {
-    if(attribute->getName() == _name) {
+  for (const auto &attribute : this->children)
+  {
+    if (attribute->getName() == _name)
+    {
       exists = true;
       break;
     }
@@ -300,9 +330,10 @@ bool ls_std::XMLNode::_hasChild(const std::string &_name)
 
 std::string ls_std::XMLNode::_toXMLAttributes()
 {
-  std::string stream {};
+  std::string stream{};
 
-  for(const auto& _attribute : this->attributes) {
+  for (const auto &_attribute : this->attributes)
+  {
     stream += " " + _attribute->toXML();
   }
 
@@ -311,10 +342,12 @@ std::string ls_std::XMLNode::_toXMLAttributes()
 
 std::string ls_std::XMLNode::_toXMLChildren(uint8_t _tabSize)
 {
-  std::string stream {};
+  std::string stream{};
 
-  if(this->value.empty()) {
-    for(const auto& _child : this->children) {
+  if (this->value.empty())
+  {
+    for (const auto &_child : this->children)
+    {
       stream += _child->_toXML_(_tabSize);
     }
   }
@@ -324,9 +357,10 @@ std::string ls_std::XMLNode::_toXMLChildren(uint8_t _tabSize)
 
 std::string ls_std::XMLNode::_toXMLCloseTag()
 {
-  std::string stream {};
+  std::string stream{};
 
-  if(!this->children.empty() || !this->value.empty()) {
+  if (!this->children.empty() || !this->value.empty())
+  {
     stream = "</" + this->name + ">";
   }
 
@@ -340,11 +374,14 @@ std::string ls_std::XMLNode::_toXMLOpenTag()
 
 std::string ls_std::XMLNode::_toXMLOpenTagClose()
 {
-  std::string stream {};
+  std::string stream{};
 
-  if(this->children.empty() && this->value.empty()) {
+  if (this->children.empty() && this->value.empty())
+  {
     stream = "/>";
-  } else {
+  }
+  else
+  {
     stream = ">";
   }
 

+ 94 - 56
source/ls_std/io/xml/XMLParser.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -54,8 +54,9 @@ void ls_std::XMLParser::_analyze(const ls_std::byte_field &_data, std::string::s
 
 void ls_std::XMLParser::_assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
 {
-  if(_document == nullptr) {
-    throw ls_std::IllegalArgumentException {};
+  if (_document == nullptr)
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->document = _document;
@@ -66,19 +67,22 @@ std::shared_ptr<ls_std::XMLDeclaration> ls_std::XMLParser::_createDeclaration(co
   std::shared_ptr<ls_std::XMLDeclaration> declaration = std::make_shared<ls_std::XMLDeclaration>("1.0");
   std::pair<std::string, std::string> attribute = ls_std::XMLParser::_findAttribute(_attributes, "version");
 
-  if(!attribute.first.empty()) {
+  if (!attribute.first.empty())
+  {
     declaration->setVersion(attribute.second);
   }
 
   attribute = ls_std::XMLParser::_findAttribute(_attributes, "encoding");
 
-  if(!attribute.first.empty()) {
+  if (!attribute.first.empty())
+  {
     declaration->setEncoding(attribute.second);
   }
 
   attribute = ls_std::XMLParser::_findAttribute(_attributes, "standalone");
 
-  if(!attribute.first.empty()) {
+  if (!attribute.first.empty())
+  {
     declaration->setStandalone(attribute.second);
   }
 
@@ -88,9 +92,10 @@ std::shared_ptr<ls_std::XMLDeclaration> ls_std::XMLParser::_createDeclaration(co
 std::shared_ptr<ls_std::XMLNode> ls_std::XMLParser::_createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
 {
   std::shared_ptr<ls_std::XMLNode> node = std::make_shared<ls_std::XMLNode>(_name);
-  std::shared_ptr<ls_std::XMLAttribute> attribute {};
+  std::shared_ptr<ls_std::XMLAttribute> attribute{};
 
-  for(const auto& parsedAttribute : _attributes) {
+  for (const auto &parsedAttribute : _attributes)
+  {
     attribute = std::make_shared<ls_std::XMLAttribute>(parsedAttribute.first);
     attribute->setValue(parsedAttribute.second);
     node->addAttributeToEnd(attribute);
@@ -101,10 +106,12 @@ std::shared_ptr<ls_std::XMLNode> ls_std::XMLParser::_createNode(const std::list<
 
 std::pair<std::string, std::string> ls_std::XMLParser::_findAttribute(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
 {
-  std::pair<std::string, std::string> attribute {};
+  std::pair<std::string, std::string> attribute{};
 
-  for(const auto& currentAttribute : _attributes) {
-    if(currentAttribute.first == _name) {
+  for (const auto &currentAttribute : _attributes)
+  {
+    if (currentAttribute.first == _name)
+    {
       attribute = currentAttribute;
       break;
     }
@@ -116,14 +123,17 @@ std::pair<std::string, std::string> ls_std::XMLParser::_findAttribute(const std:
 size_t ls_std::XMLParser::_findAttributeEndPosition(const ls_std::byte_field &_data)
 {
   std::string::size_type position = std::string::npos;
-  std::string::size_type counter {};
+  std::string::size_type counter{};
 
-  for(char letter : _data) {
-    if(letter == '"') {
+  for (char letter : _data)
+  {
+    if (letter == '"')
+    {
       counter++;
     }
 
-    if(counter == 2) {
+    if (counter == 2)
+    {
       break;
     }
 
@@ -135,10 +145,11 @@ size_t ls_std::XMLParser::_findAttributeEndPosition(const ls_std::byte_field &_d
 
 ls_std::byte_field ls_std::XMLParser::_getNextTagString(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  ls_std::byte_field tag {};
+  ls_std::byte_field tag{};
   size_t closingCharacterPosition = _index + _data.substr(_index).find('>');
 
-  if(closingCharacterPosition != std::string::npos) {
+  if (closingCharacterPosition != std::string::npos)
+  {
     tag = _data.substr(_index, (closingCharacterPosition - _index) + 1);
   }
 
@@ -147,35 +158,41 @@ ls_std::byte_field ls_std::XMLParser::_getNextTagString(const ls_std::byte_field
 
 void ls_std::XMLParser::_isClosingTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  if(this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 2) == "</") {
+  if (this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 2) == "</")
+  {
     this->mode = XML_PARSE_MODE_CLOSING_TAG;
   }
 }
 
 void ls_std::XMLParser::_isDeclaration(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  if(_data.substr(_index, 5) == "<?xml") {
+  if (_data.substr(_index, 5) == "<?xml")
+  {
     this->mode = XML_PARSE_MODE_DECLARATION;
   }
 }
 
 void ls_std::XMLParser::_isOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  if(this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 1) == "<") {
+  if (this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 1) == "<")
+  {
     this->mode = XML_PARSE_MODE_OPENING_TAG;
   }
 }
 
 void ls_std::XMLParser::_isValue(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  if(this->mode == XML_PARSE_MODE_ANALYZE) {
+  if (this->mode == XML_PARSE_MODE_ANALYZE)
+  {
     std::string::size_type end = _data.substr(_index).find('<');
     bool isValue = _data[_index - 1] == '>' && end != std::string::npos && end > 0;
 
-    if(isValue) {
-      ls_std::String value {_data.substr(_index, end)};
+    if (isValue)
+    {
+      ls_std::String value{_data.substr(_index, end)};
 
-      if(!value.contains("\n") && !value.contains("\r\n") ) {
+      if (!value.contains("\n") && !value.contains("\r\n"))
+      {
         this->mode = XML_PARSE_MODE_VALUE;
       }
     }
@@ -184,7 +201,8 @@ void ls_std::XMLParser::_isValue(const ls_std::byte_field &_data, std::string::s
 
 void ls_std::XMLParser::_mergeNodes()
 {
-  while(this->maxLevel > 1) {
+  while (this->maxLevel > 1)
+  {
     this->_mergeNodesOnCurrentLevel();
     this->maxLevel -= 1;
   }
@@ -194,19 +212,22 @@ void ls_std::XMLParser::_mergeNodes()
 
 void ls_std::XMLParser::_mergeChildrenToParentNode(const std::shared_ptr<ls_std::XMLNode> &_parent, std::list<ls_std::XMLParseData>::iterator &_iterator, uint8_t _parentLevel)
 {
-  do {
+  do
+  {
     _iterator++;
 
-    if(_iterator == this->parseData.end()) {
+    if (_iterator == this->parseData.end())
+    {
       break;
     }
-    else {
-      if(_iterator->level == this->maxLevel) {
+    else
+    {
+      if (_iterator->level == this->maxLevel)
+      {
         _parent->addChildToEnd(_iterator->node);
       }
     }
-  }
-  while(_iterator->level > _parentLevel);
+  } while (_iterator->level > _parentLevel);
 }
 
 void ls_std::XMLParser::_mergeNodesOnCurrentLevel()
@@ -214,11 +235,14 @@ void ls_std::XMLParser::_mergeNodesOnCurrentLevel()
   auto iterator = this->parseData.begin();
   uint8_t parentLevel = this->maxLevel - 1;
 
-  while(iterator != this->parseData.end()) {
-    if(iterator->level == parentLevel) {
+  while (iterator != this->parseData.end())
+  {
+    if (iterator->level == parentLevel)
+    {
       this->_mergeChildrenToParentNode(iterator->node, iterator, parentLevel);
     }
-    else {
+    else
+    {
       iterator++;
     }
   }
@@ -226,45 +250,52 @@ void ls_std::XMLParser::_mergeNodesOnCurrentLevel()
 
 void ls_std::XMLParser::_parse(const ls_std::byte_field &_data)
 {
-  for(std::string::size_type index = 0 ; index < _data.size() ; index++) {
-    switch(this->mode) {
+  for (std::string::size_type index = 0; index < _data.size(); index++)
+  {
+    switch (this->mode)
+    {
       case XML_PARSE_MODE_ANALYZE:
       {
         this->_analyze(_data, index);
-      } break;
+      }
+        break;
       case XML_PARSE_MODE_DECLARATION:
       {
         --index;
         index = this->_parseDeclaration(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
-      } break;
+      }
+        break;
       case XML_PARSE_MODE_OPENING_TAG:
       {
         --index;
         index = ls_std::XMLParser::_parseOpeningTag(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
-      } break;
+      }
+        break;
       case XML_PARSE_MODE_VALUE:
       {
         --index;
         index = ls_std::XMLParser::_parseValue(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
-      } break;
+      }
+        break;
       case XML_PARSE_MODE_CLOSING_TAG:
       {
         --index;
         index = ls_std::XMLParser::_parseClosingTag(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
-      } break;
+      }
+        break;
     }
   }
 }
 
 std::pair<std::string, std::string> ls_std::XMLParser::_parseAttribute(const ls_std::byte_field &_data)
 {
-  std::pair<std::string, std::string> parsedAttribute {};
+  std::pair<std::string, std::string> parsedAttribute{};
   parsedAttribute.first = _data.substr(0, _data.find('='));
-  parsedAttribute.second  = _data.substr(_data.find('"') + 1);
+  parsedAttribute.second = _data.substr(_data.find('"') + 1);
   parsedAttribute.second.pop_back();
 
   return parsedAttribute;
@@ -272,17 +303,19 @@ std::pair<std::string, std::string> ls_std::XMLParser::_parseAttribute(const ls_
 
 std::list<std::pair<std::string, std::string>> ls_std::XMLParser::_parseAttributes(ls_std::byte_field _data)
 {
-  std::list<std::pair<std::string, std::string>> attributes {};
+  std::list<std::pair<std::string, std::string>> attributes{};
   size_t position = _data.find(' ');
   _data = position == std::string::npos ? "" : _data.substr(position);
 
-  while(!_data.empty()) {
-    do {
+  while (!_data.empty())
+  {
+    do
+    {
       position = _data.find(' ') + 1;
-    }
-    while(_data[position] == ' ');
+    } while (_data[position] == ' ');
 
-    if(_data.size() <= 3 && ls_std::String {_data}.endsWith(">")) {
+    if (_data.size() <= 3 && ls_std::String{_data}.endsWith(">"))
+    {
       break;
     }
 
@@ -306,7 +339,8 @@ size_t ls_std::XMLParser::_parseDeclaration(const ls_std::byte_field &_data, std
   std::string tagString = ls_std::XMLParser::_getNextTagString(_data, _index);
   bool isValidTagString = !tagString.empty();
 
-  if(isValidTagString) {
+  if (isValidTagString)
+  {
     std::shared_ptr<ls_std::XMLDeclaration> declaration = this->_createDeclaration(ls_std::XMLParser::_parseAttributes(tagString));
     this->document->setDeclaration(declaration);
   }
@@ -316,18 +350,20 @@ size_t ls_std::XMLParser::_parseDeclaration(const ls_std::byte_field &_data, std
 
 size_t ls_std::XMLParser::_parseOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  ls_std::String tagString {ls_std::XMLParser::_getNextTagString(_data, _index)};
+  ls_std::String tagString{ls_std::XMLParser::_getNextTagString(_data, _index)};
   bool isValidTagString = !tagString.toString().empty();
-  ls_std::XMLParseData singleParseData {};
+  ls_std::XMLParseData singleParseData{};
 
-  if(isValidTagString) {
+  if (isValidTagString)
+  {
     std::shared_ptr<ls_std::XMLNode> node = ls_std::XMLParser::_createNode(ls_std::XMLParser::_parseAttributes(tagString), ls_std::XMLParser::_parseTagName(tagString));
 
     singleParseData.level = this->currentLevel;
     singleParseData.node = node;
     this->parseData.push_back(singleParseData);
 
-    if(!tagString.endsWith("/>")) {
+    if (!tagString.endsWith("/>"))
+    {
       this->currentLevel += 1;
       this->_setMaxLevel();
     }
@@ -340,7 +376,8 @@ ls_std::byte_field ls_std::XMLParser::_parseTagName(const ls_std::byte_field &_d
 {
   std::string::size_type position = _data.find(' ');
 
-  if(position == std::string::npos) {
+  if (position == std::string::npos)
+  {
     position = _data.find('>');
   }
 
@@ -365,7 +402,8 @@ void ls_std::XMLParser::_reset()
 
 void ls_std::XMLParser::_setMaxLevel()
 {
-  if(this->currentLevel > this->maxLevel) {
+  if (this->currentLevel > this->maxLevel)
+  {
     this->maxLevel = this->currentLevel;
   }
 }

+ 13 - 10
source/ls_std/io/xml/XMLReader.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2020-11-26
+ * Changed:         2021-04-23
  *
  * */
 
@@ -13,17 +13,18 @@
 #include <ls_std/boxing/String.hpp>
 #include <ls_std/io/xml/XMLParser.hpp>
 
-ls_std::XMLReader::XMLReader(const std::shared_ptr<ls_std::XMLDocument>& _document, const std::string& _absolutePath) : ls_std::Class("XMLReader"),
-xmlFile(ls_std::File {""})
+ls_std::XMLReader::XMLReader(const std::shared_ptr<ls_std::XMLDocument> &_document, const std::string &_absolutePath)
+    : ls_std::Class("XMLReader"),
+      xmlFile(ls_std::File{""})
 {
   this->_assignDocument(_document);
-  this->_assignFile(ls_std::File {_absolutePath});
+  this->_assignFile(ls_std::File{_absolutePath});
 }
 
 ls_std::byte_field ls_std::XMLReader::read()
 {
-  ls_std::byte_field data = ls_std::FileReader {this->xmlFile}.read();
-  ls_std::XMLParser {this->document}.parse(data);
+  ls_std::byte_field data = ls_std::FileReader{this->xmlFile}.read();
+  ls_std::XMLParser{this->document}.parse(data);
 
   return data;
 }
@@ -45,8 +46,9 @@ void ls_std::XMLReader::setFile(const ls_std::File &_xmlFile)
 
 void ls_std::XMLReader::_assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
 {
-  if(_document == nullptr) {
-    throw ls_std::IllegalArgumentException {};
+  if (_document == nullptr)
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->document = _document;
@@ -54,8 +56,9 @@ void ls_std::XMLReader::_assignDocument(const std::shared_ptr<ls_std::XMLDocumen
 
 void ls_std::XMLReader::_assignFile(ls_std::File _xmlFile)
 {
-  if(!_xmlFile.exists()) {
-    throw ls_std::IllegalArgumentException {};
+  if (!_xmlFile.exists())
+  {
+    throw ls_std::IllegalArgumentException{};
   }
 
   this->xmlFile = _xmlFile;

Some files were not shown because too many files changed in this diff