Observer Class Reference

#import <Observer.h>

Inherits IObserver-p.

List of all members.

Public Member Functions

(id) - initWithNotifyMethod:notifyContext:
(BOOL) - compareNotifyContext: [implementation]
(void) - notifyObserver: [implementation]
(void) - setNotifyContext:
(void) - setNotifyMethod:

Static Public Member Functions

(id) + withNotifyMethod:notifyContext:


Detailed Description

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:

See also:
View, Notification

Member Function Documentation

- (BOOL) compareNotifyContext: (id)  object   [implementation]

Compare an object to the notification context.

Parameters:
object the object to compare
Returns:
boolean indicating if the object and the notification context are the same

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

Parameters:
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.

Parameters:
notification the INotification to pass to the interested object's notification method.

Reimplemented from < IObserver >.

- (void) setNotifyContext: (id)  notifyContext  

Set the notification context.

Parameters:
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

Parameters:
notifyMethod the notification (callback) selector of the interested object

+ (id) withNotifyMethod: (SEL)  notifyMethod
notifyContext: (id)  notifyContext 

Static Convienence Constructor.


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  doxygen 1.5.7.1