]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classEvent.html
Fixed 'fake direction' messages being put out by user->registered = 7 being set too...
[user/henk/code/inspircd.git] / docs / module-doc / classEvent.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Event Class Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Event Class Reference</h1><!-- doxytag: class="Event" --><!-- doxytag: inherits="ModuleMessage" -->The Event class is a unicast message directed at all modules.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
13 Inheritance diagram for Event:<p><center><img src="classEvent__inherit__graph.gif" border="0" usemap="#Event__inherit__map" alt="Inheritance graph"></center>
14 <map name="Event__inherit__map">
15 <area href="classModuleMessage.html" shape="rect" coords="7,81,127,108" alt="">
16 <area href="classclassbase.html" shape="rect" coords="27,7,107,33" alt="">
17 </map>
18 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Event:<p><center><img src="classEvent__coll__graph.gif" border="0" usemap="#Event__coll__map" alt="Collaboration graph"></center>
19 <map name="Event__coll__map">
20 <area href="classModuleMessage.html" shape="rect" coords="7,175,127,202" alt="">
21 <area href="classclassbase.html" shape="rect" coords="95,98,175,124" alt="">
22 <area href="classModule.html" shape="rect" coords="151,175,217,202" alt="">
23 </map>
24 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classEvent-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
25 <tr><td></td></tr>
26 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
27 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#Event_28char_20_2Aanydata_2C_20Module_20_2Asrc_2C_20std_3A_3Astring_20eventid_29">Event</a> (char *anydata, <a class="el" href="classModule.html">Module</a> *src, <a class="el" href="namespaceirc.html#string">std::string</a> eventid)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new Event.  <a href="#Event_28char_20_2Aanydata_2C_20Module_20_2Asrc_2C_20std_3A_3Astring_20eventid_29"></a><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetData_28_29">GetData</a> ()</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the Event data.  <a href="#GetData_28_29"></a><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetSource_28_29">GetSource</a> ()</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the event Source.  <a href="#GetSource_28_29"></a><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetEventID_28_29">GetEventID</a> ()</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the event ID.  <a href="#GetEventID_28_29"></a><br></td></tr>
39 <tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#Send_28_29">Send</a> ()</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the Event.  <a href="#Send_28_29"></a><br></td></tr>
42 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
43 <tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#data">data</a></td></tr>
44
45 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This member holds a pointer to arbitary data set by the emitter of the message.  <a href="#data"></a><br></td></tr>
46 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#source">source</a></td></tr>
47
48 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.  <a href="#source"></a><br></td></tr>
49 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#id">id</a></td></tr>
50
51 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The event identifier.  <a href="#id"></a><br></td></tr>
52 </table>
53 <hr><a name="_details"></a><h2>Detailed Description</h2>
54 The Event class is a unicast message directed at all modules. 
55 <p>
56 When the class is properly instantiated it may be sent to all modules using the <a class="el" href="classEvent.html#Send_28_29">Send()</a> method, which will trigger the OnEvent method in all modules passing the object as its parameter.
57 <p>
58
59 <p>
60 Definition at line <a class="el" href="modules_8h-source.html#l00196">196</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
61 <a class="anchor" name="Event_28char_20_2Aanydata_2C_20Module_20_2Asrc_2C_20std_3A_3Astring_20eventid_29"></a><!-- doxytag: member="Event::Event" ref="Event_28char_20_2Aanydata_2C_20Module_20_2Asrc_2C_20std_3A_3Astring_20eventid_29" args="(char *anydata, Module *src, std::string eventid)" --><p>
62 <table class="mdTable" cellpadding="2" cellspacing="0">
63   <tr>
64     <td class="mdRow">
65       <table cellpadding="0" cellspacing="0" border="0">
66         <tr>
67           <td class="md" nowrap valign="top">Event::Event           </td>
68           <td class="md" valign="top">(&nbsp;</td>
69           <td class="md" nowrap valign="top">char *&nbsp;</td>
70           <td class="mdname" nowrap> <em>anydata</em>, </td>
71         </tr>
72         <tr>
73           <td class="md" nowrap align="right"></td>
74           <td class="md"></td>
75           <td class="md" nowrap><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
76           <td class="mdname" nowrap> <em>src</em>, </td>
77         </tr>
78         <tr>
79           <td class="md" nowrap align="right"></td>
80           <td class="md"></td>
81           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
82           <td class="mdname" nowrap> <em>eventid</em></td>
83         </tr>
84         <tr>
85           <td class="md"></td>
86           <td class="md">)&nbsp;</td>
87           <td class="md" colspan="2"></td>
88         </tr>
89       </table>
90     </td>
91   </tr>
92 </table>
93 <table cellspacing="5" cellpadding="0" border="0">
94   <tr>
95     <td>
96       &nbsp;
97     </td>
98     <td>
99
100 <p>
101 Create a new Event. 
102 <p>
103
104 <p>
105 Definition at line <a class="el" href="modules_8cpp-source.html#l00281">281</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00281"></a>00281 : <a class="code" href="classEvent.html#data">data</a>(anydata), <a class="code" href="classEvent.html#source">source</a>(src), <a class="code" href="classEvent.html#id">id</a>(eventid) { };
106 </pre></div>
107 <p>
108     </td>
109   </tr>
110 </table>
111 <hr><h2>Member Function Documentation</h2>
112 <a class="anchor" name="GetData_28_29"></a><!-- doxytag: member="Event::GetData" ref="GetData_28_29" args="()" --><p>
113 <table class="mdTable" cellpadding="2" cellspacing="0">
114   <tr>
115     <td class="mdRow">
116       <table cellpadding="0" cellspacing="0" border="0">
117         <tr>
118           <td class="md" nowrap valign="top">char * Event::GetData           </td>
119           <td class="md" valign="top">(&nbsp;</td>
120           <td class="mdname1" valign="top" nowrap>          </td>
121           <td class="md" valign="top">&nbsp;)&nbsp;</td>
122           <td class="md" nowrap></td>
123         </tr>
124       </table>
125     </td>
126   </tr>
127 </table>
128 <table cellspacing="5" cellpadding="0" border="0">
129   <tr>
130     <td>
131       &nbsp;
132     </td>
133     <td>
134
135 <p>
136 Get the Event data. 
137 <p>
138
139 <p>
140 Definition at line <a class="el" href="modules_8cpp-source.html#l00283">283</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
141 <p>
142 References <a class="el" href="modules_8h-source.html#l00201">data</a>.<div class="fragment"><pre class="fragment"><a name="l00284"></a>00284 {
143 <a name="l00285"></a>00285         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#data">data</a>;
144 <a name="l00286"></a>00286 }
145 </pre></div>
146 <p>
147     </td>
148   </tr>
149 </table>
150 <a class="anchor" name="GetEventID_28_29"></a><!-- doxytag: member="Event::GetEventID" ref="GetEventID_28_29" args="()" --><p>
151 <table class="mdTable" cellpadding="2" cellspacing="0">
152   <tr>
153     <td class="mdRow">
154       <table cellpadding="0" cellspacing="0" border="0">
155         <tr>
156           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Event::GetEventID           </td>
157           <td class="md" valign="top">(&nbsp;</td>
158           <td class="mdname1" valign="top" nowrap>          </td>
159           <td class="md" valign="top">&nbsp;)&nbsp;</td>
160           <td class="md" nowrap></td>
161         </tr>
162       </table>
163     </td>
164   </tr>
165 </table>
166 <table cellspacing="5" cellpadding="0" border="0">
167   <tr>
168     <td>
169       &nbsp;
170     </td>
171     <td>
172
173 <p>
174 Get the event ID. 
175 <p>
176 Use this to determine the event type for safe casting of the data
177 <p>
178 Definition at line <a class="el" href="modules_8cpp-source.html#l00299">299</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
179 <p>
180 References <a class="el" href="modules_8h-source.html#l00210">id</a>.<div class="fragment"><pre class="fragment"><a name="l00300"></a>00300 {
181 <a name="l00301"></a>00301         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#id">id</a>;
182 <a name="l00302"></a>00302 }
183 </pre></div>
184 <p>
185     </td>
186   </tr>
187 </table>
188 <a class="anchor" name="GetSource_28_29"></a><!-- doxytag: member="Event::GetSource" ref="GetSource_28_29" args="()" --><p>
189 <table class="mdTable" cellpadding="2" cellspacing="0">
190   <tr>
191     <td class="mdRow">
192       <table cellpadding="0" cellspacing="0" border="0">
193         <tr>
194           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Event::GetSource           </td>
195           <td class="md" valign="top">(&nbsp;</td>
196           <td class="mdname1" valign="top" nowrap>          </td>
197           <td class="md" valign="top">&nbsp;)&nbsp;</td>
198           <td class="md" nowrap></td>
199         </tr>
200       </table>
201     </td>
202   </tr>
203 </table>
204 <table cellspacing="5" cellpadding="0" border="0">
205   <tr>
206     <td>
207       &nbsp;
208     </td>
209     <td>
210
211 <p>
212 Get the event Source. 
213 <p>
214
215 <p>
216 Definition at line <a class="el" href="modules_8cpp-source.html#l00288">288</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
217 <p>
218 References <a class="el" href="modules_8h-source.html#l00205">source</a>.<div class="fragment"><pre class="fragment"><a name="l00289"></a>00289 {
219 <a name="l00290"></a>00290         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#source">source</a>;
220 <a name="l00291"></a>00291 }
221 </pre></div>
222 <p>
223     </td>
224   </tr>
225 </table>
226 <a class="anchor" name="Send_28_29"></a><!-- doxytag: member="Event::Send" ref="Send_28_29" args="()" --><p>
227 <table class="mdTable" cellpadding="2" cellspacing="0">
228   <tr>
229     <td class="mdRow">
230       <table cellpadding="0" cellspacing="0" border="0">
231         <tr>
232           <td class="md" nowrap valign="top">char * Event::Send           </td>
233           <td class="md" valign="top">(&nbsp;</td>
234           <td class="mdname1" valign="top" nowrap>          </td>
235           <td class="md" valign="top">&nbsp;)&nbsp;</td>
236           <td class="md" nowrap><code> [virtual]</code></td>
237         </tr>
238       </table>
239     </td>
240   </tr>
241 </table>
242 <table cellspacing="5" cellpadding="0" border="0">
243   <tr>
244     <td>
245       &nbsp;
246     </td>
247     <td>
248
249 <p>
250 Send the Event. 
251 <p>
252 The return result of an <a class="el" href="classEvent.html#Send_28_29">Event::Send()</a> will always be NULL as no replies are expected.
253 <p>
254 Implements <a class="el" href="classModuleMessage.html#Send_28_29_3D_30">ModuleMessage</a>.
255 <p>
256 Definition at line <a class="el" href="modules_8cpp-source.html#l00293">293</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
257 <p>
258 References <a class="el" href="modules_8h-source.html#l00080">FOREACH_MOD</a>.<div class="fragment"><pre class="fragment"><a name="l00294"></a>00294 {
259 <a name="l00295"></a>00295         <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnEvent(<span class="keyword">this</span>);
260 <a name="l00296"></a>00296         <span class="keywordflow">return</span> NULL;
261 <a name="l00297"></a>00297 }
262 </pre></div>
263 <p>
264     </td>
265   </tr>
266 </table>
267 <hr><h2>Member Data Documentation</h2>
268 <a class="anchor" name="data"></a><!-- doxytag: member="Event::data" ref="data" args="" --><p>
269 <table class="mdTable" cellpadding="2" cellspacing="0">
270   <tr>
271     <td class="mdRow">
272       <table cellpadding="0" cellspacing="0" border="0">
273         <tr>
274           <td class="md" nowrap valign="top">char* <a class="el" href="classEvent.html#data">Event::data</a><code> [protected]</code>          </td>
275         </tr>
276       </table>
277     </td>
278   </tr>
279 </table>
280 <table cellspacing="5" cellpadding="0" border="0">
281   <tr>
282     <td>
283       &nbsp;
284     </td>
285     <td>
286
287 <p>
288 This member holds a pointer to arbitary data set by the emitter of the message. 
289 <p>
290
291 <p>
292 Definition at line <a class="el" href="modules_8h-source.html#l00201">201</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
293 <p>
294 Referenced by <a class="el" href="modules_8cpp-source.html#l00283">GetData()</a>.    </td>
295   </tr>
296 </table>
297 <a class="anchor" name="id"></a><!-- doxytag: member="Event::id" ref="id" args="" --><p>
298 <table class="mdTable" cellpadding="2" cellspacing="0">
299   <tr>
300     <td class="mdRow">
301       <table cellpadding="0" cellspacing="0" border="0">
302         <tr>
303           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> <a class="el" href="classEvent.html#id">Event::id</a><code> [protected]</code>          </td>
304         </tr>
305       </table>
306     </td>
307   </tr>
308 </table>
309 <table cellspacing="5" cellpadding="0" border="0">
310   <tr>
311     <td>
312       &nbsp;
313     </td>
314     <td>
315
316 <p>
317 The event identifier. 
318 <p>
319 This is arbitary text which should be used to distinguish one type of event from another.
320 <p>
321 Definition at line <a class="el" href="modules_8h-source.html#l00210">210</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
322 <p>
323 Referenced by <a class="el" href="modules_8cpp-source.html#l00299">GetEventID()</a>.    </td>
324   </tr>
325 </table>
326 <a class="anchor" name="source"></a><!-- doxytag: member="Event::source" ref="source" args="" --><p>
327 <table class="mdTable" cellpadding="2" cellspacing="0">
328   <tr>
329     <td class="mdRow">
330       <table cellpadding="0" cellspacing="0" border="0">
331         <tr>
332           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a>* <a class="el" href="classEvent.html#source">Event::source</a><code> [protected]</code>          </td>
333         </tr>
334       </table>
335     </td>
336   </tr>
337 </table>
338 <table cellspacing="5" cellpadding="0" border="0">
339   <tr>
340     <td>
341       &nbsp;
342     </td>
343     <td>
344
345 <p>
346 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. 
347 <p>
348
349 <p>
350 Definition at line <a class="el" href="modules_8h-source.html#l00205">205</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
351 <p>
352 Referenced by <a class="el" href="modules_8cpp-source.html#l00288">GetSource()</a>.    </td>
353   </tr>
354 </table>
355 <hr>The documentation for this class was generated from the following files:<ul>
356 <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
357 <hr size="1"><address style="align: right;"><small>Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by&nbsp;
358 <a href="http://www.doxygen.org/index.html">
359 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
360 </body>
361 </html>