Browse Source

Add EventHandler class

- add EventHandler class to handle a specific event
A by containing listeners, which would like to
listen to a specific event A
- add test classes for event testing
- add tests for EventHandler class
Patrick-Christopher Mattulat 3 years ago
parent
commit
d80b429c36

+ 10 - 2
CMakeLists.txt

@@ -22,6 +22,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 
 message("${PROJECT_NAME}: Adding include directories...")
 
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/test)
 include_directories(${CMAKE_CURRENT_LIST_DIR}/test/lib/googletest-1.8.1/googletest/include)
 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
 
@@ -75,7 +76,8 @@ set(SOURCE_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/Narrator.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/IListener.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLParser.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/Event.cpp)
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/Event.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/EventHandler.cpp)
 
 set(TEST_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/boxing/IntegerTest.cpp
@@ -121,7 +123,13 @@ set(TEST_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/observer/TestDataMercedesCar.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/NarratorTest.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLParserTest.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventTest.cpp)
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventTest.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/NewsAgency.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/DailyNewsAgency.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/SeriousNewsEvent.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/GossipNewsEvent.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/GossipNewsAgency.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventHandlerTest.cpp)
 
 ##########################################################
 # Build

+ 42 - 0
include/ls_std/event/EventHandler.hpp

@@ -0,0 +1,42 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_EVENT_HANDLER_HPP
+#define LS_STD_EVENT_HANDLER_HPP
+
+#include <ls_std/base/Class.hpp>
+#include <list>
+#include <memory>
+#include <ls_std/logic/IListener.hpp>
+#include "Event.hpp"
+
+namespace ls_std {
+  class EventHandler : public ls_std::Class {
+    public:
+
+      explicit EventHandler(ls_std::event_id  _id);
+      ~EventHandler() override = default;
+
+      ls_std::event_id getId();
+      void notify(const ls_std::Event& _event);
+      void subscribe(const std::shared_ptr<ls_std::IListener>& _listener);
+      void unsubscribe(const std::shared_ptr<ls_std::IListener>& _listener);
+
+    private:
+
+      ls_std::event_id id {};
+      std::list<std::shared_ptr<ls_std::IListener>> listeners {};
+
+      void _addListener(const std::shared_ptr<ls_std::IListener>& _listener);
+      bool _hasListener(const std::shared_ptr<ls_std::IListener>& _listener);
+      void _removeListener(const std::shared_ptr<ls_std::IListener>& _listener);
+  };
+}
+
+#endif

+ 27 - 0
include/ls_std/event/IEventSubscriber.hpp

@@ -0,0 +1,27 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_I_EVENT_SUBSCRIBER_HPP
+#define LS_STD_I_EVENT_SUBSCRIBER_HPP
+
+#include "EventTypes.hpp"
+
+namespace ls_std {
+  class IEventSubscriber {
+    public:
+
+      IEventSubscriber() = default;
+      ~IEventSubscriber() = default;
+
+      virtual void subscribe(const ls_std::event_id& _id) = 0;
+      virtual void unsubscribe(const ls_std::event_id& _id) = 0;
+  };
+}
+
+#endif

+ 3 - 1
include/ls_std/ls_std.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-29
- * Changed:         2020-11-26
+ * Changed:         2020-11-27
  *
  * */
 
@@ -73,5 +73,7 @@
 
 #include "event/Event.hpp"
 #include "event/EventTypes.hpp"
+#include "event/EventHandler.hpp"
+#include "event/IEventSubscriber.hpp"
 
 #endif

+ 63 - 0
source/ls_std/event/EventHandler.cpp

