]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/Event.3
Re-added the dot graphs again
[user/henk/code/inspircd.git] / docs / man / man3 / Event.3
1 .TH "Event" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Event \- The Event class is a unicast message directed at all modules.  
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 "\fBEvent\fP (char *anydata, \fBModule\fP *src, std::string eventid)"
20 .br
21 .RI "\fICreate a new Event. \fP"
22 .ti -1c
23 .RI "char * \fBGetData\fP ()"
24 .br
25 .RI "\fIGet the Event data. \fP"
26 .ti -1c
27 .RI "\fBModule\fP * \fBGetSource\fP ()"
28 .br
29 .RI "\fIGet the event Source. \fP"
30 .ti -1c
31 .RI "std::string \fBGetEventID\fP ()"
32 .br
33 .RI "\fIGet the event ID. \fP"
34 .ti -1c
35 .RI "char * \fBSend\fP ()"
36 .br
37 .RI "\fISend the Event. \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 "std::string \fBid\fP"
52 .br
53 .RI "\fIThe event identifier. \fP"
54 .in -1c
55 .SH "Detailed Description"
56 .PP 
57 The Event class is a unicast message directed at all modules. 
58
59 When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter. 
60 .PP
61 Definition at line 194 of file modules.h.
62 .SH "Constructor & Destructor Documentation"
63 .PP 
64 .SS "Event::Event (char * anydata, \fBModule\fP * src, std::string eventid)"
65 .PP
66 Create a new Event. Definition at line 345 of file modules.cpp.
67 .PP
68 .nf
69 345 : data(anydata), source(src), id(eventid) { };
70 .fi
71 .SH "Member Function Documentation"
72 .PP 
73 .SS "char * Event::GetData ()"
74 .PP
75 Get the Event data. Definition at line 347 of file modules.cpp.
76 .PP
77 References data.
78 .PP
79 .nf
80 348 {
81 349         return this->data;
82 350 }
83 .fi
84 .SS "std::string Event::GetEventID ()"
85 .PP
86 Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 363 of file modules.cpp.
87 .PP
88 References id.
89 .PP
90 .nf
91 364 {
92 365         return this->id;
93 366 }
94 .fi
95 .SS "\fBModule\fP * Event::GetSource ()"
96 .PP
97 Get the event Source. Definition at line 352 of file modules.cpp.
98 .PP
99 References source.
100 .PP
101 .nf
102 353 {
103 354         return this->source;
104 355 }
105 .fi
106 .SS "char * Event::Send ()\fC [virtual]\fP"
107 .PP
108 Send the Event. The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected. Implements \fBModuleMessage\fP.
109 .PP
110 Definition at line 357 of file modules.cpp.
111 .PP
112 References FOREACH_MOD.
113 .PP
114 .nf
115 358 {
116 359         FOREACH_MOD OnEvent(this);
117 360         return NULL;
118 361 }
119 .fi
120 .SH "Member Data Documentation"
121 .PP 
122 .SS "char* \fBEvent::data\fP\fC [protected]\fP"
123 .PP
124 This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 199 of file modules.h.
125 .PP
126 Referenced by GetData().
127 .SS "std::string \fBEvent::id\fP\fC [protected]\fP"
128 .PP
129 The event identifier. This is arbitary text which should be used to distinguish one type of event from another. Definition at line 208 of file modules.h.
130 .PP
131 Referenced by GetEventID().
132 .SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP"
133 .PP
134 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 203 of file modules.h.
135 .PP
136 Referenced by GetSource().
137
138 .SH "Author"
139 .PP 
140 Generated automatically by Doxygen for InspIRCd from the source code.