changed to smart ptrs and trying to fix event_handler_tests

This commit is contained in:
Jonas Zeunert
2018-07-11 19:00:24 +02:00
parent 26c63d946d
commit 8b9ec68662
12 changed files with 47 additions and 61 deletions

View File

@@ -20,14 +20,13 @@ class InputDriver : public IInputDriver
public:
InputDriver(IEventNotifier* event_notifier, IDetector* detector);
~InputDriver();
InputDriver(std::shared_ptr<IEventNotifier> event_notifier, std::unique_ptr<IDetector> detector);
virtual void register_event_handler(IEventHandler* handler) override;
virtual void unregister_event_handler(IEventHandler* handler) override;
private:
IEventNotifier* event_notifier;
IDetector* detector;
std::shared_ptr<IEventNotifier> event_notifier;
std::unique_ptr<IDetector> detector;
};
}