#include <Observer.h>
Definition at line 67 of file Observer.h.
◆ Subject()
Definition at line 73 of file Observer.h.
75 : m_observers()
76
77 {
78
79
80 }
◆ attach()
void Subject::attach |
( |
Observer * | anObserver | ) |
|
|
inline |
Definition at line 86 of file Observer.h.
87 {
88
89 m_observers.push_back(anObserver);
90
91 }
◆ detach()
◆ notify()
Definition at line 105 of file Observer.h.
106 {
107
108 std::vector<Observer*>::iterator it = m_observers.begin();
109 while (it != m_observers.end()) {
110 if (*it) (*it)->update();
111 it++;
112 }
113
114 }
The documentation for this class was generated from the following file: