View Class Reference

#import <View.h>

Inherits IView-p.

List of all members.

Public Member Functions

(id) - init
(void) - initializeView
(BOOL) - hasMediator: [implementation]
(void) - notifyObservers: [implementation]
(void) - registerMediator: [implementation]
(void) - registerObserver:observer: [implementation]
(id< IMediator >) - removeMediator: [implementation]
(void) - removeObserver:notifyContext: [implementation]
(id< IMediator >) - retrieveMediator: [implementation]

Static Public Member Functions

(id< IView >) + getInstance


Detailed Description

A Singleton IView implementation.

In PureMVC, the View class assumes these responsibilities:

See also:
Mediator, Observer, Notification

Member Function Documentation

+ (id< IView >) getInstance  

View Singleton Factory method.

Returns:
the Singleton instance of View

- (BOOL) hasMediator: (NSString *)  mediatorName   [implementation]

Check if a Mediator is registered or not

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

Reimplemented from < IView >.

- (id) init  

Constructor.

This IView implementation is a Singleton, so you should not call the constructor directly, but instead call the static Singleton Factory method [View getInstance]

Exceptions:
NSException if Singleton instance has already been constructed

- (void) initializeView  

Initialize the Singleton View instance.

Called automatically by the constructor, this is your opportunity to initialize the Singleton instance in your subclass without overriding the constructor.

Returns:
void

- (void) notifyObservers: (id<INotification>)  notification   [implementation]

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 from < IView >.

- (void) registerMediator: (id<IMediator>)  mediator   [implementation]

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 from < IView >.

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

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 from < IView >.

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

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 from < IView >.

- (void) removeObserver: (NSString *)  notificationName
notifyContext: (id)  notifyContext 
[implementation]

Remove the observer for a given notifyContext from an observer list for a given Notification name.

Parameters:
notificationName which observer list to remove from
notifyContext remove the observer with this object as its notifyContext

Reimplemented from < IView >.

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

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 from < IView >.


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