From e0db7b0d2f777361c8194c5820bb2f6e44c55204 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 11:15:09 +0000 Subject: Added documentation for CullItem and CullList git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2466 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classCullList.html | 208 +++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 docs/module-doc/classCullList.html (limited to 'docs/module-doc/classCullList.html') diff --git a/docs/module-doc/classCullList.html b/docs/module-doc/classCullList.html new file mode 100644 index 000000000..23176ef93 --- /dev/null +++ b/docs/module-doc/classCullList.html @@ -0,0 +1,208 @@ + + +InspIRCd: CullList Class Reference + + + +
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members
+

CullList Class Reference

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. +More... +

+#include <cull_list.h> +

+Collaboration diagram for CullList:

Collaboration graph
+
[legend]
List of all members. + + + + + + + + + + + + + + + + + + +

Public Member Functions

 CullList ()
 Constructor.
void AddItem (userrec *user, std::string reason)
 Adds a user to the cull list for later removal via QUIT.
int Apply ()
 Applies the cull list, quitting all the users on the list with their quit reasons all at once.

Private Attributes

std::vector< CullItemlist
 Holds a list of users being quit.
std::map< userrec *, int > exempt
 A list of users who have already been placed on the list, as a map for fast reference.
+

Detailed Description

+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. +

+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. +

+ +

+Definition at line 75 of file cull_list.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + +
CullList::CullList  ) 
+
+ + + + + +
+   + + +

+Constructor. +

+Clears the CullList::list and CullList::exempt items.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void CullList::AddItem userrec user,
std::string  reason
+
+ + + + + +
+   + + +

+Adds a user to the cull list for later removal via QUIT. +

+

Parameters:
+ + + +
user The user to add
reason The quit reason of the user being added
+
+
+

+ + + + +
+ + + + + + + + +
int CullList::Apply  ) 
+
+ + + + + +
+   + + +

+Applies the cull list, quitting all the users on the list with their quit reasons all at once. +

+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.

Returns:
The number of users removed from IRC.
+
+


Member Data Documentation

+

+ + + + +
+ + + + +
std::map<userrec*,int> CullList::exempt [private]
+
+ + + + + +
+   + + +

+A list of users who have already been placed on the list, as a map for fast reference. +

+ +

+Definition at line 87 of file cull_list.h.

+

+ + + + +
+ + + + +
std::vector<CullItem> CullList::list [private]
+
+ + + + + +
+   + + +

+Holds a list of users being quit. +

+See the information for CullItem for more information. +

+Definition at line 82 of file cull_list.h.

+


The documentation for this class was generated from the following file: +
Generated on Thu Dec 15 11:14:18 2005 for InspIRCd by  + +doxygen 1.4.4-20050815
+ + -- cgit v1.2.3