Explorar o código

Improve namespace layout for "core" module

Patrick-Christopher Mattulat %!s(int64=2) %!d(string=hai) anos
pai
achega
3ae47435c6
Modificáronse 26 ficheiros con 247 adicións e 439 borrados
  1. 11 17
      include/ls_std/core/Class.hpp
  2. 3 9
      include/ls_std/core/LibraryVersion.hpp
  3. 23 29
      include/ls_std/core/Version.hpp
  4. 9 15
      include/ls_std/core/exception/EventNotHandledException.hpp
  5. 9 15
      include/ls_std/core/exception/EventNotSubscribedException.hpp
  6. 9 15
      include/ls_std/core/exception/FileNotFoundException.hpp
  7. 10 16
      include/ls_std/core/exception/FileOperationException.hpp
  8. 10 16
      include/ls_std/core/exception/IllegalArgumentException.hpp
  9. 1 7
      include/ls_std/core/exception/IllegalArithmeticOperationException.hpp
  10. 10 16
      include/ls_std/core/exception/IncompleteJsonException.hpp
  11. 10 16
      include/ls_std/core/exception/NullPointerException.hpp
  12. 9 18
      include/ls_std/core/interface/IBoxing.hpp
  13. 7 16
      include/ls_std/core/interface/IEncoding.hpp
  14. 9 18
      include/ls_std/core/interface/IEventSubscriber.hpp
  15. 8 17
      include/ls_std/core/interface/IListener.hpp
  16. 8 17
      include/ls_std/core/interface/IReader.hpp
  17. 9 18
      include/ls_std/core/interface/ISerializable.hpp
  18. 9 18
      include/ls_std/core/interface/IStorable.hpp
  19. 8 17
      include/ls_std/core/interface/IWriter.hpp
  20. 7 16
      include/ls_std/core/types/EventTypes.hpp
  21. 4 13
      include/ls_std/core/types/KvTypes.hpp
  22. 4 13
      include/ls_std/core/types/StateMachineTypes.hpp
  23. 6 15
      include/ls_std/core/types/Types.hpp
  24. 12 18
      include/ls_std/core/utils/RegexUtils.hpp
  25. 29 35
      include/ls_std/core/utils/STLUtils.hpp
  26. 13 19
      include/ls_std/core/utils/WindowsUtils.hpp

+ 11 - 17
include/ls_std/core/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2022-06-29
+ * Changed:         2022-07-02
  *
  * */
 
@@ -13,29 +13,23 @@
 #include <string>
 #include <ls_std/os/dynamic_goal.hpp>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class DYNAMIC_GOAL Class
   {
-    namespace core
-    {
-      class DYNAMIC_GOAL Class
-      {
-        public:
+    public:
 
-          explicit Class(const ::std::string &_name);
-          virtual ~Class() = default;
+      explicit Class(const ::std::string &_name);
+      virtual ~Class() = default;
 
-          ::std::string getClassName();
+      ::std::string getClassName();
 
-        private:
+    private:
 
-          ::std::string name{};
+      ::std::string name{};
 
-          void _assignClassName(const ::std::string &_name);
-      };
-    }
-  }
+      void _assignClassName(const ::std::string &_name);
+  };
 }
 
 #endif

+ 3 - 9
include/ls_std/core/LibraryVersion.hpp

@@ -12,17 +12,11 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  static ::std::string getVersion()
   {
-    namespace core
-    {
-      static ::std::string getVersion()
-      {
-        return "2022.2.0";
-      }
-    }
+    return "2022.2.0";
   }
 }
 

+ 23 - 29
include/ls_std/core/Version.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2022-06-29
+ * Changed:         2022-07-02
  *
  * */
 
