1 #pragma once 2 #include "stdafx.h" 3 #include "INotificationListener.h" 4 #include "../Utilities/SimpleLock.h" 5 6 class NotificationManager 7 { 8 private: 9 SimpleLock _lock; 10 vector<weak_ptr<INotificationListener>> _listenersToAdd; 11 vector<weak_ptr<INotificationListener>> _listeners; 12 13 void CleanupNotificationListeners(); 14 15 public: 16 void RegisterNotificationListener(shared_ptr<INotificationListener> notificationListener); 17 void SendNotification(ConsoleNotificationType type, void* parameter = nullptr); 18 }; 19