PureMVC::Notification Class Reference

A base INotification implementation. More...

#include <pmvcpp.h>

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

List of all members.

Public Member Functions

 Notification (int notificationName, void *body, int notificationType)
 Constructor.
 Notification (int notificationName, void *body)
 Notification (int notificationName, int notificationType)
 Notification (int notificationName)
int getName ()
 Get the name of the Notification instance.
void setBody (void *body)
 Set the body of the Notification instance.
void * getBody ()
 Get the body of the Notification instance.
void setType (int notificationType)
 Set the type of the Notification instance.
int getType ()
 Get the type of the Notification instance.

Public Attributes

int name
int type
void * body

Detailed Description

A base INotification implementation.

The Observer Pattern as implemented within PureMVC exists to support event-driven communication between the application and the actors of the MVC triad.

IMediator implementors place event listeners on their view components, which they handle in the usual way. This may lead to the broadcast of Notifications to trigger ICommands or to communicate with other IMediators. IProxy and ICommand instances communicate with each other and IMediators by broadcasting INotifications.

PureMVC Notifications follow a 'Publish/Subscribe' pattern. PureMVC classes need not be related to each other in a parent/child relationship in order to communicate with one another using Notifications.

See also:
Observer

Constructor & Destructor Documentation

Notification::Notification ( int  notificationName,
void *  body,
int  notificationType 
)

Constructor.

Parameters:
name name of the Notification instance. (required)
body the Notification body. (optional)
type the type of the Notification (optional)

Member Function Documentation

void * Notification::getBody (  )  [virtual]

Get the body of the Notification instance.

Returns:
the body object.

Implements PureMVC::INotification.

int Notification::getName (  )  [virtual]

Get the name of the Notification instance.

Returns:
the name of the Notification instance.

Implements PureMVC::INotification.

int Notification::getType (  )  [virtual]

Get the type of the Notification instance.

Returns:
the type

Implements PureMVC::INotification.

void Notification::setBody ( void *  body  )  [virtual]

Set the body of the Notification instance.

Implements PureMVC::INotification.

void Notification::setType ( int  notificationType  )  [virtual]

Set the type of the Notification instance.

Implements PureMVC::INotification.


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

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