<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>InspIRCd: Event class Reference</title> <link href="inspircd.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.3 --> <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> <h1>Event Class Reference</h1>The Event class is a unicast message directed at all modules. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code> <p> Inherits <a class="el" href="classModuleMessage.html">ModuleMessage</a>. <p> <a href="classEvent-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new Event. </em> <a href="#a0"></a><em><br><br></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the Event data. </em> <a href="#a1"></a><em><br><br></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the event Source. </em> <a href="#a2"></a><em><br><br></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the event ID. </em> <a href="#a3"></a><em><br><br></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Send the Event. </em> <a href="#a4"></a><em><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> <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> <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> <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> <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> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">The event identifier. </em> <a href="#p2"></a><em><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The Event class is a unicast message directed at all modules. <p> 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. <p> <p> 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> <a name="a0" doxytag="Event::Event"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> Event::Event </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>anydata</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td> <td class="mdname" nowrap> <em>src</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>std::string </td> <td class="mdname" nowrap> <em>eventid</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create a new Event. <p> <p> Definition at line <a class="el" href="modules_8cpp-source.html#l00335">335</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> <div class="fragment"><pre>00335 : <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) { }; </pre></div> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a1" doxytag="Event::GetData"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char * Event::GetData </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the Event data. <p> <p> Definition at line <a class="el" href="modules_8cpp-source.html#l00337">337</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l00199">data</a>. <p> <div class="fragment"><pre>00338 { 00339 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p0">data</a>; 00340 } </pre></div> </td> </tr> </table> <a name="a3" doxytag="Event::GetEventID"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::string Event::GetEventID </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the event ID. <p> Use this to determine the event type for safe casting of the data <p> Definition at line <a class="el" href="modules_8cpp-source.html#l00353">353</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l00208">id</a>. <p> <div class="fragment"><pre>00354 { 00355 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p2">id</a>; 00356 } </pre></div> </td> </tr> </table> <a name="a2" doxytag="Event::GetSource"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Event::GetSource </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the event Source. <p> <p> Definition at line <a class="el" href="modules_8cpp-source.html#l00342">342</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l00203">source</a>. <p> <div class="fragment"><pre>00343 { 00344 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p1">source</a>; 00345 } </pre></div> </td> </tr> </table> <a name="a4" doxytag="Event::Send"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char * Event::Send </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Send the Event. <p> The return result of an <a class="el" href="classEvent.html#a4">Event::Send()</a> will always be NULL as no replies are expected. <p> Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>. <p> 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>. <p> References <a class="el" href="modules_8h-source.html#l00079">FOREACH_MOD</a>. <p> <div class="fragment"><pre>00348 { 00349 <a class="code" href="modules_8h.html#a24">FOREACH_MOD</a> OnEvent(<span class="keyword">this</span>); 00350 <span class="keywordflow">return</span> NULL; 00351 } </pre></div> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="p0" doxytag="Event::data"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char* <a class="el" href="classEvent.html#p0">Event::data</a><code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> This member holds a pointer to arbitary data set by the emitter of the message. <p> <p> 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>. <p> Referenced by <a class="el" href="modules_8cpp-source.html#l00337">GetData()</a>. </td> </tr> </table> <a name="p2" doxytag="Event::id"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::string <a class="el" href="classEvent.html#p2">Event::id</a><code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The event identifier. <p> This is arbitary text which should be used to distinguish one type of event from another. <p> 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>. <p> Referenced by <a class="el" href="modules_8cpp-source.html#l00353">GetEventID()</a>. </td> </tr> </table> <a name="p1" doxytag="Event::source"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <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> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. <p> <p> 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>. <p> Referenced by <a class="el" href="modules_8cpp-source.html#l00342">GetSource()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <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> <hr size="1"><address style="align: right;"><small>Generated on Sat May 7 15:34:24 2005 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.3 </small></address> </body> </html>