21 lines
323 B
C++
21 lines
323 B
C++
/*
|
||
* Subject.hpp
|
||
*
|
||
* Created on: 31 окт. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include "Observer.hpp"
|
||
|
||
class Subject
|
||
{
|
||
public:
|
||
virtual void registerObserver(Observer &o) = 0;
|
||
virtual void removeObserver(Observer &o) = 0;
|
||
virtual void notifyObservers() = 0;
|
||
|
||
virtual ~Subject() {}
|
||
};
|