.TH "Event" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME Event \- The Event class is a unicast message directed at all modules. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBModuleMessage\fP. .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBEvent\fP (char *anydata, \fBModule\fP *src, \fBstd::string\fP eventid)" .br .RI "\fICreate a new Event. \fP" .ti -1c .RI "char * \fBGetData\fP ()" .br .RI "\fIGet the Event data. \fP" .ti -1c .RI "\fBModule\fP * \fBGetSource\fP ()" .br .RI "\fIGet the event Source. \fP" .ti -1c .RI "\fBstd::string\fP \fBGetEventID\fP ()" .br .RI "\fIGet the event ID. \fP" .ti -1c .RI "char * \fBSend\fP ()" .br .RI "\fISend the Event. \fP" .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "char * \fBdata\fP" .br .RI "\fIThis member holds a pointer to arbitary data set by the emitter of the message. \fP" .ti -1c .RI "\fBModule\fP * \fBsource\fP" .br .RI "\fIThis is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. \fP" .ti -1c .RI "\fBstd::string\fP \fBid\fP" .br .RI "\fIThe event identifier. \fP" .in -1c .SH "Detailed Description" .PP The Event class is a unicast message directed at all modules. When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter. .PP Definition at line 215 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Event::Event (char * anydata, \fBModule\fP * src, \fBstd::string\fP eventid)" .PP Create a new Event. .PP Definition at line 193 of file modules.cpp. .PP .nf 193 : data(anydata), source(src), id(eventid) { }; .fi .PP .SH "Member Function Documentation" .PP .SS "char * Event::GetData ()" .PP Get the Event data. .PP Definition at line 195 of file modules.cpp. .PP References data. .PP .nf 196 { 197 return this->data; 198 } .fi .PP .SS "\fBstd::string\fP Event::GetEventID ()" .PP Get the event ID. .PP Use this to determine the event type for safe casting of the data .PP Definition at line 211 of file modules.cpp. .PP References id. .PP .nf 212 { 213 return this->id; 214 } .fi .PP .SS "\fBModule\fP * Event::GetSource ()" .PP Get the event Source. .PP Definition at line 200 of file modules.cpp. .PP References source. .PP .nf 201 { 202 return this->source; 203 } .fi .PP .SS "char * Event::Send ()\fC [virtual]\fP" .PP Send the Event. .PP The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected. .PP Implements \fBModuleMessage\fP. .PP Definition at line 205 of file modules.cpp. .PP References FOREACH_MOD. .PP .nf 206 { 207 FOREACH_MOD OnEvent(this); 208 return NULL; 209 } .fi .PP .SH "Member Data Documentation" .PP .SS "char* \fBEvent::data\fP\fC [protected]\fP" .PP This member holds a pointer to arbitary data set by the emitter of the message. .PP Definition at line 220 of file modules.h. .PP Referenced by GetData(). .SS "\fBstd::string\fP \fBEvent::id\fP\fC [protected]\fP" .PP The event identifier. .PP This is arbitary text which should be used to distinguish one type of event from another. .PP Definition at line 229 of file modules.h. .PP Referenced by GetEventID(). .SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP" .PP This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. .PP Definition at line 224 of file modules.h. .PP Referenced by GetSource(). .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code.