@@ -15,44 +15,38 @@
 #include <ls_std/core/types/Types.hpp>
 #include <ls_std/os/dynamic_goal.hpp>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class DYNAMIC_GOAL Version : public ls::std::core::interface_type::ISerializable
   {
-    namespace core
-    {
-      class DYNAMIC_GOAL Version : public ls::std::core::interface_type::ISerializable
-      {
-        public:
+    public:
 
-          explicit Version(ls::std::core::type::version_type _majorVersion, ls::std::core::type::version_type _minorVersion, ls::std::core::type::version_type _patchVersion);
-          ~Version() = default;
+      explicit Version(ls::std::core::type::version_type _majorVersion, ls::std::core::type::version_type _minorVersion, ls::std::core::type::version_type _patchVersion);
+      ~Version() = default;
 
-          // implementation
+      // implementation
 
-          ls::std::core::type::byte_field marshal() override;
-          void unmarshal(const ls::std::core::type::byte_field &_data) override;
+      ls::std::core::type::byte_field marshal() override;
+      void unmarshal(const ls::std::core::type::byte_field &_data) override;
 
-          // other functionality
+      // other functionality
 
-          ls::std::core::type::version_type getMajorVersion() const;
-          ls::std::core::type::version_type getMinorVersion() const;
-          ls::std::core::type::version_type getPatchVersion() const;
-          static bool isValid(const ::std::string &_versionString);
-          void setMajorVersion(ls::std::core::type::version_type _major);
-          void setMinorVersion(ls::std::core::type::version_type _minor);
-          void setPatchVersion(ls::std::core::type::version_type _patch);
+      ls::std::core::type::version_type getMajorVersion() const;
+      ls::std::core::type::version_type getMinorVersion() const;
+      ls::std::core::type::version_type getPatchVersion() const;
+      static bool isValid(const ::std::string &_versionString);
+      void setMajorVersion(ls::std::core::type::version_type _major);
+      void setMinorVersion(ls::std::core::type::version_type _minor);
+      void setPatchVersion(ls::std::core::type::version_type _patch);
 
-        private:
+    private:
 
-          ls::std::core::type::version_type majorVersion{};
-          ls::std::core::type::version_type minorVersion{};
-          ls::std::core::type::version_type patchVersion{};
+      ls::std::core::type::version_type majorVersion{};
+      ls::std::core::type::version_type minorVersion{};
+      ls::std::core::type::version_type patchVersion{};
 
-          static bool _isValid(const ::std::string &_versionString);
-      };
-    }
-  }
+      static bool _isValid(const ::std::string &_versionString);
+  };
 }
 
 #endif

+ 9 - 15
include/ls_std/core/exception/EventNotHandledException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,25 +12,19 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class EventNotHandledException : public ::std::exception
   {
-    namespace core
-    {
-      class EventNotHandledException : public ::std::exception
-      {
-        public:
+    public:
 
-          EventNotHandledException() = default;
+      EventNotHandledException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "EventNotHandledException thrown - event was not handled - nothing happened!";
-          };
+      const char *what() const noexcept override
+      {
+        return "EventNotHandledException thrown - event was not handled - nothing happened!";
       };
-    }
-  }
+  };
 }
 
 #endif

+ 9 - 15
include/ls_std/core/exception/EventNotSubscribedException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,25 +12,19 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class EventNotSubscribedException : public ::std::exception
   {
-    namespace core
-    {
-      class EventNotSubscribedException : public ::std::exception
-      {
-        public:
+    public:
 
-          EventNotSubscribedException() = default;
+      EventNotSubscribedException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "EventNotSubscribedException thrown - event was not subscribed!";
-          };
+      const char *what() const noexcept override
+      {
+        return "EventNotSubscribedException thrown - event was not subscribed!";
       };
-    }
-  }
+  };
 }
 
 #endif

+ 9 - 15
include/ls_std/core/exception/FileNotFoundException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -15,25 +15,19 @@
 #include <cstring>
 
 //TODO: pass parameters, use class, show class name
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class FileNotFoundException : public ::std::exception
   {
-    namespace core
-    {
-      class FileNotFoundException : public ::std::exception
-      {
-        public:
+    public:
 
-          FileNotFoundException() = default;
+      FileNotFoundException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "FileNotFoundException thrown - file not found!";
-          };
+      const char *what() const noexcept override
+      {
+        return "FileNotFoundException thrown - file not found!";
       };
-    }
-  }
+  };
 }
 
 #endif

+ 10 - 16
include/ls_std/core/exception/FileOperationException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -13,25 +13,19 @@
 #include <exception>
 #include <string>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class FileOperationException : public ::std::exception
   {
-    namespace core
-    {
-      class FileOperationException : public ::std::exception
-      {
-        public:
+    public:
 
-          explicit FileOperationException() = default;
+      explicit FileOperationException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "FileOperationException thrown - file operation failed!";
-          }
-      };
-    }
-  }
+      const char *what() const noexcept override
+      {
+        return "FileOperationException thrown - file operation failed!";
+      }
+  };
 }
 
 #endif

