equal
deleted
inserted
replaced
146 ObserverBase() : _notifier(0) {} |
146 ObserverBase() : _notifier(0) {} |
147 |
147 |
148 /// \brief Constructor which attach the observer into notifier. |
148 /// \brief Constructor which attach the observer into notifier. |
149 /// |
149 /// |
150 /// Constructor which attach the observer into notifier. |
150 /// Constructor which attach the observer into notifier. |
151 ObserverBase(AlterationNotifier& notifier) { |
151 ObserverBase(AlterationNotifier& nf) { |
152 attach(notifier); |
152 attach(nf); |
153 } |
153 } |
154 |
154 |
155 /// \brief Constructor which attach the obserever to the same notifier. |
155 /// \brief Constructor which attach the obserever to the same notifier. |
156 /// |
156 /// |
157 /// Constructor which attach the obserever to the same notifier as |
157 /// Constructor which attach the obserever to the same notifier as |
158 /// the other observer is attached to. |
158 /// the other observer is attached to. |
159 ObserverBase(const ObserverBase& copy) { |
159 ObserverBase(const ObserverBase& copy) { |
160 if (copy.attached()) { |
160 if (copy.attached()) { |
161 attach(*copy._notifier()); |
161 attach(*copy.notifier()); |
162 } |
162 } |
163 } |
163 } |
164 |
164 |
165 /// \brief Destructor |
165 /// \brief Destructor |
166 virtual ~ObserverBase() { |
166 virtual ~ObserverBase() { |
171 |
171 |
172 /// \brief Attaches the observer into an AlterationNotifier. |
172 /// \brief Attaches the observer into an AlterationNotifier. |
173 /// |
173 /// |
174 /// This member attaches the observer into an AlterationNotifier. |
174 /// This member attaches the observer into an AlterationNotifier. |
175 /// |
175 /// |
176 void attach(AlterationNotifier& notifier) { |
176 void attach(AlterationNotifier& nf) { |
177 notifier.attach(*this); |
177 nf.attach(*this); |
178 } |
178 } |
179 |
179 |
180 /// \brief Detaches the observer into an AlterationNotifier. |
180 /// \brief Detaches the observer into an AlterationNotifier. |
181 /// |
181 /// |
182 /// This member detaches the observer from an AlterationNotifier. |
182 /// This member detaches the observer from an AlterationNotifier. |