#include <mmsevent.h>

Public Member Functions | |
| MMSEvent (string heading="noreceiver") | |
| Constructor. | |
| virtual void | setHeading (string heading) |
| Setter method to set heading to identify the created event. | |
| virtual string | getHeading () |
| Getter method to fetch heading to identify the event. | |
| virtual string | getData (string key) |
| Get additional event parameters. | |
| virtual void | setData (string key, string value) |
| Set additional event parameters. | |
| virtual void | clear () |
| Clear given event parameters. | |
| virtual void | send () |
| Send event. | |
| void | setDispatcher (IMMSEventDispatcher *dispatcher) |
| Set dispatcher interface to raise events. | |
| void | sendTo (int pluginid) |
| Send event to given plugin. | |
Private Attributes | |
| string | heading |
| identifier for event | |
| std::map< string, string > | data |
| additional key-value-pairs as event parameters | |
Static Private Attributes | |
| static IMMSEventDispatcher * | dispatcher = NULL |
| dispatcher interface used for raising events | |
It is possible to create events by defining a heading used to identify received events and additional parameters by using key-value-pairs.
Definition at line 56 of file mmsevent.h.
| MMSEvent::MMSEvent | ( | string | heading = "noreceiver" |
) |
| void MMSEvent::setHeading | ( | string | heading | ) | [virtual] |
Setter method to set heading to identify the created event.
| heading | identifier for event |
Implements _IMMSEvent.
Definition at line 47 of file mmsevent.cpp.
| string MMSEvent::getHeading | ( | ) | [virtual] |
Getter method to fetch heading to identify the event.
Implements _IMMSEvent.
Definition at line 51 of file mmsevent.cpp.
| string MMSEvent::getData | ( | string | key | ) | [virtual] |
Get additional event parameters.
Parameters consist of key-value-pairs which are both string objects.
| key | key to get the value for |
Implements _IMMSEvent.
Definition at line 55 of file mmsevent.cpp.
| void MMSEvent::setData | ( | string | key, | |
| string | value | |||
| ) | [virtual] |
Set additional event parameters.
Parameters consist of key-value-pairs which are both string objects.
| key | key to add | |
| value | value for given key |
Implements _IMMSEvent.
Definition at line 64 of file mmsevent.cpp.
| void MMSEvent::clear | ( | ) | [virtual] |
Clear given event parameters.
All key-value-pairs set before are deleted.
Implements _IMMSEvent.
Definition at line 68 of file mmsevent.cpp.
| void MMSEvent::send | ( | ) | [virtual] |
Send event.
The event will be raised by the dispatcher set in setDispatcher().
Implements _IMMSEvent.
Definition at line 72 of file mmsevent.cpp.
| void MMSEvent::setDispatcher | ( | IMMSEventDispatcher * | dispatcher | ) |
Set dispatcher interface to raise events.
| dispatcher | dispatcher interface |
Definition at line 82 of file mmsevent.cpp.
| void MMSEvent::sendTo | ( | int | pluginid | ) |
Send event to given plugin.
The event will be raised by the dispatcher set in setDispatcher().
| pluginid | id of plugin to send event to |
Definition at line 77 of file mmsevent.cpp.
IMMSEventDispatcher * MMSEvent::dispatcher = NULL [static, private] |
string MMSEvent::heading [private] |
std::map<string,string> MMSEvent::data [private] |