Переглянути джерело

Introduce "interface" namespace

Patrick-Christopher Mattulat 2 роки тому
батько
коміт
e10b2c9872
37 змінених файлів з 165 додано та 144 видалено
  1. 2 2
      include/ls_std/boxing/Boolean.hpp
  2. 2 2
      include/ls_std/boxing/Double.hpp
  3. 2 2
      include/ls_std/boxing/Float.hpp
  4. 2 2
      include/ls_std/boxing/Integer.hpp
  5. 2 2
      include/ls_std/boxing/Long.hpp
  6. 2 2
      include/ls_std/boxing/String.hpp
  7. 2 2
      include/ls_std/core/Version.hpp
  8. 12 9
      include/ls_std/core/interface/IBoxing.hpp
  9. 11 8
      include/ls_std/core/interface/IEventSubscriber.hpp
  10. 1 1
      include/ls_std/core/interface/IFactory.hpp
  11. 10 7
      include/ls_std/core/interface/IListener.hpp
  12. 10 7
      include/ls_std/core/interface/IReader.hpp
  13. 11 8
      include/ls_std/core/interface/ISerializable.hpp
  14. 11 8
      include/ls_std/core/interface/IStorable.hpp
  15. 10 7
      include/ls_std/core/interface/IWriter.hpp
  16. 4 4
      include/ls_std/event/EventManager.hpp
  17. 5 5
      include/ls_std/event/Narrator.hpp
  18. 2 2
      include/ls_std/event/serialization/SerializableJsonEvent.hpp
  19. 2 2
      include/ls_std/io/FileOutputStream.hpp
  20. 2 2
      include/ls_std/io/FileReader.hpp
  21. 2 2
      include/ls_std/io/FileWriter.hpp
  22. 2 2
      include/ls_std/io/StandardOutputWriter.hpp
  23. 2 2
      include/ls_std/io/StorableFile.hpp
  24. 2 2
      include/ls_std/io/kv/KvFileReader.hpp
  25. 4 4
      include/ls_std/io/logging/Logger.hpp
  26. 2 2
      include/ls_std/io/xml/XmlReader.hpp
  27. 2 2
      include/ls_std/logic/serialization/SerializableJsonState.hpp
  28. 2 2
      include/ls_std/logic/serialization/SerializableJsonStateConnection.hpp
  29. 2 2
      include/ls_std/logic/serialization/SerializableJsonStateMachine.hpp
  30. 3 3
      source/ls_std/event/EventManager.cpp
  31. 4 4
      source/ls_std/event/Narrator.cpp
  32. 3 3
      source/ls_std/io/logging/Logger.cpp
  33. 15 15
      test/cases/event/NarratorTest.cpp
  34. 9 9
      test/cases/io/logging/LoggerTest.cpp
  35. 2 2
      test/classes/event/DailyNewsAgency.hpp
  36. 2 2
      test/classes/event/GossipNewsAgency.hpp
  37. 2 2
      test/classes/event/TestDataMercedesCar.hpp

