]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classRequest.html
Re-added the dot graphs again
[user/henk/code/inspircd.git] / docs / module-doc / classRequest.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: Request 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>Request Class Reference</h1>The Request class is a unicast message directed at a given module.  
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 Request:<p><center><img src="classRequest__inherit__graph.gif" border="0" usemap="#Request__inherit__map" alt="Inheritance graph"></center>
14 <map name="Request__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 Request:<p><center><img src="classRequest__coll__graph.gif" border="0" usemap="#Request__coll__map" alt="Collaboration graph"></center>
19 <map name="Request__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="classRequest-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="classRequest.html#a0">Request</a> (char *anydata, <a class="el" href="classModule.html">Module</a> *src, <a class="el" href="classModule.html">Module</a> *dst)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new Request. </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="classRequest.html#a1">GetData</a> ()</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the Request 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="classRequest.html#a2">GetSource</a> ()</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the request source. </em> <a href="#a2"></a><em><br><br></td></tr>
36 <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="classRequest.html#a3">GetDest</a> ()</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch the request destination (should be 'this' in the receiving module). </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="classRequest.html#a4">Send</a> ()</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the Request. </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="classRequest.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="classRequest.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><a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRequest.html#p2">dest</a></td></tr>
50
51 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The single destination of the Request. </em> <a href="#p2"></a><em><br><br></td></tr>
52 </table>
53 <hr><a name="_details"></a><h2>Detailed Description</h2>
54 The Request class is a unicast message directed at a given module. 
55 <p>
56 When this class is properly instantiated it may be sent to a module using the <a class="el" href="classRequest.html#a4">Send()</a> method, which will call the given module's OnRequest method with this class as its parameter. 
57 <p>
58
59 <p>
60 Definition at line <a class="el" href="modules_8h-source.html#l00154">154</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="Request::Request"></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"> Request::Request </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><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
82           <td class="mdname" nowrap> <em>dst</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 Request. 
103 <p>
104
105 <p>
106 Definition at line <a class="el" href="modules_8cpp-source.html#l00316">316</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
107 <p>
108 <div class="fragment"><pre>00316 : <a class="code" href="classRequest.html#p0">data</a>(anydata), <a class="code" href="classRequest.html#p1">source</a>(src), <a class="code" href="classRequest.html#p2">dest</a>(dst) { };
109 </pre></div>    </td>
110   </tr>
111 </table>
112 <hr><h2>Member Function Documentation</h2>
113 <a name="a1" doxytag="Request::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 * Request::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 Fetch the Request data. 
139 <p>
140
141 <p>
142 Definition at line <a class="el" href="modules_8cpp-source.html#l00318">318</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#l00159">data</a>.
145 <p>
146 <div class="fragment"><pre>00319 {
147 00320         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p0">data</a>;
148 00321 }
149 </pre></div>    </td>
150   </tr>
151 </table>
152 <a name="a3" doxytag="Request::GetDest"></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"> <a class="el" href="classModule.html">Module</a> * Request::GetDest </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 Fetch the request destination (should be 'this' in the receiving module). 
178 <p>
179
180 <p>
181 Definition at line <a class="el" href="modules_8cpp-source.html#l00328">328</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#l00166">dest</a>.
184 <p>
185 <div class="fragment"><pre>00329 {
186 00330         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p2">dest</a>;
187 00331 }
188 </pre></div>    </td>
189   </tr>
190 </table>
191 <a name="a2" doxytag="Request::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> * Request::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 Fetch the request source. 
217 <p>
218
219 <p>
220 Definition at line <a class="el" href="modules_8cpp-source.html#l00323">323</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#l00163">source</a>.
223 <p>
224 <div class="fragment"><pre>00324 {
225 00325         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classRequest.html#p1">source</a>;
226 00326 }
227 </pre></div>    </td>
228   </tr>
229 </table>
230 <a name="a4" doxytag="Request::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 * Request::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 Request. 
256 <p>
257 Upon returning the result will be arbitary data returned by the module you sent the request to. It is up to your module to know what this data is and how to deal with it. 
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#l00333">333</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#l00166">dest</a>, and <a class="el" href="modules_8cpp-source.html#l00416">Module::OnRequest()</a>.
264 <p>
265 <div class="fragment"><pre>00334 {
266 00335         <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classRequest.html#p2">dest</a>)
267 00336         {
268 00337                 <span class="keywordflow">return</span> <a class="code" href="classRequest.html#p2">dest</a>-&gt;<a class="code" href="classModule.html#a46">OnRequest</a>(<span class="keyword">this</span>);
269 00338         }
270 00339         <span class="keywordflow">else</span>
271 00340         {
272 00341                 <span class="keywordflow">return</span> NULL;
273 00342         }
274 00343 }
275 </pre></div>    </td>
276   </tr>
277 </table>
278 <hr><h2>Member Data Documentation</h2>
279 <a name="p0" doxytag="Request::data"></a><p>
280 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
281   <tr>
282     <td class="mdRow">
283       <table cellpadding="0" cellspacing="0" border="0">
284         <tr>
285           <td class="md" nowrap valign="top"> char* <a class="el" href="classRequest.html#p0">Request::data</a><code> [protected]</code>
286       </table>
287     </td>
288   </tr>
289 </table>
290 <table cellspacing=5 cellpadding=0 border=0>
291   <tr>
292     <td>
293       &nbsp;
294     </td>
295     <td>
296
297 <p>
298 This member holds a pointer to arbitary data set by the emitter of the message. 
299 <p>
300
301 <p>
302 Definition at line <a class="el" href="modules_8h-source.html#l00159">159</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
303 <p>
304 Referenced by <a class="el" href="modules_8cpp-source.html#l00318">GetData()</a>.    </td>
305   </tr>
306 </table>
307 <a name="p2" doxytag="Request::dest"></a><p>
308 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
309   <tr>
310     <td class="mdRow">
311       <table cellpadding="0" cellspacing="0" border="0">
312         <tr>
313           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a>* <a class="el" href="classRequest.html#p2">Request::dest</a><code> [protected]</code>
314       </table>
315     </td>
316   </tr>
317 </table>
318 <table cellspacing=5 cellpadding=0 border=0>
319   <tr>
320     <td>
321       &nbsp;
322     </td>
323     <td>
324
325 <p>
326 The single destination of the Request. 
327 <p>
328
329 <p>
330 Definition at line <a class="el" href="modules_8h-source.html#l00166">166</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
331 <p>
332 Referenced by <a class="el" href="modules_8cpp-source.html#l00328">GetDest()</a>, and <a class="el" href="modules_8cpp-source.html#l00333">Send()</a>.    </td>
333   </tr>
334 </table>
335 <a name="p1" doxytag="Request::source"></a><p>
336 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
337   <tr>
338     <td class="mdRow">
339       <table cellpadding="0" cellspacing="0" border="0">
340         <tr>
341           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a>* <a class="el" href="classRequest.html#p1">Request::source</a><code> [protected]</code>
342       </table>
343     </td>
344   </tr>
345 </table>
346 <table cellspacing=5 cellpadding=0 border=0>
347   <tr>
348     <td>
349       &nbsp;
350     </td>
351     <td>
352
353 <p>
354 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. 
355 <p>
356
357 <p>
358 Definition at line <a class="el" href="modules_8h-source.html#l00163">163</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.
359 <p>
360 Referenced by <a class="el" href="modules_8cpp-source.html#l00323">GetSource()</a>.    </td>
361   </tr>
362 </table>
363 <hr>The documentation for this class was generated from the following files:<ul>
364 <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>
365 <hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:58 2005 for InspIRCd by
366 <a href="http://www.doxygen.org/index.html">
367 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
368 </a>1.3.3 </small></address>
369 </body>
370 </html>