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 Inherits <a class="el" href="classModuleMessage.html">ModuleMessage</a>.
15 <a href="classEvent-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <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>
20 <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new Event. </em> <a href="#a0"></a><em><br><br></td></tr>
21 <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>
23 <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the Event data. </em> <a href="#a1"></a><em><br><br></td></tr>
24 <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>
26 <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the event Source. </em> <a href="#a2"></a><em><br><br></td></tr>
27 <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>
29 <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the event ID. </em> <a href="#a3"></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#a4">Send</a> ()</td></tr>
32 <tr><td class="mdescLeft"> </td><td class="mdescRight">Send the Event. </em> <a href="#a4"></a><em><br><br></td></tr>
33 <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
34 <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>
36 <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>
37 <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>
39 <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>
40 <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>
42 <tr><td class="mdescLeft"> </td><td class="mdescRight">The event identifier. </em> <a href="#p2"></a><em><br><br></td></tr>
44 <hr><a name="_details"></a><h2>Detailed Description</h2>
45 The Event class is a unicast message directed at all modules.
47 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.
51 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>
52 <a name="a0" doxytag="Event::Event"></a><p>
53 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
56 <table cellpadding="0" cellspacing="0" border="0">
58 <td class="md" nowrap valign="top"> Event::Event </td>
59 <td class="md" valign="top">( </td>
60 <td class="md" nowrap valign="top">char * </td>
61 <td class="mdname" nowrap> <em>anydata</em>, </td>
66 <td class="md" nowrap><a class="el" href="classModule.html">Module</a> * </td>
67 <td class="mdname" nowrap> <em>src</em>, </td>
72 <td class="md" nowrap>std::string </td>
73 <td class="mdname" nowrap> <em>eventid</em></td>
77 <td class="md">) </td>
78 <td class="md" colspan="2"></td>
85 <table cellspacing=5 cellpadding=0 border=0>
97 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>.
99 <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) { };
103 <hr><h2>Member Function Documentation</h2>
104 <a name="a1" doxytag="Event::GetData"></a><p>
105 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
108 <table cellpadding="0" cellspacing="0" border="0">
110 <td class="md" nowrap valign="top"> char * Event::GetData </td>
111 <td class="md" valign="top">( </td>
112 <td class="mdname1" valign="top" nowrap> </td>
113 <td class="md" valign="top"> ) </td>
114 <td class="md" nowrap></td>
121 <table cellspacing=5 cellpadding=0 border=0>
133 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>.
135 References <a class="el" href="modules_8h-source.html#l00199">data</a>.
137 <div class="fragment"><pre>00348 {
138 00349 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p0">data</a>;
143 <a name="a3" doxytag="Event::GetEventID"></a><p>
144 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
147 <table cellpadding="0" cellspacing="0" border="0">
149 <td class="md" nowrap valign="top"> std::string Event::GetEventID </td>
150 <td class="md" valign="top">( </td>
151 <td class="mdname1" valign="top" nowrap> </td>
152 <td class="md" valign="top"> ) </td>
153 <td class="md" nowrap></td>
160 <table cellspacing=5 cellpadding=0 border=0>
170 Use this to determine the event type for safe casting of the data
172 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>.
174 References <a class="el" href="modules_8h-source.html#l00208">id</a>.
176 <div class="fragment"><pre>00364 {
177 00365 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p2">id</a>;
182 <a name="a2" doxytag="Event::GetSource"></a><p>
183 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
186 <table cellpadding="0" cellspacing="0" border="0">
188 <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Event::GetSource </td>
189 <td class="md" valign="top">( </td>
190 <td class="mdname1" valign="top" nowrap> </td>
191 <td class="md" valign="top"> ) </td>
192 <td class="md" nowrap></td>
199 <table cellspacing=5 cellpadding=0 border=0>
207 Get the event Source.
211 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>.
213 References <a class="el" href="modules_8h-source.html#l00203">source</a>.
215 <div class="fragment"><pre>00353 {
216 00354 <span class="keywordflow">return</span> this-><a class="code" href="classEvent.html#p1">source</a>;
221 <a name="a4" doxytag="Event::Send"></a><p>
222 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
225 <table cellpadding="0" cellspacing="0" border="0">
227 <td class="md" nowrap valign="top"> char * Event::Send </td>
228 <td class="md" valign="top">( </td>
229 <td class="mdname1" valign="top" nowrap> </td>
230 <td class="md" valign="top"> ) </td>
231 <td class="md" nowrap><code> [virtual]</code></td>
238 <table cellspacing=5 cellpadding=0 border=0>
248 The return result of an <a class="el" href="classEvent.html#a4">Event::Send()</a> will always be NULL as no replies are expected.
250 Implements <a class="el" href="classModuleMessage.html#a0">ModuleMessage</a>.
252 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>.
254 References <a class="el" href="modules_8h-source.html#l00079">FOREACH_MOD</a>.
256 <div class="fragment"><pre>00358 {
257 00359 <a class="code" href="modules_8h.html#a24">FOREACH_MOD</a> OnEvent(<span class="keyword">this</span>);
258 00360 <span class="keywordflow">return</span> NULL;
263 <hr><h2>Member Data Documentation</h2>
264 <a name="p0" doxytag="Event::data"></a><p>
265 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
268 <table cellpadding="0" cellspacing="0" border="0">
270 <td class="md" nowrap valign="top"> char* <a class="el" href="classEvent.html#p0">Event::data</a><code> [protected]</code>
275 <table cellspacing=5 cellpadding=0 border=0>
283 This member holds a pointer to arbitary data set by the emitter of the message.
287 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>.
289 Referenced by <a class="el" href="modules_8cpp-source.html#l00347">GetData()</a>. </td>
292 <a name="p2" doxytag="Event::id"></a><p>
293 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
296 <table cellpadding="0" cellspacing="0" border="0">
298 <td class="md" nowrap valign="top"> std::string <a class="el" href="classEvent.html#p2">Event::id</a><code> [protected]</code>
303 <table cellspacing=5 cellpadding=0 border=0>
311 The event identifier.
313 This is arbitary text which should be used to distinguish one type of event from another.
315 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>.
317 Referenced by <a class="el" href="modules_8cpp-source.html#l00363">GetEventID()</a>. </td>
320 <a name="p1" doxytag="Event::source"></a><p>
321 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
324 <table cellpadding="0" cellspacing="0" border="0">
326 <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>
331 <table cellspacing=5 cellpadding=0 border=0>
339 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
343 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>.
345 Referenced by <a class="el" href="modules_8cpp-source.html#l00352">GetSource()</a>. </td>
348 <hr>The documentation for this class was generated from the following files:<ul>
349 <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>
350 <hr size="1"><address style="align: right;"><small>Generated on Thu May 12 22:59:02 2005 for InspIRCd by
351 <a href="http://www.doxygen.org/index.html">
352 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
353 </a>1.3.3 </small></address>