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">
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File 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>
11 <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code>
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="">
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="">
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">
26 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
27 <tr><td class="memItemLeft" nowrap align="right" valign="top"> </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>
29 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetData_28_29">GetData</a> ()</td></tr>
32 <tr><td class="mdescLeft"> </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> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetSource_28_29">GetSource</a> ()</td></tr>
35 <tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#GetEventID_28_29">GetEventID</a> ()</td></tr>
38 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#Send_28_29">Send</a> ()</td></tr>
41 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#data">data</a></td></tr>
45 <tr><td class="mdescLeft"> </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> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#source">source</a></td></tr>
48 <tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html#id">id</a></td></tr>
51 <tr><td class="mdescLeft"> </td><td class="mdescRight">The event identifier. <a href="#id"></a><br></td></tr>
53 <hr><a name="_details"></a><h2>Detailed Description</h2>
54 The Event class is a unicast message directed at all modules.
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.
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 & 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">
65 <table cellpadding="0" cellspacing="0" border="0">
67 <td class="md" nowrap valign="top">Event::Event </td>
68 <td class="md" valign="top">( </td>
69 <td class="md" nowrap valign="top">char * </td>
70 <td class="mdname" nowrap> <em>anydata</em>, </td>
73 <td class="md" nowrap align="right"></td>
75 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
76 <td class="mdname" nowrap> <em>src</em>, </td>
79 <td class="md" nowrap align="right"></td>
81 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
82 <td class="mdname" nowrap> <em>eventid</em></td>
86 <td class="md">) </td>
87 <td class="md" colspan="2"></td>
93 <table cellspacing="5" cellpadding="0" border="0">
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) { };
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">
116 <table cellpadding="0" cellspacing="0" border="0">
118 <td class="md" nowrap valign="top">char * Event::GetData </td>
119 <td class="md" valign="top">( </td>
120 <td class="mdname1" valign="top" nowrap> </td>
121 <td class="md" valign="top"> ) </td>
122 <td class="md" nowrap></td>
128 <table cellspacing="5" cellpadding="0" border="0">
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>.
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-><a class="code" href="classEvent.html#data">data</a>;
144 <a name="l00286"></a>00286 }
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">
154 <table cellpadding="0" cellspacing="0" border="0">
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">( </td>
158 <td class="mdname1" valign="top" nowrap> </td>
159 <td class="md" valign="top"> ) </td>
160 <td class="md" nowrap></td>
166 <table cellspacing="5" cellpadding="0" border="0">
176 Use this to determine the event type for safe casting of the data
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>.
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-><a class="code" href="classEvent.html#id">id</a>;
182 <a name="l00302"></a>00302 }
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">
192 <table cellpadding="0" cellspacing="0" border="0">
194 <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Event::GetSource </td>
195 <td class="md" valign="top">( </td>
196 <td class="mdname1" valign="top" nowrap> </td>
197 <td class="md" valign="top"> ) </td>
198 <td class="md" nowrap></td>
204 <table cellspacing="5" cellpadding="0" border="0">
212 Get the event Source.
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>.
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-><a class="code" href="classEvent.html#source">source</a>;
220 <a name="l00291"></a>00291 }
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">
230 <table cellpadding="0" cellspacing="0" border="0">
232 <td class="md" nowrap valign="top">char * Event::Send </td>
233 <td class="md" valign="top">( </td>
234 <td class="mdname1" valign="top" nowrap> </td>
235 <td class="md" valign="top"> ) </td>
236 <td class="md" nowrap><code> [virtual]</code></td>
242 <table cellspacing="5" cellpadding="0" border="0">
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.
254 Implements <a class="el" href="classModuleMessage.html#Send_28_29_3D_30">ModuleMessage</a>.
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>.
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 }
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">
272 <table cellpadding="0" cellspacing="0" border="0">
274 <td class="md" nowrap valign="top">char* <a class="el" href="classEvent.html#data">Event::data</a><code> [protected]</code> </td>
280 <table cellspacing="5" cellpadding="0" border="0">
288 This member holds a pointer to arbitary data set by the emitter of the message.
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>.
294 Referenced by <a class="el" href="modules_8cpp-source.html#l00283">GetData()</a>. </td>
297 <a class="anchor" name="id"></a><!-- doxytag: member="Event::id" ref="id" args="" --><p>
298 <table class="mdTable" cellpadding="2" cellspacing="0">
301 <table cellpadding="0" cellspacing="0" border="0">
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>
309 <table cellspacing="5" cellpadding="0" border="0">
317 The event identifier.
319 This is arbitary text which should be used to distinguish one type of event from another.
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>.
323 Referenced by <a class="el" href="modules_8cpp-source.html#l00299">GetEventID()</a>. </td>
326 <a class="anchor" name="source"></a><!-- doxytag: member="Event::source" ref="source" args="" --><p>
327 <table class="mdTable" cellpadding="2" cellspacing="0">
330 <table cellpadding="0" cellspacing="0" border="0">
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>
338 <table cellspacing="5" cellpadding="0" border="0">
346 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
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>.
352 Referenced by <a class="el" href="modules_8cpp-source.html#l00288">GetSource()</a>. </td>
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
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>