+ 2 - 2
include/ls_std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2022-05-11
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace boxing
     {
-      class Boolean : public ls::std::core::Class, public ls::std::core::IBoxing
+      class Boolean : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-11
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace boxing
     {
-      class Double : public ls::std::core::Class, public ls::std::core::IBoxing
+      class Double : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-11
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace boxing
     {
-      class Float : public ls::std::core::Class, public ls::std::core::IBoxing
+      class Float : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2022-05-11
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace boxing
     {
-      class Integer : public ls::std::core::Class, public ls::std::core::IBoxing
+      class Integer : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls
   {
     namespace boxing
     {
-      class Long : public ls::std::core::Class, public ls::std::core::IBoxing
+      class Long : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -23,7 +23,7 @@ namespace ls
   {
     namespace boxing
     {
-      class String : public ls::std::core::Class, public ls::std::core::IBoxing
+      class String : public ls::std::core::Class, public ls::std::core::interface::IBoxing
       {
         public:
 

+ 2 - 2
include/ls_std/core/Version.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace core
     {
-      class Version : public ls::std::core::ISerializable
+      class Version : public ls::std::core::interface::ISerializable
       {
         public:
 

+ 12 - 9
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-14
+ * Changed:         2022-05-16
  *
  * */
 
@@ -11,23 +11,26 @@
 #define LS_STD_I_BOXING_HPP
 
 #include <string>
-// TODO: add "interface" namespace
+
 namespace ls
 {
   namespace std
   {
     namespace core
     {
-      class IBoxing
+      namespace interface
       {
-        public:
+        class IBoxing
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 11 - 8
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-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,16 +20,19 @@ namespace ls
   {
     namespace core
     {
-      class IEventSubscriber
+      namespace interface
       {
-        public:
+        class IEventSubscriber
+        {
+          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::IListener> &_listener) = 0;
-          virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener) = 0;
-      };
+            virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener) = 0;
+            virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener) = 0;
+        };
+      }
     }
   }
 }

+ 1 - 1
include/ls_std/core/interface/IFactory.hpp

@@ -13,7 +13,7 @@
 #include <memory>
 #include <ls_std/core/Class.hpp>
 
-// TODO: is this really necessary to have?
+//TODO: can this class be removed?
 
 namespace ls
 {

+ 10 - 7
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-11
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,15 +18,18 @@ namespace ls
   {
     namespace core
     {
-      class IListener
+      namespace interface
       {
-        public:
+        class IListener
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 10 - 7
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-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,15 +18,18 @@ namespace ls
   {
     namespace core
     {
-      class IReader
+      namespace interface
       {
-        public:
+        class IReader
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 11 - 8
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-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,16 +18,19 @@ namespace ls
   {
     namespace core
     {
-      class ISerializable
+      namespace interface
       {
-        public:
+        class ISerializable
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 11 - 8
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-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,16 +18,19 @@ namespace ls
   {
     namespace core
     {
-      class IStorable
+      namespace interface
       {
-        public:
+        class IStorable
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 10 - 7
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-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -19,15 +19,18 @@ namespace ls
   {
     namespace core
     {
-      class IWriter
+      namespace interface
       {
-        public:
+        class IWriter
+        {
+          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;
+        };
+      }
     }
   }
 }

+ 4 - 4
include/ls_std/event/EventManager.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -23,7 +23,7 @@ namespace ls
   {
     namespace event
     {
-      class EventManager : public ls::std::core::Class, public ls::std::core::IEventSubscriber
+      class EventManager : public ls::std::core::Class, public ls::std::core::interface::IEventSubscriber
       {
         public:
 
@@ -32,8 +32,8 @@ namespace ls
 
           // implementation
 
-          void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener) override;
-          void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener) override;
+          void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener) override;
+          void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener) override;
 
           // additional functionality
 

+ 5 - 5
include/ls_std/event/Narrator.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -28,15 +28,15 @@ namespace ls
           Narrator();
           ~Narrator() override = default;
 
-          bool addListener(const ::std::shared_ptr<ls::std::core::IListener> &_listener);
+          bool addListener(const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener);
           void clear();
-          ::std::list<::std::shared_ptr<ls::std::core::IListener>> getListeners();
-          bool removeListener(const ::std::shared_ptr<ls::std::core::IListener> &_listener);
+          ::std::list<::std::shared_ptr<ls::std::core::interface::IListener>> getListeners();
+          bool removeListener(const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener);
           void tell(const ls::std::core::Class &_info);
 
         private:
 
-          ::std::list<::std::shared_ptr<ls::std::core::IListener>> listeners{};
+          ::std::list<::std::shared_ptr<ls::std::core::interface::IListener>> listeners{};
       };
     }
   }

+ 2 - 2
include/ls_std/event/serialization/SerializableJsonEvent.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-07
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls
   {
     namespace event
     {
-      class SerializableJsonEvent : public ls::std::core::Class, public ls::std::core::ISerializable
+      class SerializableJsonEvent : public ls::std::core::Class, public ls::std::core::interface::ISerializable
       {
         public:
 

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls
   {
     namespace io
     {
-      class FileOutputStream : public ls::std::core::Class, public ls::std::core::IWriter
+      class FileOutputStream : public ls::std::core::Class, public ls::std::core::interface::IWriter
       {
         public:
 

+ 2 - 2
include/ls_std/io/FileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace io
     {
-      class FileReader : public ls::std::core::Class, public ls::std::core::IReader
+      class FileReader : public ls::std::core::Class, public ls::std::core::interface::IReader
       {
         public:
 

+ 2 - 2
include/ls_std/io/FileWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls
   {
     namespace io
     {
-      class FileWriter : public ls::std::core::Class, public ls::std::core::IWriter
+      class FileWriter : public ls::std::core::Class, public ls::std::core::interface::IWriter
       {
         public:
 

+ 2 - 2
include/ls_std/io/StandardOutputWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-06
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,7 +18,7 @@ namespace ls
   {
     namespace io
     {
-      class StandardOutputWriter : public ls::std::core::IWriter
+      class StandardOutputWriter : public ls::std::core::interface::IWriter
       {
         public:
 

+ 2 - 2
include/ls_std/io/StorableFile.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls
   {
     namespace io
     {
-      class StorableFile : public ls::std::core::IStorable
+      class StorableFile : public ls::std::core::interface::IStorable
       {
         public:
 

+ 2 - 2
include/ls_std/io/kv/KvFileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls
   {
     namespace io
     {
-      class KvFileReader : public ls::std::core::Class, public ls::std::core::IReader
+      class KvFileReader : public ls::std::core::Class, public ls::std::core::interface::IReader
       {
         public:
 

+ 4 - 4
include/ls_std/io/logging/Logger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-13
+ * Changed:         2022-05-16
  *
  * */
 
@@ -27,7 +27,7 @@ namespace ls
       {
         public:
 
-          explicit Logger(const ::std::shared_ptr<ls::std::core::IWriter> &_writer);
+          explicit Logger(const ::std::shared_ptr<ls::std::core::interface::IWriter> &_writer);
           ~Logger() override = default;
 
           void debug(const ls::std::core::type::byte *_data);
@@ -42,9 +42,9 @@ namespace ls
         private:
 
           ls::std::io::LogLevel logLevel{};
-          ::std::shared_ptr<ls::std::core::IWriter> writer{};
+          ::std::shared_ptr<ls::std::core::interface::IWriter> writer{};
 
-          void _assignWriter(const ::std::shared_ptr<ls::std::core::IWriter> &_writer);
+          void _assignWriter(const ::std::shared_ptr<ls::std::core::interface::IWriter> &_writer);
           static ::std::string _buildCharacterChain(size_t _amount);
           static ::std::string _createFillContent(const ::std::string &_text);
           static ::std::string _generateTimeString(tm *_localTime);

+ 2 - 2
include/ls_std/io/xml/XmlReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -24,7 +24,7 @@ namespace ls
   {
     namespace io
     {
-      class XmlReader : public ls::std::core::Class, public ls::std::core::IReader
+      class XmlReader : public ls::std::core::Class, public ls::std::core::interface::IReader
       {
         public:
 

+ 2 - 2
include/ls_std/logic/serialization/SerializableJsonState.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls
   {
     namespace logic
     {
-      class SerializableJsonState : public ls::std::core::Class, public ls::std::core::ISerializable
+      class SerializableJsonState : public ls::std::core::Class, public ls::std::core::interface::ISerializable
       {
         public:
 

+ 2 - 2
include/ls_std/logic/serialization/SerializableJsonStateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls
   {
     namespace logic
     {
-      class SerializableJsonStateConnection : public ls::std::core::Class, public ls::std::core::ISerializable
+      class SerializableJsonStateConnection : public ls::std::core::Class, public ls::std::core::interface::ISerializable
       {
         public:
 

+ 2 - 2
include/ls_std/logic/serialization/SerializableJsonStateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls
   {
     namespace logic
     {
-      class SerializableJsonStateMachine : public ls::std::core::Class, public ls::std::core::ISerializable
+      class SerializableJsonStateMachine : public ls::std::core::Class, public ls::std::core::interface::ISerializable
       {
         public:
 

+ 3 - 3
source/ls_std/event/EventManager.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -15,7 +15,7 @@
 ls::std::event::EventManager::EventManager() : ls::std::core::Class("EventManager")
 {}
 
-void ls::std::event::EventManager::subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener)
+void ls::std::event::EventManager::subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener)
 {
   if (_id.empty() || _listener == nullptr)
   {
@@ -32,7 +32,7 @@ void ls::std::event::EventManager::subscribe(const ls::std::core::type::event_id
   }
 }
 
-void ls::std::event::EventManager::unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener)
+void ls::std::event::EventManager::unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener)
 {
   if (_id.empty() || _listener == nullptr)
   {

+ 4 - 4
source/ls_std/event/Narrator.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-12
+ * Changed:         2022-05-16
  *
  * */
 
@@ -14,7 +14,7 @@
 ls::std::event::Narrator::Narrator() : ls::std::core::Class("Narrator")
 {}
 
-bool ls::std::event::Narrator::addListener(const ::std::shared_ptr<ls::std::core::IListener> &_listener)
+bool ls::std::event::Narrator::addListener(const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener)
 {
   bool wasAdded{};
 
@@ -39,12 +39,12 @@ void ls::std::event::Narrator::clear()
   this->listeners.clear();
 }
 
-std::list<std::shared_ptr<ls::std::core::IListener>> ls::std::event::Narrator::getListeners()
+std::list<std::shared_ptr<ls::std::core::interface::IListener>> ls::std::event::Narrator::getListeners()
 {
   return this->listeners;
 }
 
-bool ls::std::event::Narrator::removeListener(const ::std::shared_ptr<ls::std::core::IListener> &_listener)
+bool ls::std::event::Narrator::removeListener(const ::std::shared_ptr<ls::std::core::interface::IListener> &_listener)
 {
   bool wasRemoved{};
 

+ 3 - 3
source/ls_std/io/logging/Logger.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-13
+ * Changed:         2022-05-16
  *
  * */
 
@@ -13,7 +13,7 @@
 #include <ls_std/io/NewLine.hpp>
 #include <ls_std/core/exception/IllegalArgumentException.hpp>
 
-ls::std::io::Logger::Logger(const ::std::shared_ptr<ls::std::core::IWriter> &_writer)
+ls::std::io::Logger::Logger(const ::std::shared_ptr<ls::std::core::interface::IWriter> &_writer)
     : ls::std::core::Class("Logger"),
       logLevel(ls::std::io::LogLevelValue::INFO)
 {
@@ -78,7 +78,7 @@ void ls::std::io::Logger::warn(const ls::std::core::type::byte *_data)
   }
 }
 
-void ls::std::io::Logger::_assignWriter(const ::std::shared_ptr<ls::std::core::IWriter> &_writer)
+void ls::std::io::Logger::_assignWriter(const ::std::shared_ptr<ls::std::core::interface::IWriter> &_writer)
 {
   if (_writer == nullptr)
   {

+ 15 - 15
test/cases/event/NarratorTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-14
+ * Changed:         2022-05-16
  *
  * */
 
@@ -47,9 +47,9 @@ namespace
     this->createCars();
     ls::std::event::Narrator paintingMachine{};
 
-    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1)));
-    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes2)));
-    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes3)));
+    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1)));
+    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes2)));
+    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes3)));
   }
 
   TEST_F(NarratorTest, addListener_listener_already_exists)
@@ -57,8 +57,8 @@ namespace
     this->createCars();
     ls::std::event::Narrator paintingMachine{};
 
-    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1)));
-    ASSERT_FALSE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1)));
+    ASSERT_TRUE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1)));
+    ASSERT_FALSE(paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1)));
   }
 
   TEST_F(NarratorTest, addListener_no_reference)
@@ -80,9 +80,9 @@ namespace
   {
     this->createCars();
     ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes2));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes3));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes2));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes3));
 
     ASSERT_FALSE(paintingMachine.getListeners().empty());
     paintingMachine.clear();
@@ -99,9 +99,9 @@ namespace
   {
     this->createCars();
     ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes2));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes3));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes2));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes3));
 
     ASSERT_TRUE(paintingMachine.removeListener(this->mercedes2));
     ASSERT_TRUE(paintingMachine.removeListener(this->mercedes1));
@@ -135,9 +135,9 @@ namespace
   {
     this->createCars();
     ls::std::event::Narrator paintingMachine{};
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes1));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes2));
-    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::IListener>(this->mercedes3));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes1));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes2));
+    paintingMachine.addListener(std::dynamic_pointer_cast<ls::std::core::interface::IListener>(this->mercedes3));
 
     ASSERT_STREQ("pink", this->mercedes1->getColor().c_str());
     ASSERT_STREQ("blue", this->mercedes2->getColor().c_str());

