2019-02-15 21:33:13 -05:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "INotificationListener.h"
|
|
|
|
#include "../Utilities/SimpleLock.h"
|
|
|
|
|
|
|
|
class NotificationManager
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SimpleLock _lock;
|
|
|
|
vector<weak_ptr<INotificationListener>> _listenersToAdd;
|
|
|
|
vector<weak_ptr<INotificationListener>> _listeners;
|
2021-03-10 11:13:28 -05:00
|
|
|
|
2019-02-15 21:33:13 -05:00
|
|
|
void CleanupNotificationListeners();
|
|
|
|
|
|
|
|
public:
|
|
|
|
void RegisterNotificationListener(shared_ptr<INotificationListener> notificationListener);
|
|
|
|
void SendNotification(ConsoleNotificationType type, void* parameter = nullptr);
|
|
|
|
};
|