![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <Observer.hpp>
Inherits wns::ObserverInterface< NOTIFICATIONINTERFACE >< NOTIFICATIONINTERFACE >.
Inherited by lte::controlplane::flowmanagement::flowhandler::FlowHandler, ofdmaphy::Station, wns::events::scheduler::Monitor, and wns::probe::bus::detail::ObserverPimpl.

Public Types | |
| typedef NOTIFICATIONINTERFACE | NotificationInterface |
| The NotificationInterface used by Observer. | |
| typedef ObserverInterface < NotificationInterface > | ObserverType |
| Our interface. | |
| typedef SubjectInterface < ObserverType > | SubjectType |
| The SubjectInterface using the same NotificationInterface. | |
Public Member Functions | |
| Observer (const Observer &other) | |
| The copy obseves the same subjects as the original. | |
| Observer () | |
| Default constructor. | |
| Observer & | operator= (const Observer &other) |
| Remove own subjects, obseve new subjects. | |
| void | startObserving (SubjectType *subject) |
| Nicer to read: oberserver->startObserving(subject);. | |
| void | stopObserving (SubjectType *subject) |
| Nicer to read: oberserver->stopObserving(subject);. | |
| virtual | ~Observer () |
| Detaches itself from every Subject it is attached to. | |
Private Types | |
| typedef std::list< SubjectType * > | SubjectContainer |
Private Member Functions | |
| virtual void | addSubject (SubjectType *subject) |
| template<typename FUNCTOR> | |
| FUNCTOR | forEachSubject (const FUNCTOR &functor) |
| Execute functor on each subject. | |
| virtual void | removeSubject (SubjectType *subject) |
Private Attributes | |
| SubjectContainer | subjects |
| Collection of registered subjects. | |
| NOTIFICATIONINTERFACE | The notification interface of the observer. |
Definition at line 54 of file Observer.hpp.
| typedef NOTIFICATIONINTERFACE wns::Observer< NOTIFICATIONINTERFACE >::NotificationInterface |
The NotificationInterface used by Observer.
Definition at line 63 of file Observer.hpp.
| typedef ObserverInterface<NotificationInterface> wns::Observer< NOTIFICATIONINTERFACE >::ObserverType |
The interface that this Observer implements.
Definition at line 70 of file Observer.hpp.
typedef std::list<SubjectType*> wns::Observer< NOTIFICATIONINTERFACE >::SubjectContainer [private] |
Definition at line 208 of file Observer.hpp.
| typedef SubjectInterface<ObserverType> wns::Observer< NOTIFICATIONINTERFACE >::SubjectType |
The corresponding SubjectInterface that uses the same NotificationInterface.
Reimplemented from wns::ObserverInterface< NOTIFICATIONINTERFACE >.
Definition at line 77 of file Observer.hpp.
| wns::Observer< NOTIFICATIONINTERFACE >::Observer | ( | ) | [inline] |
Definition at line 82 of file Observer.hpp.
| wns::Observer< NOTIFICATIONINTERFACE >::Observer | ( | const Observer< NOTIFICATIONINTERFACE > & | other | ) | [inline] |
Definition at line 90 of file Observer.hpp.
| virtual wns::Observer< NOTIFICATIONINTERFACE >::~Observer | ( | ) | [inline, virtual] |
Every Subject that has informed us, that we are attached to it, will receive a detach.
Definition at line 132 of file Observer.hpp.
| virtual void wns::Observer< NOTIFICATIONINTERFACE >::addSubject | ( | SubjectType * | subject | ) | [inline, private, virtual] |
Add a subject we are attached to.
| subject | A subject we are attached to. |
All subjects that register themselves via this function will receive a detach when this Observer instance is destroyed.
Implements wns::ObserverInterface< NOTIFICATIONINTERFACE >.
Definition at line 168 of file Observer.hpp.
| FUNCTOR wns::Observer< NOTIFICATIONINTERFACE >::forEachSubject | ( | const FUNCTOR & | functor | ) | [inline, private] |
| functor | The function to perform on each subject. |
Definition at line 201 of file Observer.hpp.
| Observer& wns::Observer< NOTIFICATIONINTERFACE >::operator= | ( | const Observer< NOTIFICATIONINTERFACE > & | other | ) | [inline] |
Definition at line 105 of file Observer.hpp.
| virtual void wns::Observer< NOTIFICATIONINTERFACE >::removeSubject | ( | SubjectType * | subject | ) | [inline, private, virtual] |
Remove a subject we were attached to.
| subject | The subject to remove. |
Implements wns::ObserverInterface< NOTIFICATIONINTERFACE >.
Definition at line 181 of file Observer.hpp.
| void wns::Observer< NOTIFICATIONINTERFACE >::startObserving | ( | SubjectType * | subject | ) | [inline] |
Definition at line 144 of file Observer.hpp.
| void wns::Observer< NOTIFICATIONINTERFACE >::stopObserving | ( | SubjectType * | subject | ) | [inline] |
Definition at line 154 of file Observer.hpp.
SubjectContainer wns::Observer< NOTIFICATIONINTERFACE >::subjects [private] |
Collection of registered subjects.
Definition at line 215 of file Observer.hpp.
1.5.5