+ 10 - 16
include/ls_std/core/exception/IllegalArgumentException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,25 +12,19 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class IllegalArgumentException : public ::std::exception
   {
-    namespace core
-    {
-      class IllegalArgumentException : public ::std::exception
-      {
-        public:
+    public:
 
-          IllegalArgumentException() = default;
+      IllegalArgumentException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "IllegalArgumentException thrown - passed argument is not valid!";
-          }
-      };
-    }
-  }
+      const char *what() const noexcept override
+      {
+        return "IllegalArgumentException thrown - passed argument is not valid!";
+      }
+  };
 }
 
 #endif

+ 1 - 7
include/ls_std/core/exception/IllegalArithmeticOperationException.hpp

@@ -12,12 +12,8 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
-  {
-    namespace core
-    {
       class IllegalArithmeticOperationException : public ::std::exception
       {
         public:
@@ -29,8 +25,6 @@ namespace ls
             return "IllegalArithmeticOperationException thrown - arithmetic operation is not allowed!";
           }
       };
-    }
-  }
 }
 
 #endif

+ 10 - 16
include/ls_std/core/exception/IncompleteJsonException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-04-30
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,25 +12,19 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class IncompleteJsonException : public ::std::exception
   {
-    namespace core
-    {
-      class IncompleteJsonException : public ::std::exception
-      {
-        public:
+    public:
 
-          explicit IncompleteJsonException() = default;
+      explicit IncompleteJsonException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "IncompleteJsonException thrown - this JSON string is incomplete.";
-          }
-      };
-    }
-  }
+      const char *what() const noexcept override
+      {
+        return "IncompleteJsonException thrown - this JSON string is incomplete.";
+      }
+  };
 }
 
 #endif

+ 10 - 16
include/ls_std/core/exception/NullPointerException.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2022-07-01
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,25 +12,19 @@
 
 #include <exception>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class NullPointerException : public ::std::exception
   {
-    namespace core
-    {
-      class NullPointerException : public ::std::exception
-      {
-        public:
+    public:
 
-          explicit NullPointerException() = default;
+      explicit NullPointerException() = default;
 
-          const char *what() const noexcept override
-          {
-            return "NullPointerException thrown - reference is null!";
-          }
-      };
-    }
-  }
+      const char *what() const noexcept override
+      {
+        return "NullPointerException thrown - reference is null!";
+      }
+  };
 }
 
 #endif

+ 9 - 18
include/ls_std/core/interface/IBoxing.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,27 +12,18 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IBoxing
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IBoxing
-        {
-          public:
+    public:
 
-            IBoxing() = default;
-            ~IBoxing() = default;
+      IBoxing() = default;
+      ~IBoxing() = default;
 
-            virtual void parse(::std::string _parseText) = 0;
-            virtual ::std::string toString() = 0;
-        };
-      }
-    }
-  }
+      virtual void parse(::std::string _parseText) = 0;
+      virtual ::std::string toString() = 0;
+  };
 }
 
 #endif

+ 7 - 16
include/ls_std/core/interface/IEncoding.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-01-03
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,24 +12,15 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IEncoding
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IEncoding
-        {
-          public:
+    public:
 
-            virtual ::std::string encode(const ::std::string &_sequence) = 0;
-            virtual ::std::string decode(const ::std::string &_sequence) = 0;
-        };
-      }
-    }
-  }
+      virtual ::std::string encode(const ::std::string &_sequence) = 0;
+      virtual ::std::string decode(const ::std::string &_sequence) = 0;
+  };
 }
 
 #endif

+ 9 - 18
include/ls_std/core/interface/IEventSubscriber.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -14,27 +14,18 @@
 #include <memory>
 #include "IListener.hpp"
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IEventSubscriber
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IEventSubscriber
-        {
-          public:
+    public:
 
-            IEventSubscriber() = default;
-            ~IEventSubscriber() = default;
+      IEventSubscriber() = default;
+      ~IEventSubscriber() = default;
 
-            virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
-            virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
-        };
-      }
-    }
-  }
+      virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
+      virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
+  };
 }
 
 #endif