@@ -0,0 +1,63 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include <ls_std/event/EventHandler.hpp>
+
+ls_std::EventHandler::EventHandler(ls_std::event_id  _id) : ls_std::Class("EventHandler"),
+id(std::move(_id))
+{}
+
+ls_std::event_id ls_std::EventHandler::getId()
+{
+  return this->id;
+}
+
+void ls_std::EventHandler::notify(const ls_std::Event &_event)
+{
+  for(const auto& listener : this->listeners) {
+    listener->listen(_event);
+  }
+}
+
+void ls_std::EventHandler::subscribe(const std::shared_ptr<ls_std::IListener> &_listener)
+{
+  if(!this->_hasListener(_listener)) {
+    this->_addListener(_listener);
+  }
+}
+
+void ls_std::EventHandler::unsubscribe(const std::shared_ptr<ls_std::IListener> &_listener)
+{
+  this->_removeListener(_listener);
+}
+
+void ls_std::EventHandler::_addListener(const std::shared_ptr<ls_std::IListener> &_listener)
+{
+  this->listeners.push_back(_listener);
+}
+
+bool ls_std::EventHandler::_hasListener(const std::shared_ptr<ls_std::IListener>& _listener)
+{
+  bool exists {};
+
+  for(const auto& listener : this->listeners) {
+    if(listener == _listener) {
+      exists = true;
+      break;
+    }
+  }
+
+  return exists;
+}
+
+void ls_std::EventHandler::_removeListener(const std::shared_ptr<ls_std::IListener> &_listener)
+{
+  this->listeners.remove(_listener);
+  this->listeners.size();
+}

+ 112 - 0
test/cases/event/EventHandlerTest.cpp

@@ -0,0 +1,112 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include <gtest/gtest.h>
+#include <ls_std/ls_std.hpp>
+#include <ls_std_test.hpp>
+
+namespace {
+  class EventHandlerTest : public ::testing::Test {
+    protected:
+
+      EventHandlerTest() = default;
+      ~EventHandlerTest() override = default;
+
+      void SetUp() override
+      {}
+
+      void TearDown() override
+      {}
+  };
+
+  TEST_F(EventHandlerTest, getClassName)
+  {
+    ls_std::EventHandler eventHandler {"EventId"};
+    ASSERT_STREQ("EventHandler", eventHandler.getClassName().c_str());
+  }
+
+  TEST_F(EventHandlerTest, getId)
+  {
+    ls_std::EventHandler eventHandler {"EventId"};
+    ASSERT_STREQ("EventId", eventHandler.getId().c_str());
+  }
+
+  TEST_F(EventHandlerTest, production_example)
+  {
+    std::string news, expectedNews {};
+    ls_std::event_id seriousNewsEventId = ls_std_test::SeriousNewsEvent {""}.getId();
+    ls_std::event_id gossipNewsEventId = ls_std_test::GossipNewsEvent {""}.getId();
+
+    // create event handler
+
+    std::shared_ptr<ls_std::EventHandler> seriousNewsEventHandler = std::make_shared<ls_std::EventHandler>(seriousNewsEventId);   // event id
+    std::shared_ptr<ls_std::EventHandler> gossipNewsEventHandler = std::make_shared<ls_std::EventHandler>(gossipNewsEventId);     // event id
+
+    // create news agency (listener)
+
+    std::shared_ptr<ls_std_test::DailyNewsAgency> dailyNews = std::make_shared<ls_std_test::DailyNewsAgency>();
+    std::shared_ptr<ls_std_test::GossipNewsAgency> gossipNews = std::make_shared<ls_std_test::GossipNewsAgency>();
+
+    // add handler of those events, every news agency should know
+    // this is how agencies know about events
+
+    dailyNews->addEventHandler(seriousNewsEventHandler);
+
+    gossipNews->addEventHandler(seriousNewsEventHandler);
+    gossipNews->addEventHandler(gossipNewsEventHandler);
+
+    // fire SeriousNewsEvent event with no effect
+
+    seriousNewsEventHandler->notify(ls_std_test::SeriousNewsEvent(news)); // event call
+    ASSERT_TRUE(dailyNews->getNews().empty());
+    ASSERT_TRUE(gossipNews->getNews().empty());
+
+    // now subscribe to SeriousNewsEvent and fire SeriousNewsEvent event
+
+    dailyNews->subscribe(seriousNewsEventId);
+    gossipNews->subscribe(seriousNewsEventId);
+    news = "COVID-19 is still going on!";
+    seriousNewsEventHandler->notify(ls_std_test::SeriousNewsEvent(news)); // event call
+
+    expectedNews = "DailyNewsAgency: " + news;
+    ASSERT_STREQ(expectedNews.c_str(), dailyNews->getNews().c_str());
+    expectedNews = "GossipNewsAgency: " + news;
+    ASSERT_STREQ(expectedNews.c_str(), gossipNews->getNews().c_str());
+
+    dailyNews->clear();
+    gossipNews->clear();
+
+    // unsubscribe SeriousNewsEvent from GossipNewsAgency
+
+    gossipNews->unsubscribe(seriousNewsEventId);
+    seriousNewsEventHandler->notify(ls_std_test::SeriousNewsEvent(news)); // event call
+
+    expectedNews = "DailyNewsAgency: " + news;
+    ASSERT_STREQ(expectedNews.c_str(), dailyNews->getNews().c_str());
+    ASSERT_TRUE(gossipNews->getNews().empty());
+
+    dailyNews->clear();
+    gossipNews->clear();
+
+    // now let GossipNewsAgency subscribe to SeriousNewsEvent + GossipNewsEvent and fire both of them
+
+    gossipNews->subscribe(gossipNewsEventId);
+    gossipNews->subscribe(seriousNewsEventId);
+
+    news = "COVID-19 is still going on!";
+    seriousNewsEventHandler->notify(ls_std_test::SeriousNewsEvent(news));
+    expectedNews = "GossipNewsAgency: " + news;
+    ASSERT_STREQ(expectedNews.c_str(), gossipNews->getNews().c_str());
+
+    news = "ape likes banana!";
+    seriousNewsEventHandler->notify(ls_std_test::GossipNewsEvent(news));
+    expectedNews = "GossipNewsAgency: " + news;
+    ASSERT_STREQ(expectedNews.c_str(), gossipNews->getNews().c_str());
+  }
+}

