This commit is contained in:
Sven Luethi committed 2021-03-26 22:35:27 +01:00
1 parent f25a834fbd
commit 062f9c8c69
6 files changed
+99 -34

No files matched your search

+5 -3
View File
@@ -4,6 +4,7 @@
#include <thread>
#include <string>
#include <vector>
#include <memory>
namespace Plains {
namespace Core {
@@ -11,6 +12,7 @@ namespace Core {
using std::thread;
using std::string;
using std::vector;
using std::unique_ptr;
class EventSubscriber {
public:
@@ -20,7 +22,8 @@ class EventSubscriber {
class Event {
public:
Event(const string _id);
string& getID() const;
~Event();
const string& getID() const;
void fire();
void subscribe(EventSubscriber* es);
@@ -33,8 +36,7 @@ class EventBus {
public:
EventBus(Logger& logger);
~EventBus();
Event* registerEvent(string eventID);
Event* getEvent(const string& eventID);
Event& registerEvent(const string& eventID);
private:
Logger& _logger;