< IView > Protocol Reference

#import <IView.h>

Inherited by View.

List of all members.

Public Member Functions

(BOOL) - hasMediator:
(void) - notifyObservers:
(void) - registerMediator:
(void) - registerObserver:observer:
(id< IMediator >) - removeMediator:
(void) - removeObserver:notifyContext:
(id< IMediator >) - retrieveMediator:


Detailed Description

The interface definition for a PureMVC View.

In PureMVC, IView implementors assume these responsibilities:

In PureMVC, the View class assumes these responsibilities:

See also:
IMediator, IObserver, INotification

Member Function Documentation

- (BOOL) hasMediator: (NSString *)  mediatorName  

Check if a Mediator is registered or not

Parameters:
mediatorName 
Returns:
whether a Mediator is registered with the given mediatorName.

Reimplemented in View.

- (void) notifyObservers: (id< INotification >)  notification  

Notify the IObservers for a particular INotification.

All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.

Parameters:
notification the INotification to notify IObservers of.

Reimplemented in View.

- (void) registerMediator: (id< IMediator >)  mediator  

Register an IMediator instance with the View.

Registers the IMediator so that it can be retrieved by name, and further interrogates the IMediator for its INotification interests.

If the IMediator returns any INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an Observer for all INotifications the IMediator is interested in.

Parameters:
mediator a reference to the IMediator instance

Reimplemented in View.

- (void) registerObserver: (NSString *)  notificationName
observer: (id< IObserver >)  observer 

Register an IObserver to be notified of INotifications with a given name.

Parameters:
notificationName the name of the INotifications to notify this IObserver of
observer the IObserver to register

Reimplemented in View.

- (id<IMediator>) removeMediator: (NSString *)  mediatorName  

Remove an IMediator from the View.

Parameters:
mediatorName name of the IMediator instance to be removed.
Returns:
the IMediator that was removed from the View

Reimplemented in View.

- (void) removeObserver: (NSString *)  notificationName
notifyContext: (id)  notifyContext 

Remove a group of observers from the observer list for a given Notification name.

Parameters:
notificationName which observer list to remove from
notifyContext removed the observers with this object as their notifyContext

Reimplemented in View.

- (id<IMediator>) retrieveMediator: (NSString *)  mediatorName  

Retrieve an IMediator from the View.

Parameters:
mediatorName the name of the IMediator instance to retrieve.
Returns:
the IMediator instance previously registered with the given mediatorName.

Reimplemented in View.


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