]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/Request.3
Added docs for new smaller memory footprint classes
[user/henk/code/inspircd.git] / docs / man / man3 / Request.3
1 .TH "Request" 3 "12 May 2005" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Request \- The Request class is a unicast message directed at a given module.  
6
7 .PP
8 .SH SYNOPSIS
9 .br
10 .PP
11 \fC#include <modules.h>\fP
12 .PP
13 Inherits \fBModuleMessage\fP.
14 .PP
15 .SS "Public Member Functions"
16
17 .in +1c
18 .ti -1c
19 .RI "\fBRequest\fP (char *anydata, \fBModule\fP *src, \fBModule\fP *dst)"
20 .br
21 .RI "\fICreate a new Request. \fP"
22 .ti -1c
23 .RI "char * \fBGetData\fP ()"
24 .br
25 .RI "\fIFetch the Request data. \fP"
26 .ti -1c
27 .RI "\fBModule\fP * \fBGetSource\fP ()"
28 .br
29 .RI "\fIFetch the request source. \fP"
30 .ti -1c
31 .RI "\fBModule\fP * \fBGetDest\fP ()"
32 .br
33 .RI "\fIFetch the request destination (should be 'this' in the receiving module). \fP"
34 .ti -1c
35 .RI "char * \fBSend\fP ()"
36 .br
37 .RI "\fISend the Request. \fP"
38 .in -1c
39 .SS "Protected Attributes"
40
41 .in +1c
42 .ti -1c
43 .RI "char * \fBdata\fP"
44 .br
45 .RI "\fIThis member holds a pointer to arbitary data set by the emitter of the message. \fP"
46 .ti -1c
47 .RI "\fBModule\fP * \fBsource\fP"
48 .br
49 .RI "\fIThis is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. \fP"
50 .ti -1c
51 .RI "\fBModule\fP * \fBdest\fP"
52 .br
53 .RI "\fIThe single destination of the Request. \fP"
54 .in -1c
55 .SH "Detailed Description"
56 .PP 
57 The Request class is a unicast message directed at a given module. 
58
59 When this class is properly instantiated it may be sent to a module using the \fBSend()\fP method, which will call the given module's OnRequest method with this class as its parameter. 
60 .PP
61 Definition at line 154 of file modules.h.
62 .SH "Constructor & Destructor Documentation"
63 .PP 
64 .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
65 .PP
66 Create a new Request. Definition at line 316 of file modules.cpp.
67 .PP
68 .nf
69 316 : data(anydata), source(src), dest(dst) { };
70 .fi
71 .SH "Member Function Documentation"
72 .PP 
73 .SS "char * Request::GetData ()"
74 .PP
75 Fetch the Request data. Definition at line 318 of file modules.cpp.
76 .PP
77 References data.
78 .PP
79 .nf
80 319 {
81 320         return this->data;
82 321 }
83 .fi
84 .SS "\fBModule\fP * Request::GetDest ()"
85 .PP
86 Fetch the request destination (should be 'this' in the receiving module). Definition at line 328 of file modules.cpp.
87 .PP
88 References dest.
89 .PP
90 .nf
91 329 {
92 330         return this->dest;
93 331 }
94 .fi
95 .SS "\fBModule\fP * Request::GetSource ()"
96 .PP
97 Fetch the request source. Definition at line 323 of file modules.cpp.
98 .PP
99 References source.
100 .PP
101 .nf
102 324 {
103 325         return this->source;
104 326 }
105 .fi
106 .SS "char * Request::Send ()\fC [virtual]\fP"
107 .PP
108 Send the Request. 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. Implements \fBModuleMessage\fP.
109 .PP
110 Definition at line 333 of file modules.cpp.
111 .PP
112 References dest, and Module::OnRequest().
113 .PP
114 .nf
115 334 {
116 335         if (this->dest)
117 336         {
118 337                 return dest->OnRequest(this);
119 338         }
120 339         else
121 340         {
122 341                 return NULL;
123 342         }
124 343 }
125 .fi
126 .SH "Member Data Documentation"
127 .PP 
128 .SS "char* \fBRequest::data\fP\fC [protected]\fP"
129 .PP
130 This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 159 of file modules.h.
131 .PP
132 Referenced by GetData().
133 .SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP"
134 .PP
135 The single destination of the Request. Definition at line 166 of file modules.h.
136 .PP
137 Referenced by GetDest(), and Send().
138 .SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP"
139 .PP
140 This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 163 of file modules.h.
141 .PP
142 Referenced by GetSource().
143
144 .SH "Author"
145 .PP 
146 Generated automatically by Doxygen for InspIRCd from the source code.