PureMVC::IFacade Class Reference

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

#include <pmvcpp.h>

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

List of all members.

Public Member Functions

virtual void registerProxy (IProxy *proxy)=0
 Register an IProxy with the Model by name.
virtual IProxyretrieveProxy (std::string proxyName)=0
 Retrieve a IProxy from the Model by name.
virtual IProxyremoveProxy (std::string proxyName)=0
 Remove an IProxy instance from the Model by name.
virtual bool hasProxy (std::string proxyName)=0
 Check if a Proxy is registered.
virtual void removeCommand (int notificationName)=0
 Register an ICommand with the Controller.
virtual bool hasCommand (int notificationName)=0
 Check if a Command is registered for a given Notification.
virtual void registerMediator (IMediator *mediator)=0
 Register an IMediator instance with the View.
virtual IMediatorretrieveMediator (std::string mediatorName)=0
 Retrieve an IMediator instance from the View.
virtual IMediatorremoveMediator (std::string mediatorName)=0
 Remove a IMediator instance from the View.
virtual bool hasMediator (std::string mediatorName)=0
 Check if a Mediator is registered or not.
virtual void notifyObservers (INotification *notification)=0
 Notify Observers.
virtual void sendNotification (int notificationName, void *body, int notificationType)=0
 Send a INotification.
virtual void sendNotification (int notificationName, int notificationType)=0
 Send a INotification.
virtual void sendNotification (int notificationName, void *body)=0
 Send a INotification.
virtual void sendNotification (int notificationName)=0
 Send a INotification.
virtual void initializeNotifier (std::string key)=0
 Initialize this INotifier instance.
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 Facade.

The Facade Pattern suggests providing a single class to act as a central point of communication for a subsystem.

In PureMVC, the Facade acts as an interface between the core MVC actors (Model, View, Controller) and the rest of your application.

See also:
IModel
IView
IController
ICommand
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::IFacade::hasCommand ( int  notificationName  )  [pure virtual]

Check if a Command is registered for a given Notification.

Parameters:
notificationName 
Returns:
whether a Command is currently registered for the given notificationName.

Implemented in PureMVC::Facade.

virtual bool PureMVC::IFacade::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::Facade.

virtual bool PureMVC::IFacade::hasProxy ( std::string  proxyName  )  [pure virtual]

Check if a Proxy is registered.

Parameters:
proxyName 
Returns:
whether a Proxy is currently registered with the given proxyName.

Implemented in PureMVC::Facade.

virtual void PureMVC::INotifier::initializeNotifier ( std::string  key  )  [pure virtual, inherited]

Initialize this INotifier instance.

This is how a Notifier gets its multitonKey. Calls to sendNotification or to access the facade will fail until after this method has been called.

Parameters:
key the multitonKey for this INotifier to use

Implemented in PureMVC::Notifier, and PureMVC::Facade.

virtual void PureMVC::IFacade::notifyObservers ( INotification notification  )  [pure virtual]

Notify Observers.

This method is left public mostly for backward compatibility, and to allow you to send custom notification classes using the facade.

Usually you should just call sendNotification and pass the parameters, never having to construct the notification yourself.

Parameters:
notification the INotification to have the View notify Observers of.

Implemented in PureMVC::Facade.

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

Register an IMediator instance with the View.

Parameters:
mediator a reference to the IMediator instance

Implemented in PureMVC::Facade.

virtual void PureMVC::IFacade::registerProxy ( IProxy proxy  )  [pure virtual]

Register an IProxy with the Model by name.

Parameters:
proxy the IProxy to be registered with the Model.

Implemented in PureMVC::Facade.

virtual void PureMVC::IFacade::removeCommand ( int  notificationName  )  [pure virtual]

Register an ICommand with the Controller.

Parameters:
noteName the name of the INotification to associate the ICommand with.
commandClassRef a reference to the Class of the ICommand. Remove a previously registered ICommand to INotification mapping from the Controller.
notificationName the name of the INotification to remove the ICommand mapping for

Implemented in PureMVC::Facade.

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

Remove a IMediator instance from the View.

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

Implemented in PureMVC::Facade.

virtual IProxy* PureMVC::IFacade::removeProxy ( std::string  proxyName  )  [pure virtual]

Remove an IProxy instance from the Model by name.

Parameters:
proxyName the IProxy to remove from the Model.
Returns:
the IProxy that was removed from the Model

Implemented in PureMVC::Facade.

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

Retrieve an IMediator instance from the View.

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

Implemented in PureMVC::Facade.

virtual IProxy* PureMVC::IFacade::retrieveProxy ( std::string  proxyName  )  [pure virtual]

Retrieve a IProxy from the Model by name.

Parameters:
proxyName the name of the IProxy instance to be retrieved.
Returns:
the IProxy previously regisetered by proxyName with the Model.

Implemented in PureMVC::Facade.

virtual void PureMVC::INotifier::sendNotification ( int  notificationName  )  [pure virtual, inherited]

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.

Parameters:
notificationName the name of the notification to send

Implemented in PureMVC::Notifier, and PureMVC::Facade.

virtual void PureMVC::INotifier::sendNotification ( int  notificationName,
void *  body 
) [pure virtual, inherited]

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.

Parameters:
notificationName the name of the notification to send
body the body of the notification (optional)

Implemented in PureMVC::Notifier, and PureMVC::Facade.

virtual void PureMVC::INotifier::sendNotification ( int  notificationName,
int  notificationType 
) [pure virtual, inherited]

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.

Parameters:
notificationName the name of the notification to send
type the type of the notification (optional)

Implemented in PureMVC::Notifier, and PureMVC::Facade.

virtual void PureMVC::INotifier::sendNotification ( int  notificationName,
void *  body,
int  notificationType 
) [pure virtual, inherited]

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.

Parameters:
notificationName the name of the notification to send
body the body of the notification (optional)
type the type of the notification (optional)

Implemented in PureMVC::Notifier, and PureMVC::Facade.

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