+ 55 - 0
test/classes/event/DailyNewsAgency.cpp

@@ -0,0 +1,55 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include "DailyNewsAgency.hpp"
+
+ls_std_test::DailyNewsAgency::DailyNewsAgency() : ls_std_test::NewsAgency("DailyNewsAgency")
+{}
+
+void ls_std_test::DailyNewsAgency::clear()
+{
+  this->news.clear();
+}
+
+std::string ls_std_test::DailyNewsAgency::getNews()
+{
+  return this->news;
+}
+
+void ls_std_test::DailyNewsAgency::listen(const ls_std::Class &_info)
+{
+  ls_std::Event event = dynamic_cast<const ls_std::Event&>(_info);
+
+  if(event.getId() == "SeriousNewsEvent") {
+    this->news = this->getName() + ": " + event.getParameterList().at("news");
+  }
+}
+
+void ls_std_test::DailyNewsAgency::subscribe(const ls_std::event_id &_id)
+{
+  // TODO: check event handler existence
+
+//  std::shared_ptr<ls_std_test::DailyNewsAgency> listener = this->shared_from_this();
+  this->eventHandlers.at(_id)->subscribe(this->shared_from_this());
+}
+
+void ls_std_test::DailyNewsAgency::unsubscribe(const ls_std::event_id &_id)
+{
+  // TODO: check event handler existence
+
+  this->eventHandlers.at(_id)->unsubscribe(this->shared_from_this());
+}
+
+void ls_std_test::DailyNewsAgency::addEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler)
+{
+  // TODO: check event handler existence
+
+  std::pair<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> entry = std::make_pair(_eventHandler->getId(), _eventHandler);
+  this->eventHandlers.insert(entry);
+}

+ 45 - 0
test/classes/event/DailyNewsAgency.hpp

