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">
6 <!-- Generated by Doxygen 1.3.3 -->
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">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File 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>
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="8,82,128,109" alt="">
16 <area href="classclassbase.html" shape="rect" coords="28,8,108,34" 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="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="">
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#a0">Event</a> (char *anydata, <a class="el" href="classModule.html">Module</a> *src, std::string eventid)</td></tr>
29 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#a1">GetData</a> ()</td></tr>
32 <tr><td class="mdescLeft"> </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> * </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#a2">GetSource</a> ()</td></tr>
35 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#a3">GetEventID</a> ()</td></tr>
38 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#a4">Send</a> ()</td></tr>
41 <tr><td class="mdescLeft"> </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 * </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#p0">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. </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> * </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#p1">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. </em> <a href="#p1"></a><em><br><br></td></tr>
49 <tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classEvent.html#p2">id</a></td></tr>
51 <tr><td class="mdescLeft"> </td><td class="mdescRight">The event identifier. </em> <a href="#p2"></a><em><br><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#a4">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#l00194">194</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
61 <a name="a0" doxytag="Event::Event"></a><p>
62 <table class="mdTable" width="100%" 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>
75 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
76 <td class="mdname" nowrap> <em>src</em>, </td>
81 <td class="md" nowrap>std::string </td>
82 <td class="mdname" nowrap> <em>eventid</em></td>
86 <td class="md">) </td>
87 <td class="md" colspan="2"></td>
94 <table cellspacing=5 cellpadding=0 border=0>
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>.
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) { };
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">
117 <table cellpadding="0" cellspacing="0" border="0">
119 <td class="md" nowrap valign="top"> char * Event::GetData </td>
120 <td class="md" valign="top">( </td>
121 <td class="mdname1" valign="top" nowrap> </td>
122 <td class="md" valign="top"> ) </td>
123 <td class="md" nowrap></td>
130 <table cellspacing=5 cellpadding=0 border=0>
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>.
144 References <a class="el" href="modules_8h-source.html#l00199">data</a>.
146 <div class="fragment"><pre>00348 {
147 00349 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p0">data</a>;
152 <a name="a3" doxytag="Event::GetEventID"></a><p>
153 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
156 <table cellpadding="0" cellspacing="0" border="0">
158 <td class="md" nowrap valign="top"> std::string Event::GetEventID </td>
159 <td class="md" valign="top">( </td>
160 <td class="mdname1" valign="top" nowrap> </td>
161 <td class="md" valign="top"> ) </td>
162 <td class="md" nowrap></td>
169 <table cellspacing=5 cellpadding=0 border=0>
179 Use this to determine the event type for safe casting of the data
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>.
183 References <a class="el" href="modules_8h-source.html#l00208">id</a>.
185 <div class="fragment"><pre>00364 {
186 00365 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p2">id</a>;
191 <a name="a2" doxytag="Event::GetSource"></a><p>
192 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
195 <table cellpadding="0" cellspacing="0" border="0">
197 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Event::GetSource </td>
198 <td class="md" valign="top">( </td>
199 <td class="mdname1" valign="top" nowrap> </td>
200 <td class="md" valign="top"> ) </td>
201 <td class="md" nowrap></td>
208 <table cellspacing=5 cellpadding=0 border=0>
216 Get the event Source.
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>.
222 References <a class="el" href="modules_8h-source.html#l00203">source</a>.
224 <div class="fragment"><pre>00353 {
225 00354 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p1">source</a>;
230 <a name="a4" doxytag="Event::Send"></a><p>
231 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
234 <table cellpadding="0" cellspacing="0" border="0">
236 <td class="md" nowrap valign="top"> char * Event::Send </td>
237 <td class="md" valign="top">( </td>
238 <td class="mdname1" valign="top" nowrap> </td>
239 <td class="md" valign="top"> ) </td>
240 <td class="md" nowrap><code> [virtual]</code></td>
247 <table cellspacing=5 cellpadding=0 border=0>
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.
259 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
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>.
263 References <a class="el" href="modules_8h-source.html#l00079">FOREACH_MOD</a>.
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;
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">
277 <table cellpadding="0" cellspacing="0" border="0">
279 <td class="md" nowrap valign="top"> char* <a class="el" href="classEvent.html#p0">Event::data</a><code> [protected]</code>
284 <table cellspacing=5 cellpadding=0 border=0>
292 This member holds a pointer to arbitary data set by the emitter of the message.
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>.
298 Referenced by <a class="el" href="modules_8cpp-source.html#l00347">GetData()</a>. </td>
301 <a name="p2" doxytag="Event::id"></a><p>
302 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
305 <table cellpadding="0" cellspacing="0" border="0">
307 <td class="md" nowrap valign="top"> std::string <a class="el" href="classEvent.html#p2">Event::id</a><code> [protected]</code>
312 <table cellspacing=5 cellpadding=0 border=0>
320 The event identifier.
322 This is arbitary text which should be used to distinguish one type of event from another.
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>.
326 Referenced by <a class="el" href="modules_8cpp-source.html#l00363">GetEventID()</a>. </td>
329 <a name="p1" doxytag="Event::source"></a><p>
330 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
333 <table cellpadding="0" cellspacing="0" border="0">
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>
340 <table cellspacing=5 cellpadding=0 border=0>
348 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
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>.
354 Referenced by <a class="el" href="modules_8cpp-source.html#l00352">GetSource()</a>. </td>
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>