GossipNewsAgency.hpp 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-27
  6. * Changed: 2022-05-20
  7. *
  8. * */
  9. #ifndef LS_STD_GOSSIP_NEWS_AGENCY_HPP
  10. #define LS_STD_GOSSIP_NEWS_AGENCY_HPP
  11. #include <string>
  12. #include <memory>
  13. #include <map>
  14. #include <ls_std/ls_std_core.hpp>
  15. #include <ls_std/ls_std_event.hpp>
  16. #include "NewsAgency.hpp"
  17. #include "GossipNewsEvent.hpp"
  18. using ls::std::event::interface_type::IEventManager;
  19. namespace ls_std_event_test
  20. {
  21. class GossipNewsAgency : public ls_std_event_test::NewsAgency
  22. {
  23. public:
  24. GossipNewsAgency(::std::string agencyName, EventManager eventManager);
  25. ~GossipNewsAgency();
  26. // implementation
  27. void onGossipNews(ls_std_event_test::GossipNewsEvent event);
  28. // additional functionality
  29. void clear();
  30. ::std::string getNews();
  31. private:
  32. EventManager m_eventManager;
  33. ::std::string news{};
  34. };
  35. }
  36. #endif