chore: Add course material
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
#ifndef SUBJECT_H
|
||||
#define SUBJECT_H
|
||||
|
||||
class Observer;
|
||||
|
||||
#include <set>
|
||||
|
||||
class Subject {
|
||||
public:
|
||||
typedef std::set<Observer *> ObsList;
|
||||
void attach(Observer &obs);
|
||||
|
||||
protected:
|
||||
void notify() const;
|
||||
|
||||
private:
|
||||
ObsList myObservers;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user