FreePOOMA
2.4.1
|
#include <Observer.h>
Public Member Functions | |
SingleObserver () | |
The constructor and destructor for Observer do nothing. | |
virtual | ~SingleObserver () |
virtual void | notify (const T &observed, const ObserverEvent &event)=0 |
The one virtual public interface method for SingleObserver. | |
void | notify (const T &observed, int event) |
A non-virtual notify that just wrapps the given integer in an event object and passes that on. |
SingleObserver< T >::SingleObserver | ( | ) | [inline] |
virtual SingleObserver< T >::~SingleObserver | ( | ) | [inline, virtual] |
virtual void SingleObserver< T >::notify | ( | const T & | observed, |
const ObserverEvent & | event | ||
) | [pure virtual] |
The one virtual public interface method for SingleObserver.
notify is called by an Observable when it needs to tell attached Observer that some event has occurred. It is up to the derived class, for the type T, to be able to interpret the meaning of the integer event code in the provided ObserverEvent object (or to ignore it, if it needs to). notify is called with a reference to the object being observed and the event which occurred. Note that event code '0' is special; it means that the given Observable is being destroyed, so this Observer should just note that it is no longer attached to that Observable.
Referenced by SingleObserver< int >::notify().
void SingleObserver< T >::notify | ( | const T & | observed, |
int | event | ||
) | [inline] |
A non-virtual notify that just wrapps the given integer in an event object and passes that on.