#include <Siena.h>
Public Methods | |
| virtual void | notify (Notification &e)=0 |
| virtual void | notify (NotificationSequence &s)=0 |
A Notifiable represents an event consumer. Notifications are delivered to a Notifiable by calling its notify method. A Notifiable implement its specific response to event notifications by specializing notify.
Example:
class Ticker : public Notifiable {
virtual void notify(Notification &e) {
cout << e["price"].int_value() << endl;
}
};
// ...
Filter f;
Ticker t;
f.add_constraint("price", SX_lt, 500);
S->subscribe(f, t);
// ...
|
|
response to a notification of a sequence of events The event service calls this method to notify the interested party. The interested party specializes this method to implement its response to the event sequence notification.
|
|
|
response to a notification of an event The event service calls this method to notify the interested party. The interested party specializes this method to implement its response to the event notification.
|