#import <IObserver.h>
Inherited by Observer.
Public Member Functions | |
(BOOL) | - compareNotifyContext: |
(void) | - notifyObserver: |
(void) | - setNotifyContext: |
(void) | - setNotifyMethod: |
In PureMVC, IObserver
implementors assume these responsibilities:
The Observer Pattern as implemented within PureMVC exists to support event driven communication between the application and the actors of the MVC triad.
An Observer is an object that encapsulates information about an interested object with a notification method that should be called when an INotification is broadcast. The Observer then acts as a proxy for notifying the interested object.
Observers can receive Notification
s by having their notifyObserver
method invoked, passing in an object implementing the INotification
interface, such as a subclass of Notification
.
- (BOOL) compareNotifyContext: | (id) | object |
Compare the given object to the notificaiton context object.
object | the object to compare. |
Reimplemented in Observer.
- (void) notifyObserver: | (id< INotification >) | notification |
Notify the interested object.
notification | the INotification to pass to the interested object's notification method |
Reimplemented in Observer.
- (void) setNotifyContext: | (id) | notifyContext |
Set the notification context.
notifyContext | the notification context (self) of the interested object |
- (void) setNotifyMethod: | (SEL) | notifyMethod |
Set the notification method.
The notification method should take one parameter of type INotification
notifyMethod | the notification (callback) selector of the interested object |