The interface definition for a PureMVC Facade. More...
#include <pmvcpp.h>
Public Member Functions | |
virtual void | registerProxy (IProxy *proxy)=0 |
Register an IProxy with the Model by name. | |
virtual IProxy * | retrieveProxy (std::string proxyName)=0 |
Retrieve a IProxy from the Model by name. | |
virtual IProxy * | removeProxy (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 IMediator * | retrieveMediator (std::string mediatorName)=0 |
Retrieve an IMediator instance from the View . | |
virtual IMediator * | removeMediator (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 Observer s. | |
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. |
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.
virtual std::string PureMVC::IMultitonKeyHeir::getMultitonKey | ( | ) | [pure virtual, inherited] |
Get multiton key.
Returns the multiton key.
Implemented in PureMVC::MultitonKeyHeir.
virtual bool PureMVC::IFacade::hasCommand | ( | int | notificationName | ) | [pure virtual] |
Check if a Command is registered for a given Notification.
notificationName |
notificationName
. Implemented in PureMVC::Facade.
virtual bool PureMVC::IFacade::hasMediator | ( | std::string | mediatorName | ) | [pure virtual] |
Check if a Mediator is registered or not.
mediatorName |
mediatorName
. Implemented in PureMVC::Facade.
virtual bool PureMVC::IFacade::hasProxy | ( | std::string | proxyName | ) | [pure virtual] |
Check if a Proxy is registered.
proxyName |
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.
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 Observer
s.
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.
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
.
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.
Implemented in PureMVC::Facade.
virtual void PureMVC::IFacade::removeCommand | ( | int | notificationName | ) | [pure virtual] |
Register an ICommand
with the Controller
.
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
.
mediatorName | name of the IMediator instance to be removed. |
IMediator
instance previously registered with the given mediatorName
. Implemented in PureMVC::Facade.
virtual IProxy* PureMVC::IFacade::removeProxy | ( | std::string | proxyName | ) | [pure virtual] |
virtual IMediator* PureMVC::IFacade::retrieveMediator | ( | std::string | mediatorName | ) | [pure virtual] |
Retrieve an IMediator
instance from the View
.
mediatorName | the name of the IMediator instance to retrievve |
IMediator
previously registered with the given mediatorName
. Implemented in PureMVC::Facade.
virtual IProxy* PureMVC::IFacade::retrieveProxy | ( | std::string | proxyName | ) | [pure virtual] |
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.
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.
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.
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.
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.
key | The name of the key |
Implemented in PureMVC::MultitonKeyHeir.