+ 9 - 9
test/cases/io/logging/LoggerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2022-05-15
+ * Changed:         2022-05-16
  *
  * */
 
@@ -27,7 +27,7 @@ namespace
       void TearDown() override
       {}
 
-      static std::shared_ptr<ls::std::core::IWriter> createFileLogger(const std::string &_logName)
+      static std::shared_ptr<ls::std::core::interface::IWriter> createFileLogger(const std::string &_logName)
       {
         std::string path = ls_std_test::TestHelper::getResourcesFolderLocation() + _logName;
         ls::std::io::File file{path};
@@ -37,7 +37,7 @@ namespace
           file.createNewFile();
         }
 
-        std::shared_ptr<ls::std::core::IWriter> writer = std::dynamic_pointer_cast<ls::std::core::IWriter>(std::make_shared<ls::std::io::FileOutputStream>(file));
+        std::shared_ptr<ls::std::core::interface::IWriter> writer = std::dynamic_pointer_cast<ls::std::core::interface::IWriter>(std::make_shared<ls::std::io::FileOutputStream>(file));
 
         return writer;
       }
@@ -72,7 +72,7 @@ namespace
     // write to log file
 
     std::string logName = "output_debug.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::DEBUG);
@@ -101,7 +101,7 @@ namespace
     // write to log file
 
     std::string logName = "output_error.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::ERR);
