#import <Observer.h>
Inherits IObserver-p.
Public Member Functions | |
(id) | - initWithNotifyMethod:notifyContext: |
(BOOL) | - compareNotifyContext: [implementation] |
(void) | - notifyObserver: [implementation] |
(void) | - setNotifyContext: |
(void) | - setNotifyMethod: |
Static Public Member Functions | |
(id) | + withNotifyMethod:notifyContext: |
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:
- (BOOL) compareNotifyContext: | (id) | object | [implementation] |
Compare an object to the notification context.
object | the object to compare |
Reimplemented from < IObserver >.
- (id) initWithNotifyMethod: | (SEL) | _notifyMethod | ||
notifyContext: | (id) | _notifyContext | ||
Constructor.
The notification method on the interested object should take one parameter of type INotification
notifyMethod | the notification method of the interested object | |
notifyContext | the notification context of the interested object |
- (void) notifyObserver: | (id<INotification>) | notification | [implementation] |
Notify the interested object.
notification | the INotification to pass to the interested object's notification method. |
Reimplemented from < IObserver >.
- (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 |
+ (id) withNotifyMethod: | (SEL) | notifyMethod | ||
notifyContext: | (id) | notifyContext | ||
Static Convienence Constructor.