1 .TH "Event" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
5 Event \- The Event class is a unicast message directed at all modules.
11 \fC#include <modules.h>\fP
13 Inherits \fBModuleMessage\fP.
15 .SS "Public Member Functions"
19 .RI "\fBEvent\fP (char *anydata, \fBModule\fP *src, \fBstd::string\fP eventid)"
21 .RI "\fICreate a new Event. \fP"
23 .RI "char * \fBGetData\fP ()"
25 .RI "\fIGet the Event data. \fP"
27 .RI "\fBModule\fP * \fBGetSource\fP ()"
29 .RI "\fIGet the event Source. \fP"
31 .RI "\fBstd::string\fP \fBGetEventID\fP ()"
33 .RI "\fIGet the event ID. \fP"
35 .RI "char * \fBSend\fP ()"
37 .RI "\fISend the Event. \fP"
39 .SS "Protected Attributes"
43 .RI "char * \fBdata\fP"
45 .RI "\fIThis member holds a pointer to arbitary data set by the emitter of the message. \fP"
47 .RI "\fBModule\fP * \fBsource\fP"
49 .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"
51 .RI "\fBstd::string\fP \fBid\fP"
53 .RI "\fIThe event identifier. \fP"
55 .SH "Detailed Description"
57 The Event class is a unicast message directed at all modules.
59 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.
61 Definition at line 197 of file modules.h.
62 .SH "Constructor & Destructor Documentation"
64 .SS "Event::Event (char * anydata, \fBModule\fP * src, \fBstd::string\fP eventid)"
68 Definition at line 194 of file modules.cpp.
71 194 : data(anydata), source(src), id(eventid) { };
74 .SH "Member Function Documentation"
76 .SS "char * Event::GetData ()"
80 Definition at line 196 of file modules.cpp.
86 198 return this->data;
90 .SS "\fBstd::string\fP Event::GetEventID ()"
94 Use this to determine the event type for safe casting of the data
96 Definition at line 212 of file modules.cpp.
106 .SS "\fBModule\fP * Event::GetSource ()"
108 Get the event Source.
110 Definition at line 201 of file modules.cpp.
116 203 return this->source;
120 .SS "char * Event::Send ()\fC [virtual]\fP"
124 The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected.
126 Implements \fBModuleMessage\fP.
128 Definition at line 206 of file modules.cpp.
130 References FOREACH_MOD.
134 208 FOREACH_MOD OnEvent(this);
139 .SH "Member Data Documentation"
141 .SS "char* \fBEvent::data\fP\fC [protected]\fP"
143 This member holds a pointer to arbitary data set by the emitter of the message.
145 Definition at line 202 of file modules.h.
147 Referenced by GetData().
148 .SS "\fBstd::string\fP \fBEvent::id\fP\fC [protected]\fP"
150 The event identifier.
152 This is arbitary text which should be used to distinguish one type of event from another.
154 Definition at line 211 of file modules.h.
156 Referenced by GetEventID().
157 .SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP"
159 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
161 Definition at line 206 of file modules.h.
163 Referenced by GetSource().
167 Generated automatically by Doxygen for InspIRCd from the source code.