+ 8 - 17
include/ls_std/core/interface/IListener.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,26 +12,17 @@
 
 #include <ls_std/core/Class.hpp>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IListener
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IListener
-        {
-          public:
+    public:
 
-            IListener() = default;
-            ~IListener() = default;
+      IListener() = default;
+      ~IListener() = default;
 
-            virtual void listen(const ls::std::core::Class &_info) = 0;
-        };
-      }
-    }
-  }
+      virtual void listen(const ls::std::core::Class &_info) = 0;
+  };
 }
 
 #endif

+ 8 - 17
include/ls_std/core/interface/IReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,26 +12,17 @@
 
 #include <ls_std/core/types/Types.hpp>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IReader
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IReader
-        {
-          public:
+    public:
 
-            IReader() = default;
-            ~IReader() = default;
+      IReader() = default;
+      ~IReader() = default;
 
-            virtual ls::std::core::type::byte_field read() = 0;
-        };
-      }
-    }
-  }
+      virtual ls::std::core::type::byte_field read() = 0;
+  };
 }
 
 #endif

+ 9 - 18
include/ls_std/core/interface/ISerializable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,27 +12,18 @@
 
 #include <ls_std/core/types/Types.hpp>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class ISerializable
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class ISerializable
-        {
-          public:
+    public:
 
-            ISerializable() = default;
-            ~ISerializable() = default;
+      ISerializable() = default;
+      ~ISerializable() = default;
 
-            virtual ls::std::core::type::byte_field marshal() = 0;
-            virtual void unmarshal(const ls::std::core::type::byte_field &_data) = 0;
-        };
-      }
-    }
-  }
+      virtual ls::std::core::type::byte_field marshal() = 0;
+      virtual void unmarshal(const ls::std::core::type::byte_field &_data) = 0;
+  };
 }
 
 #endif

+ 9 - 18
include/ls_std/core/interface/IStorable.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,27 +12,18 @@
 
 #include <ls_std/core/types/Types.hpp>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IStorable
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IStorable
-        {
-          public:
+    public:
 
-            IStorable() = default;
-            ~IStorable() = default;
+      IStorable() = default;
+      ~IStorable() = default;
 
-            virtual ls::std::core::type::byte_field load() = 0;
-            virtual void save(const ls::std::core::type::byte_field &_data) = 0;
-        };
-      }
-    }
-  }
+      virtual ls::std::core::type::byte_field load() = 0;
+      virtual void save(const ls::std::core::type::byte_field &_data) = 0;
+  };
 }
 
 #endif

+ 8 - 17
include/ls_std/core/interface/IWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-19
+ * Changed:         2022-07-02
  *
  * */
 
@@ -13,26 +13,17 @@
 #include <vector>
 #include <ls_std/core/types/Types.hpp>
 
-namespace ls
+namespace ls::std::core::interface_type
 {
-  namespace std
+  class IWriter
   {
-    namespace core
-    {
-      namespace interface_type
-      {
-        class IWriter
-        {
-          public:
+    public:
 
-            IWriter() = default;
-            ~IWriter() = default;
+      IWriter() = default;
+      ~IWriter() = default;
 
-            virtual bool write(const ls::std::core::type::byte_field &_data) = 0;
-        };
-      }
-    }
-  }
+      virtual bool write(const ls::std::core::type::byte_field &_data) = 0;
+  };
 }
 
 #endif

+ 7 - 16
include/ls_std/core/types/EventTypes.hpp

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

+ 4 - 13
include/ls_std/core/types/KvTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-12
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,19 +12,10 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core::type
 {
-  namespace std
-  {
-    namespace core
-    {
-      namespace type
-      {
-        using kv_key = ::std::string;
-        using kv_value = ::std::string;
-      }
-    }
-  }
+  using kv_key = ::std::string;
+  using kv_value = ::std::string;
 }
 
 #endif

+ 4 - 13
include/ls_std/core/types/StateMachineTypes.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2022-05-12
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,19 +12,10 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core::type
 {
-  namespace std
-  {
-    namespace core
-    {
-      namespace type
-      {
-        using state_connection_id = ::std::string;
-        using state_id = ::std::string;
-      }
-    }
-  }
+  using state_connection_id = ::std::string;
+  using state_id = ::std::string;
 }
 
 #endif

