PureMVC::IView Class Reference

The interface definition for a PureMVC View. More...

#include <pmvcpp.h>

Inheritance diagram for PureMVC::IView:
Inheritance graph
[legend]
Collaboration diagram for PureMVC::IView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void registerObserver (int notificationName, IObserverRestricted *observer)=0
 Register an IObserver to be notified of INotifications with a given name.
virtual void removeObserver (int notificationName, intptr_t contextAddress)=0
 Remove an observer from the observer list for a given Notification name that has a context object stored at contextAddress.
virtual void notifyObservers (INotification *note)=0
 Notify the IObservers for a particular INotification.
virtual void registerMediator (IMediator *mediator)=0
 Register an IMediator instance with the View.
virtual IMediatorretrieveMediator (std::string mediatorName)=0
 Retrieve an IMediator from the View.
virtual IMediatorremoveMediator (std::string mediatorName)=0
 Remove an IMediator from the View.
virtual bool hasMediator (std::string mediatorName)=0
 Check if a Mediator is registered or not.
virtual void setMultitonKey (std::string key)=0
 Set multiton key.
virtual std::string getMultitonKey ()=0
 Get multiton key.

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

virtual std::string PureMVC::IMultitonKeyHeir::getMultitonKey (  )  [pure virtual, inherited]

Get multiton key.

Returns the multiton key.

Returns:
The string key name

Implemented in PureMVC::MultitonKeyHeir.

virtual bool PureMVC::IView::hasMediator ( std::string  mediatorName  )  [pure virtual]

Check if a Mediator is registered or not.

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

Implemented in PureMVC::View.

virtual void PureMVC::IView::notifyObservers ( INotification note  )  [pure virtual]

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.

Implemented in PureMVC::View.

virtual void PureMVC::IView::registerMediator ( IMediator mediator  )  [pure virtual]

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:
mediatorName the name to associate with this IMediator instance
mediator a reference to the IMediator instance

Implemented in PureMVC::View.

virtual void PureMVC::IView::registerObserver ( int  notificationName,
IObserverRestricted observer 
) [pure virtual]

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

Implemented in PureMVC::View.

virtual IMediator* PureMVC::IView::removeMediator ( std::string  mediatorName  )  [pure virtual]

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

Implemented in PureMVC::View.

virtual void PureMVC::IView::removeObserver ( int  notificationName,
intptr_t  contextAddress 
) [pure virtual]

Remove an observer from the observer list for a given Notification name that has a context object stored at contextAddress.

Parameters:
notificationName which observer list to remove from
contextAddress remove the observer with this address as the address of their notifyContext

Implemented in PureMVC::View.

virtual IMediator* PureMVC::IView::retrieveMediator ( std::string  mediatorName  )  [pure virtual]

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.

Implemented in PureMVC::View.

virtual void PureMVC::IMultitonKeyHeir::setMultitonKey ( std::string  key  )  [pure virtual, inherited]

Set multiton key.

Sets the multiton key.

Parameters:
key The name of the key

Implemented in PureMVC::MultitonKeyHeir.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables

Generated on Wed Feb 17 17:11:28 2010 for PureMVC++ by  doxygen 1.6.1