From 2db0df5813e46fe5e077e014003acbd10698b913 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 20 Apr 2005 15:48:27 +0000 Subject: Added module message passing architecture git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1136 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classEvent.html | 355 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 docs/module-doc/classEvent.html (limited to 'docs/module-doc/classEvent.html') diff --git a/docs/module-doc/classEvent.html b/docs/module-doc/classEvent.html new file mode 100644 index 000000000..170fa3474 --- /dev/null +++ b/docs/module-doc/classEvent.html @@ -0,0 +1,355 @@ + +
+
+#include <modules.h>
+
+Inherits ModuleMessage. +
Public Member Functions | |
| Event (char *anydata, Module *src, std::string eventid) | |
| Create a new Event. | |
| char * | GetData () |
| Get the Event data. | |
| Module * | GetSource () |
| Get the event Source. | |
| std::string | GetEventID () |
| Get the event ID. | |
| char * | Send () |
| Send the Event. | |
Protected Attributes | |
| char * | data |
| This member holds a pointer to arbitary data set by the emitter of the message. | |
| Module * | source |
| This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. | |
| std::string | id |
| The event identifier. | |
+When the class is properly instantiated it may be sent to all modules using the Send() method, which will trigger the OnEvent method in all modules passing the object as its parameter. +
+ +
+Definition at line 191 of file modules.h.
+
+
|
+ ||||||||||||||||
| + + | +
+
+ +Create a new Event. + + + +Definition at line 337 of file modules.cpp. + + |
+
+
+
|
+
| + + | +
+
+ +Get the Event data. + + + +Definition at line 339 of file modules.cpp. + +References data. + + 00340 {
+00341 return this->data;
+00342 }
+ |
+
+
+
|
+
| + + | +
+
+ +Get the event ID. + +Use this to determine the event type for safe casting of the data + +Definition at line 355 of file modules.cpp. + +References id. + + 00356 {
+00357 return this->id;
+00358 }
+ |
+
+
+
|
+
| + + | +
+
+ +Get the event Source. + + + +Definition at line 344 of file modules.cpp. + +References source. + + 00345 {
+00346 return this->source;
+00347 }
+ |
+
+
+
|
+
| + + | +
+
+ +Send the Event. + +The return result of an Event::Send() will always be NULL as no replies are expected. + +Implements ModuleMessage. + +Definition at line 349 of file modules.cpp. + +References FOREACH_MOD. + + 00350 {
+00351 FOREACH_MOD OnEvent(this);
+00352 return NULL;
+00353 }
+ |
+
+
+
|
+
| + + | +
+
+ +This member holds a pointer to arbitary data set by the emitter of the message. + + + +Definition at line 196 of file modules.h. + +Referenced by GetData(). |
+
+
+
|
+
| + + | +
+
+ +The event identifier. + +This is arbitary text which should be used to distinguish one type of event from another. + +Definition at line 205 of file modules.h. + +Referenced by GetEventID(). |
+
+
+
|
+
| + + | +
+
+ +This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. + + + +Definition at line 200 of file modules.h. + +Referenced by GetSource(). |
+
+1.3.3
+
+
--
cgit v1.3.1-10-gc9f91