@@ -0,0 +1,45 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_DAILY_NEWS_AGENCY_HPP
+#define LS_STD_DAILY_NEWS_AGENCY_HPP
+
+#include <string>
+#include <memory>
+#include <map>
+#include <ls_std/ls_std.hpp>
+#include "NewsAgency.hpp"
+
+namespace ls_std_test {
+  class DailyNewsAgency : public ls_std_test::NewsAgency, public ls_std::IEventSubscriber, public ls_std::IListener, public std::enable_shared_from_this<ls_std_test::DailyNewsAgency> {
+    public:
+
+      DailyNewsAgency();
+      ~DailyNewsAgency() override = default;
+
+      // implementation
+
+      void clear();
+      std::string getNews();
+      void listen(const ls_std::Class& _info) override;
+      void subscribe(const ls_std::event_id& _id) override;
+      void unsubscribe(const ls_std::event_id& _id) override;
+
+      // additional functionality
+
+      void addEventHandler(const std::shared_ptr<ls_std::EventHandler>& _eventHandler);
+
+    private:
+
+      std::map<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> eventHandlers {};
+      std::string news {};
+  };
+}
+
+#endif

+ 58 - 0
test/classes/event/GossipNewsAgency.cpp

@@ -0,0 +1,58 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include "GossipNewsAgency.hpp"
+
+ls_std_test::GossipNewsAgency::GossipNewsAgency() : ls_std_test::NewsAgency("GossipNewsAgency")
+{}
+
+void ls_std_test::GossipNewsAgency::clear()
+{
+  this->news.clear();
+}
+
+std::string ls_std_test::GossipNewsAgency::getNews()
+{
+  return this->news;
+}
+
+void ls_std_test::GossipNewsAgency::listen(const ls_std::Class &_info)
+{
+  ls_std::Event event = dynamic_cast<const ls_std::Event&>(_info);
+
+  if(event.getId() == "SeriousNewsEvent") {
+    this->news = this->getName() + ": " + event.getParameterList().at("news");
+  }
+
+  if(event.getId() == "GossipNewsEvent") {
+    this->news = this->getName() + ": " + event.getParameterList().at("news");
+  }
+}
+
+void ls_std_test::GossipNewsAgency::subscribe(const ls_std::event_id &_id)
+{
+  // TODO: check event handler existence
+
+  this->eventHandlers.at(_id)->subscribe(this->shared_from_this());
+}
+
+void ls_std_test::GossipNewsAgency::unsubscribe(const ls_std::event_id &_id)
+{
+  // TODO: check event handler existence
+
+  this->eventHandlers.at(_id)->unsubscribe(this->shared_from_this());
+}
+
+void ls_std_test::GossipNewsAgency::addEventHandler(const std::shared_ptr<ls_std::EventHandler> &_eventHandler)
+{
+  // TODO: check event handler existence
+
+  std::pair<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> entry = std::make_pair(_eventHandler->getId(), _eventHandler);
+  this->eventHandlers.insert(entry);
+}

+ 45 - 0
test/classes/event/GossipNewsAgency.hpp

@@ -0,0 +1,45 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_GOSSIP_NEWS_AGENCY_HPP
+#define LS_STD_GOSSIP_NEWS_AGENCY_HPP
+
+#include <string>
+#include <memory>
+#include <map>
+#include <ls_std/ls_std.hpp>
+#include "NewsAgency.hpp"
+
+namespace ls_std_test {
+  class GossipNewsAgency : public ls_std_test::NewsAgency, public ls_std::IEventSubscriber, public ls_std::IListener, public std::enable_shared_from_this<ls_std_test::GossipNewsAgency> {
+    public:
+
+      GossipNewsAgency();
+      ~GossipNewsAgency() override = default;
+
+      // implementation
+
+      void clear();
+      std::string getNews();
+      void listen(const ls_std::Class& _info) override;
+      void subscribe(const ls_std::event_id& _id) override;
+      void unsubscribe(const ls_std::event_id& _id) override;
+
+      // additional functionality
+
+      void addEventHandler(const std::shared_ptr<ls_std::EventHandler>& _eventHandler);
+
+    private:
+
+      std::map<ls_std::event_id, std::shared_ptr<ls_std::EventHandler>> eventHandlers {};
+      std::string news {};
+  };
+}
+
+#endif