+ 6 - 15
include/ls_std/core/types/Types.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2022-05-12
+ * Changed:         2022-07-02
  *
  * */
 
@@ -12,21 +12,12 @@
 
 #include <string>
 
-namespace ls
+namespace ls::std::core::type
 {
-  namespace std
-  {
-    namespace core
-    {
-      namespace type
-      {
-        using byte = char;
-        using byte_field = ::std::string;
-        using long_type = long long int;
-        using version_type = uint16_t;
-      }
-    }
-  }
+  using byte = char;
+  using byte_field = ::std::string;
+  using long_type = long long int;
+  using version_type = uint16_t;
 }
 
 #endif

+ 12 - 18
include/ls_std/core/utils/RegexUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2022-05-09
+ * Changed:         2022-07-02
  *
  * */
 
@@ -13,27 +13,21 @@
 #include <string>
 #include <regex>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class RegexUtils
   {
-    namespace core
-    {
-      class RegexUtils
-      {
-        public:
+    public:
 
-          RegexUtils() = default;
-          ~RegexUtils() = default;
+      RegexUtils() = default;
+      ~RegexUtils() = default;
 
-          static ::std::string escapeString(const ::std::string &_text)
-          {
-            static ::std::regex regexMetaEscape(R"(([\^\$\\\.\*\+\?\(\)\[\]\{\}\|]))");
-            return ::std::regex_replace(_text, regexMetaEscape, R"(\$1)");
-          }
-      };
-    }
-  }
+      static ::std::string escapeString(const ::std::string &_text)
+      {
+        static ::std::regex regexMetaEscape(R"(([\^\$\\\.\*\+\?\(\)\[\]\{\}\|]))");
+        return ::std::regex_replace(_text, regexMetaEscape, R"(\$1)");
+      }
+  };
 }
 
 #endif

+ 29 - 35
include/ls_std/core/utils/STLUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-09
+ * Changed:         2022-07-02
  *
  * */
 
@@ -13,50 +13,44 @@
 #include <algorithm>
 #include <list>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class STLUtils
   {
-    namespace core
-    {
-      class STLUtils
-      {
-        public:
+    public:
 
-          STLUtils() = default;
-          ~STLUtils() = default;
+      STLUtils() = default;
+      ~STLUtils() = default;
 
-          template<class container, class dataType>
-          static bool contains(container _container, const dataType &_value)
-          {
-            return ::std::find(_container.begin(), _container.end(), _value) != _container.end();
-          }
+      template<class container, class dataType>
+      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{};
+      template<class dataType>
+      static dataType getListElementAt(const ::std::list<dataType> &_list, size_t _index)
+      {
+        dataType value{};
+        size_t counter{};
 
-            if (_index < _list.size())
+        if (_index < _list.size())
+        {
+          for (const auto &_value: _list)
+          {
+            if (counter == _index)
             {
-              for (const auto &_value: _list)
-              {
-                if (counter == _index)
-                {
-                  value = _value;
-                  break;
-                }
-
-                counter++;
-              }
+              value = _value;
+              break;
             }
 
-            return value;
+            counter++;
           }
-      };
-    }
-  }
+        }
+
+        return value;
+      }
+  };
 }
 
 #endif

+ 13 - 19
include/ls_std/core/utils/WindowsUtils.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-06
- * Changed:         2022-05-12
+ * Changed:         2022-07-02
  *
  * */
 
@@ -14,29 +14,23 @@
 #include <string>
 #include <windows.h>
 
-namespace ls
+namespace ls::std::core
 {
-  namespace std
+  class WindowsUtils
   {
-    namespace core
-    {
-      class WindowsUtils
-      {
-        public:
+    public:
 
-          WindowsUtils() = default;
-          ~WindowsUtils() = default;
+      WindowsUtils() = default;
+      ~WindowsUtils() = default;
 
-          static ::std::string getMessageFromErrorCode(const int &_errorCode)
-          {
-            ls::std::core::type::byte messageBuffer[256 + 1];
-            FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, _errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), messageBuffer, sizeof(messageBuffer), nullptr);
+      static ::std::string getMessageFromErrorCode(const int &_errorCode)
+      {
+        ls::std::core::type::byte messageBuffer[256 + 1];
+        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};
+      }
+  };
 }
 
 #endif