Public Member Functions | |
Proxy () | |
A base IProxy implementation. | |
Proxy (std::string proxyName, void *data) | |
Proxy (std::string proxyName) | |
Proxy (void *data) | |
std::string | getProxyName () |
Get the proxy name. | |
void | setData (void *data) |
Set the data object. | |
void * | getData () |
Get the data object. | |
virtual void | onRegister ()=0 |
Called by the Model when the Proxy is registered. | |
virtual void | onRemove ()=0 |
Called by the Model when the Proxy is removed. | |
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. | |
void | sendNotification (int notificationName, void *body, int notificationType) |
Create and send an INotification . | |
void | sendNotification (int notificationName, int notificationType) |
Send a INotification . | |
void | sendNotification (int notificationName, void *body) |
Send a INotification . | |
void | sendNotification (int notificationName) |
Send a INotification . | |
void | initializeNotifier (std::string key) |
Initialize this INotifier instance. | |
virtual void | setMultitonKey (std::string key) |
Set multiton key. | |
virtual std::string | getMultitonKey () |
Get multiton key. | |
Static Public Attributes | |
static std::string | NAME |
Protected Member Functions | |
IFacade * | getFacade () |
Protected Attributes | |
std::string | proxyName |
void * | data |
PureMVC::Proxy::Proxy | ( | ) | [inline] |
A base IProxy
implementation.
In PureMVC, Proxy
classes are used to manage parts of the application's data model.
A Proxy
might simply manage a reference to a local data object, in which case interacting with it might involve setting and getting of its data in synchronous fashion.
Proxy
classes are also used to encapsulate the application's interaction with remote services to save or retrieve data, in which case, we adopt an asyncronous idiom; setting data (or calling a method) on the Proxy
and listening for a Notification
to be sent when the Proxy
has retrieved the data from the service.
void* PureMVC::Proxy::getData | ( | ) | [inline, virtual] |
Get the data object.
Implements PureMVC::IProxy.
std::string MultitonKeyHeir::getMultitonKey | ( | ) | [virtual, inherited] |
Get multiton key.
Returns the multiton key.
Implements PureMVC::IMultitonKeyHeir.
std::string PureMVC::Proxy::getProxyName | ( | ) | [inline, virtual] |
Get the proxy name.
Implements PureMVC::IProxy.
void Notifier::initializeNotifier | ( | std::string | key | ) | [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.
Mediators, Commands or Proxies may override this method in order to send notifications or access the Multiton Facade instance as soon as possible. They CANNOT access the facade in their constructors, since this method will not yet have been called.
key | the multitonKey for this INotifier to use |
Implements PureMVC::INotifier.
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::IProxy::onRegister | ( | ) | [pure virtual, inherited] |
virtual void PureMVC::IProxy::onRemove | ( | ) | [pure virtual, inherited] |
void Notifier::sendNotification | ( | int | notificationName | ) | [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 |
Implements PureMVC::INotifier.
void Notifier::sendNotification | ( | int | notificationName, | |
void * | body | |||
) | [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) |
Implements PureMVC::INotifier.
void Notifier::sendNotification | ( | int | notificationName, | |
int | notificationType | |||
) | [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) |
Implements PureMVC::INotifier.
void Notifier::sendNotification | ( | int | notificationName, | |
void * | body, | |||
int | notificationType | |||
) | [virtual, inherited] |
Create and send an INotification
.
Keeps us from having to construct new INotification instances in our implementation code.
notificationName | the name of the notiification to send | |
body | the body of the notification (optional) | |
type | the type of the notification (optional) |
Implements PureMVC::INotifier.
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.
void PureMVC::Proxy::setData | ( | void * | data | ) | [inline, virtual] |
Set the data object.
Implements PureMVC::IProxy.
void MultitonKeyHeir::setMultitonKey | ( | std::string | key | ) | [virtual, inherited] |
Set multiton key.
Sets the multiton key.
key | The name of the key |
Implements PureMVC::IMultitonKeyHeir.