+ 16 - 0
test/classes/event/GossipNewsEvent.cpp

@@ -0,0 +1,16 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include "GossipNewsEvent.hpp"
+
+ls_std_test::GossipNewsEvent::GossipNewsEvent(const std::string& _news) : ls_std::Event("GossipNewsEvent")
+{
+  ls_std::event_parameter newsParameter = std::make_pair("news", _news);
+  this->addParameter(newsParameter);
+}

+ 25 - 0
test/classes/event/GossipNewsEvent.hpp

@@ -0,0 +1,25 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_GOSSIP_NEWS_EVENT_HPP
+#define LS_STD_GOSSIP_NEWS_EVENT_HPP
+
+#include <ls_std/ls_std.hpp>
+#include <string>
+
+namespace ls_std_test {
+  class GossipNewsEvent : public ls_std::Event {
+    public:
+
+      explicit GossipNewsEvent(const std::string& _news);
+      ~GossipNewsEvent() override = default;
+  };
+}
+
+#endif

+ 19 - 0
test/classes/event/NewsAgency.cpp

@@ -0,0 +1,19 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include "NewsAgency.hpp"
+
+ls_std_test::NewsAgency::NewsAgency(std::string _agencyName) :
+agencyName(std::move(_agencyName))
+{}
+
+std::string ls_std_test::NewsAgency::getName()
+{
+  return this->agencyName;
+}

+ 30 - 0
test/classes/event/NewsAgency.hpp

@@ -0,0 +1,30 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_NEWS_AGENCY_HPP
+#define LS_STD_NEWS_AGENCY_HPP
+
+#include <string>
+
+namespace ls_std_test {
+  class NewsAgency {
+    public:
+
+      explicit NewsAgency(std::string _agencyName);
+      ~NewsAgency() = default;
+
+      std::string getName();
+
+    private:
+
+      std::string agencyName {};
+  };
+}
+
+#endif

+ 16 - 0
test/classes/event/SeriousNewsEvent.cpp

@@ -0,0 +1,16 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#include "SeriousNewsEvent.hpp"
+
+ls_std_test::SeriousNewsEvent::SeriousNewsEvent(const std::string& _news) : ls_std::Event("SeriousNewsEvent")
+{
+  ls_std::event_parameter newsParameter = std::make_pair("news", _news);
+  this->addParameter(newsParameter);
+}

+ 25 - 0
test/classes/event/SeriousNewsEvent.hpp

@@ -0,0 +1,25 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_SERIOUS_NEWS_EVENT_HPP
+#define LS_STD_SERIOUS_NEWS_EVENT_HPP
+
+#include <ls_std/ls_std.hpp>
+#include <string>
+
+namespace ls_std_test {
+  class SeriousNewsEvent : public ls_std::Event {
+    public:
+
+      explicit SeriousNewsEvent(const std::string& _news);
+      ~SeriousNewsEvent() override = default;
+  };
+}
+
+#endif

+ 19 - 0
test/ls_std_test.hpp

@@ -0,0 +1,19 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-11-27
+ * Changed:         2020-11-27
+ *
+ * */
+
+#ifndef LS_STD_LS_STD_TEST_HPP
+#define LS_STD_LS_STD_TEST_HPP
+
+#include "classes/event/NewsAgency.hpp"
+#include "classes/event/DailyNewsAgency.hpp"
+#include "classes/event/GossipNewsAgency.hpp"
+#include "classes/event/GossipNewsEvent.hpp"
+#include "classes/event/SeriousNewsEvent.hpp"
+
+#endif