vstdio / ood

Репозиторий для лабораторных работ по дисциплине "Объектно-ориентированное проектирование"
MIT License
0 stars 0 forks source link

Замечания по паттерну наблюдатель #2

Closed alexey-malov closed 6 years ago

alexey-malov commented 6 years ago

https://github.com/chosti34/ood/blob/595d49a7b1688a4cec92071c7c03ccb69894846f/Observer/ObserversPriorities/Observer.h#L93-L99

alexey-malov commented 6 years ago

https://github.com/chosti34/ood/blob/595d49a7b1688a4cec92071c7c03ccb69894846f/Observer/ObserversPriorities/Observer.h#L42-L50

alexey-malov commented 6 years ago

https://github.com/chosti34/ood/blob/595d49a7b1688a4cec92071c7c03ccb69894846f/Observer/ObserversPriorities/Observer.h#L85-L88

alexey-malov commented 6 years ago

https://github.com/chosti34/ood/blob/595d49a7b1688a4cec92071c7c03ccb69894846f/Observer/MultipleSubjects/Observer.h#L28-L37

alexey-malov commented 6 years ago
alexey-malov commented 6 years ago
alexey-malov commented 6 years ago
template <typename T>
class IObservable
{
public:
    virtual ~IObservable() = default;
    virtual void RegisterObserver(EventType event, IObserver<T>& observer) = 0;
    virtual void RemoveObserver(EventType event, IObserver<T>& observer) = 0;
    virtual void NotifyObservers(EventType event) = 0;
};
alexey-malov commented 6 years ago