]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classEvent.html
Re-added the dot graphs again
[user/henk/code/inspircd.git] / docs / module-doc / classEvent.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
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">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Event Class Reference</h1>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="8,82,128,109" alt="">
16 <area href="classclassbase.html" shape="rect" coords="28,8,108,34" 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="8,175,128,202" alt="">
21 <area href="classclassbase.html" shape="rect" coords="96,98,176,125" alt="">
22 <area href="classModule.html" shape="rect" coords="152,175,218,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#a0">Event</a> (char *anydata, <a class="el" href="classModule.html">Module</a> *src, std::string eventid)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new Event. </em> <a href="#a0"></a><em><br><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#a1">GetData</a> ()</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the Event data. </em> <a href="#a1"></a><em><br><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#a2">GetSource</a> ()</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the event Source. </em> <a href="#a2"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#a3">GetEventID</a> ()</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the event ID. </em> <a href="#a3"></a><em><br><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#a4">Send</a> ()</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the Event. </em> <a href="#a4"></a><em><br><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#p0">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. </em> <a href="#p0"></a><em><br><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#p1">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. </em> <a href="#p1"></a><em><br><br></td></tr>
49 <tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#p2">id</a></td></tr>
50
51 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The event identifier. </em> <a href="#p2"></a><em><br><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#a4">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#l00194">194</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
61 <a name="a0" doxytag="Event::Event"></a><p>
62 <table class="mdTable" width="100%" 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></td>
74           <td></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></td>
80           <td></td>
81           <td class="md" nowrap>std::string&nbsp;</td>
82           <td class="mdname" nowrap> <em>eventid</em></td>
83         </tr>
84         <tr>
85           <td></td>
86           <td class="md">)&nbsp;</td>
87           <td class="md" colspan="2"></td>
88         </tr>
89
90       </table>
91     </td>
92   </tr>
93 </table>
94 <table cellspacing=5 cellpadding=0 border=0>
95   <tr>
96     <td>
97       &nbsp;
98     </td>
99     <td>
100
101 <p>
102 Create a new Event. 
103 <p>
104
105 <p>
106 Definition at line <a class="el" href="modules_8cpp-source.html#l00345">345</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
107 <p>
108 <div class="fragment"><pre>00345 : <a class="code" href="classEvent.html#p0">data</a>(anydata), <a class="code" href="classEvent.html#p1">source</a>(src), <a class="code" href="classEvent.html#p2">id</a>(eventid) { };
109 </pre></div>    </td>
110   </tr>
111 </table>
112 <hr><h2>Member Function Documentation</h2>
113 <a name="a1" doxytag="Event::GetData"></a><p>
114 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
115   <tr>
116     <td class="mdRow">
117       <table cellpadding="0" cellspacing="0" border="0">
118         <tr>
119           <td class="md" nowrap valign="top"> char * Event::GetData </td>
120           <td class="md" valign="top">(&nbsp;</td>
121           <td class="mdname1" valign="top" nowrap>          </td>
122           <td class="md" valign="top">&nbsp;)&nbsp;</td>
123           <td class="md" nowrap></td>
124         </tr>
125
126       </table>
127     </td>
128   </tr>
129 </table>
130 <table cellspacing=5 cellpadding=0 border=0>
131   <tr>
132     <td>
133       &nbsp;
134     </td>
135     <td>
136
137 <p>
138 Get the Event data. 
139 <p>
140
141 <p>
142 Definition at line <a class="el" href="modules_8cpp-source.html#l00347">347</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
143 <p>
144 References <a class="el" href="modules_8h-source.html#l00199">data</a>.
145 <p>
146 <div class="fragment"><pre>00348 {
147 00349         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#p0">data</a>;
148 00350 }
149 </pre></div>    </td>
150   </tr>
151 </table>
152 <a name="a3" doxytag="Event::GetEventID"></a><p>
153 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
154   <tr>
155     <td class="mdRow">
156       <table cellpadding="0" cellspacing="0" border="0">
157         <tr>
158           <td class="md" nowrap valign="top"> std::string Event::GetEventID </td>
159           <td class="md" valign="top">(&nbsp;</td>
160           <td class="mdname1" valign="top" nowrap>          </td>
161           <td class="md" valign="top">&nbsp;)&nbsp;</td>
162           <td class="md" nowrap></td>
163         </tr>
164
165       </table>
166     </td>
167   </tr>
168 </table>
169 <table cellspacing=5 cellpadding=0 border=0>
170   <tr>
171     <td>
172       &nbsp;
173     </td>
174     <td>
175
176 <p>
177 Get the event ID. 
178 <p>
179 Use this to determine the event type for safe casting of the data 
180 <p>
181 Definition at line <a class="el" href="modules_8cpp-source.html#l00363">363</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
182 <p>
183 References <a class="el" href="modules_8h-source.html#l00208">id</a>.
184 <p>
185 <div class="fragment"><pre>00364 {
186 00365         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#p2">id</a>;
187 00366 }
188 </pre></div>    </td>
189   </tr>
190 </table>
191 <a name="a2" doxytag="Event::GetSource"></a><p>
192 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
193   <tr>
194     <td class="mdRow">
195       <table cellpadding="0" cellspacing="0" border="0">
196         <tr>
197           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Event::GetSource </td>
198           <td class="md" valign="top">(&nbsp;</td>
199           <td class="mdname1" valign="top" nowrap>          </td>
200           <td class="md" valign="top">&nbsp;)&nbsp;</td>
201           <td class="md" nowrap></td>
202         </tr>
203
204       </table>
205     </td>
206   </tr>
207 </table>
208 <table cellspacing=5 cellpadding=0 border=0>
209   <tr>
210     <td>
211       &nbsp;
212     </td>
213     <td>
214
215 <p>
216 Get the event Source. 
217 <p>
218
219 <p>
220 Definition at line <a class="el" href="modules_8cpp-source.html#l00352">352</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
221 <p>
222 References <a class="el" href="modules_8h-source.html#l00203">source</a>.
223 <p>
224 <div class="fragment"><pre>00353 {
225 00354         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classEvent.html#p1">source</a>;
226 00355 }
227 </pre></div>    </td>
228   </tr>
229 </table>
230 <a name="a4" doxytag="Event::Send"></a><p>
231 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
232   <tr>
233     <td class="mdRow">
234       <table cellpadding="0" cellspacing="0" border="0">
235         <tr>
236           <td class="md" nowrap valign="top"> char * Event::Send </td>
237           <td class="md" valign="top">(&nbsp;</td>
238           <td class="mdname1" valign="top" nowrap>          </td>
239           <td class="md" valign="top">&nbsp;)&nbsp;</td>
240           <td class="md" nowrap><code> [virtual]</code></td>
241         </tr>
242
243       </table>
244     </td>
245   </tr>
246 </table>
247 <table cellspacing=5 cellpadding=0 border=0>
248   <tr>
249     <td>
250       &nbsp;
251     </td>
252     <td>
253
254 <p>
255 Send the Event. 
256 <p>
257 The return result of an <a class="el" href="classEvent.html#a4">Event::Send()</a> will always be NULL as no replies are expected. 
258 <p>
259 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
260 <p>
261 Definition at line <a class="el" href="modules_8cpp-source.html#l00357">357</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
262 <p>
263 References <a class="el" href="modules_8h-source.html#l00079">FOREACH_MOD</a>.
264 <p>
265 <div class="fragment"><pre>00358 {
266 00359         <a class="code" href="modules_8h.html#a24">FOREACH_MOD</a> OnEvent(<span class="keyword">this</span>);
267 00360         <span class="keywordflow">return</span> NULL;
268 00361 }
269 </pre></div>    </td>
270   </tr>
271 </table>
272 <hr><h2>Member Data Documentation</h2>
273 <a name="p0" doxytag="Event::data"></a><p>
274 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
275   <tr>
276     <td class="mdRow">
277       <table cellpadding="0" cellspacing="0" border="0">
278         <tr>
279           <td class="md" nowrap valign="top"> char* <a class="el" href="classEvent.html#p0">Event::data</a><code> [protected]</code>
280       </table>
281     </td>
282   </tr>
283 </table>
284 <table cellspacing=5 cellpadding=0 border=0>
285   <tr>
286     <td>
287       &nbsp;
288     </td>
289     <td>
290
291 <p>
292 This member holds a pointer to arbitary data set by the emitter of the message. 
293 <p>
294
295 <p>
296 Definition at line <a class="el" href="modules_8h-source.html#l00199">199</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
297 <p>
298 Referenced by <a class="el" href="modules_8cpp-source.html#l00347">GetData()</a>.    </td>
299   </tr>
300 </table>
301 <a name="p2" doxytag="Event::id"></a><p>
302 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
303   <tr>
304     <td class="mdRow">
305       <table cellpadding="0" cellspacing="0" border="0">
306         <tr>
307           <td class="md" nowrap valign="top"> std::string <a class="el" href="classEvent.html#p2">Event::id</a><code> [protected]</code>
308       </table>
309     </td>
310   </tr>
311 </table>
312 <table cellspacing=5 cellpadding=0 border=0>
313   <tr>
314     <td>
315       &nbsp;
316     </td>
317     <td>
318
319 <p>
320 The event identifier. 
321 <p>
322 This is arbitary text which should be used to distinguish one type of event from another. 
323 <p>
324 Definition at line <a class="el" href="modules_8h-source.html#l00208">208</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
325 <p>
326 Referenced by <a class="el" href="modules_8cpp-source.html#l00363">GetEventID()</a>.    </td>
327   </tr>
328 </table>
329 <a name="p1" doxytag="Event::source"></a><p>
330 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
331   <tr>
332     <td class="mdRow">
333       <table cellpadding="0" cellspacing="0" border="0">
334         <tr>
335           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a>* <a class="el" href="classEvent.html#p1">Event::source</a><code> [protected]</code>
336       </table>
337     </td>
338   </tr>
339 </table>
340 <table cellspacing=5 cellpadding=0 border=0>
341   <tr>
342     <td>
343       &nbsp;
344     </td>
345     <td>
346
347 <p>
348 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. 
349 <p>
350
351 <p>
352 Definition at line <a class="el" href="modules_8h-source.html#l00203">203</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
353 <p>
354 Referenced by <a class="el" href="modules_8cpp-source.html#l00352">GetSource()</a>.    </td>
355   </tr>
356 </table>
357 <hr>The documentation for this class was generated from the following files:<ul>
358 <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>
359 <hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:38 2005 for InspIRCd by
360 <a href="http://www.doxygen.org/index.html">
361 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
362 </a>1.3.3 </small></address>
363 </body>
364 </html>