@@ -130,7 +130,7 @@ namespace
     // write to log file
 
     std::string logName = "output_fatal.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::FATAL);
@@ -165,7 +165,7 @@ namespace
     // write to log file
 
     std::string logName = "output_info.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::INFO);
@@ -202,7 +202,7 @@ namespace
     // write to log file
 
     std::string logName = "output_trace.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::TRACE);
@@ -231,7 +231,7 @@ namespace
     // write to log file
 
     std::string logName = "output_warn.log";
-    std::shared_ptr<ls::std::core::IWriter> writer = createFileLogger(logName);
+    std::shared_ptr<ls::std::core::interface::IWriter> writer = createFileLogger(logName);
 
     ls::std::io::Logger logger{writer};
     logger.setLogLevel(ls::std::io::LogLevelValue::WARN);

+ 2 - 2
test/classes/event/DailyNewsAgency.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-14
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,7 +18,7 @@
 
 namespace ls_std_event_test
 {
-  class DailyNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::IListener
+  class DailyNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::interface::IListener
   {
     public:
 

+ 2 - 2
test/classes/event/GossipNewsAgency.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-27
- * Changed:         2022-05-14
+ * Changed:         2022-05-16
  *
  * */
 
@@ -18,7 +18,7 @@
 
 namespace ls_std_event_test
 {
-  class GossipNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::IListener
+  class GossipNewsAgency : public ls_std_event_test::NewsAgency, public ls::std::core::interface::IListener
   {
     public:
 

+ 2 - 2
test/classes/event/TestDataMercedesCar.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2022-05-14
+ * Changed:         2022-05-16
  *
  * */
 
@@ -16,7 +16,7 @@
 
 namespace ls_std_event_test
 {
-  class TestDataMercedesCar : public ls_std_event_test::TestDataCar, public ls::std::core::IListener
+  class TestDataMercedesCar : public ls_std_event_test::TestDataCar, public ls::std::core::interface::IListener
   {
     public: