A base IObserver implementation.
More...
#include <pmvcpp.h>


Public Member Functions | |
| Observer (NotifyMethod method, NotifyContext context) | |
| Constructor. | |
| void | setNotifyMethod (NotifyMethod method) |
| Set the notification method. | |
| void | setNotifyContext (NotifyContext context) |
| Set the notification context. | |
| NotifyMethod | getNotifyMethod () |
| Get the notification method. | |
| NotifyContext | getNotifyContext () |
| Get the notification context. | |
| void | notifyObserver (INotification *notification) |
| Notify the interested object. | |
| bool | compareNotifyContext (intptr_t compareContextMemoryAddress) |
| Compare the given memory address with the stored context's address. | |
| virtual void | setNotifyMethod (void(T::*fptr)(INotification *))=0 |
| Set the notification method. | |
A base IObserver implementation.
An Observer is an object that encapsulates information about an interested object with a method that should be called when a particular INotification is broadcast.
In PureMVC, the Observer class assumes these responsibilities:
| PureMVC::Observer< T >::Observer | ( | NotifyMethod | method, | |
| NotifyContext | context | |||
| ) | [inline] |
Constructor.
The notification method on the interested object should take one parameter of type INotification
| method | the notification method of the interested object | |
| context | the notification context of the interested object |
| bool PureMVC::Observer< T >::compareNotifyContext | ( | intptr_t | compareContextMemoryAddress | ) | [inline, virtual] |
Compare the given memory address with the stored context's address.
| compareContextMemoryAddress | the object to compare's memory address |
Implements PureMVC::IObserverRestricted.
| NotifyContext PureMVC::Observer< T >::getNotifyContext | ( | ) | [inline] |
Get the notification context.
this) of the interested object. | NotifyMethod PureMVC::Observer< T >::getNotifyMethod | ( | ) | [inline] |
Get the notification method.
| void PureMVC::Observer< T >::notifyObserver | ( | INotification * | notification | ) | [inline, virtual] |
Notify the interested object.
| notification | the INotification to pass to the interested object's notification method. |
Implements PureMVC::IObserverRestricted.
| void PureMVC::Observer< T >::setNotifyContext | ( | NotifyContext | context | ) | [inline, virtual] |
Set the notification context.
| context | the notification context (this) of the interested object. |
Implements PureMVC::IObserverTemplated< T >.
| virtual void PureMVC::IObserverTemplated< T >::setNotifyMethod | ( | void(T::*)(INotification *) | fptr | ) | [pure virtual, inherited] |
Set the notification method.
The notification method should take one parameter of type INotification
| notifyMethod | the notification (callback) method of the interested object |
| void PureMVC::Observer< T >::setNotifyMethod | ( | NotifyMethod | method | ) | [inline] |
Set the notification method.
The notification method should take one parameter of type INotification.
| method | the notification (callback) method of the interested object. |
1.6.1