]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/CullList.3
0d8444d536787cbb8405578dcc9a1aceec2f5332
[user/henk/code/inspircd.git] / docs / man / man3 / CullList.3
1 .TH "CullList" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 CullList \- The CullList class can be used by modules, and is used by the core, to compile large lists of users in preperation to quitting them all at once.  
6
7 .PP
8 .SH SYNOPSIS
9 .br
10 .PP
11 \fC#include <cull_list.h>\fP
12 .PP
13 .SS "Public Member Functions"
14
15 .in +1c
16 .ti -1c
17 .RI "\fBCullList\fP ()"
18 .br
19 .RI "\fIConstructor. \fP"
20 .ti -1c
21 .RI "void \fBAddItem\fP (\fBuserrec\fP *user, \fBstd::string\fP reason)"
22 .br
23 .RI "\fIAdds a user to the cull list for later removal via QUIT. \fP"
24 .ti -1c
25 .RI "int \fBApply\fP ()"
26 .br
27 .RI "\fIApplies the cull list, quitting all the users on the list with their quit reasons all at once. \fP"
28 .in -1c
29 .SS "Private Attributes"
30
31 .in +1c
32 .ti -1c
33 .RI "std::vector< \fBCullItem\fP > \fBlist\fP"
34 .br
35 .RI "\fIHolds a list of users being quit. \fP"
36 .ti -1c
37 .RI "std::map< \fBuserrec\fP *, int > \fBexempt\fP"
38 .br
39 .RI "\fIA list of users who have already been placed on the list, as a map for fast reference. \fP"
40 .in -1c
41 .SH "Detailed Description"
42 .PP 
43 The CullList class can be used by modules, and is used by the core, to compile large lists of users in preperation to quitting them all at once. 
44
45 This is faster than quitting them within the loop, as the loops become tighter with little or no comparisons within them. The CullList class operates by allowing the programmer to push users onto the list, each with a seperate quit reason, and then, once the list is complete, call a method to flush the list, quitting all the users upon it. A CullList may hold local or remote users, but it may only hold each user once. If you attempt to add the same user twice, then the second attempt will be ignored.
46 .PP
47 Definition at line 75 of file cull_list.h.
48 .SH "Constructor & Destructor Documentation"
49 .PP 
50 .SS "CullList::CullList ()"
51 .PP
52 Constructor. 
53 .PP
54 Clears the \fBCullList::list\fP and \fBCullList::exempt\fP items.
55 .SH "Member Function Documentation"
56 .PP 
57 .SS "void CullList::AddItem (\fBuserrec\fP * user, \fBstd::string\fP reason)"
58 .PP
59 Adds a user to the cull list for later removal via QUIT. 
60 .PP
61 \fBParameters:\fP
62 .RS 4
63 \fIuser\fP The user to add 
64 .br
65 \fIreason\fP The quit reason of the user being added
66 .RE
67 .PP
68
69 .SS "int CullList::Apply ()"
70 .PP
71 Applies the cull list, quitting all the users on the list with their quit reasons all at once. 
72 .PP
73 This is a very fast operation compared to iterating the user list and comparing each one, especially if there are multiple comparisons to be done, or recursion. 
74 .PP
75 \fBReturns:\fP
76 .RS 4
77 The number of users removed from IRC.
78 .RE
79 .PP
80
81 .SH "Member Data Documentation"
82 .PP 
83 .SS "std::map<\fBuserrec\fP*,int> \fBCullList::exempt\fP\fC [private]\fP"
84 .PP
85 A list of users who have already been placed on the list, as a map for fast reference. 
86 .PP
87 Definition at line 87 of file cull_list.h.
88 .SS "std::vector<\fBCullItem\fP> \fBCullList::list\fP\fC [private]\fP"
89 .PP
90 Holds a list of users being quit. 
91 .PP
92 See the information for \fBCullItem\fP for more information.
93 .PP
94 Definition at line 82 of file cull_list.h.
95
96 .SH "Author"
97 .PP 
98 Generated automatically by Doxygen for InspIRCd from the source code.