From 88dd74fc84b574f17673338c6d42123570f464da Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 12 May 2005 23:06:51 +0000 Subject: Added docs for new smaller memory footprint classes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1371 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classchanrec.html | 490 +++++++++----------------------------- 1 file changed, 113 insertions(+), 377 deletions(-) (limited to 'docs/module-doc/classchanrec.html') diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index 44fde568f..c66a50bb8 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -27,28 +27,22 @@ Inherits Extensible. std::string GetModeParameter (char mode)  Returns the parameter for a custom mode on a channel.

-void IncUserCounter () +long GetUserCounter () - Increment the channel "user counter" The channel user counter is a reference counter which holds the number of users on the channel.


-void DecUserCounter () + Obtain the channel "user counter" This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks.


+void AddUser (char *castuser) - Decrement the channel "user counter" The channel user counter is a reference counter which holds the number of users on the channel.


-long GetUserCounter () + Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.


+void DelUser (char *castuser) - Obtain the channel "user counter" This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks.


-void AddUser (char *castuser) + Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.


+std::vector< char * > * GetUsers () - Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.


-void DelUser (char *castuser) + Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*.


chanrec () - Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.


-std::vector< char * > * GetUsers () - - Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*.


chanrec () - - Creates a channel record and initialises it with default values.


-virtual ~chanrec () + Creates a channel record and initialises it with default values.


+virtual ~chanrec ()

Public Attributes

char name [CHANMAX] @@ -57,51 +51,33 @@ Inherits Extensible. char custom_modes [MAXMODES]  Custom modes for the channel.


-long users - - Count of users on the channel used for fast user counting.


-std::vector< char * > internal_userlist - - User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!).


-char topic [MAXBUF] - - Channel topic.


-time_t created - - Creation time.


-time_t topicset - - Time topic was set.


-char setby [NICKMAX] +std::vector< char * > internal_userlist - The last user to set the topic.


-long limit + User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!).


+char topic [MAXBUF] - Contains the channel user limit.


-char key [32] + Channel topic.


+time_t created - Contains the channel key.


-short int topiclock + Creation time.


+time_t topicset - Nonzero if the mode +t is set.


-short int noexternal + Time topic was set.


+char setby [NICKMAX] - Nonzero if the mode +n is set.


-short int inviteonly + The last user to set the topic.


+short int limit - Nonzero if the mode +i is set.


-short int moderated + Contains the channel user limit.


+char key [32] - Nonzero if the mode +m is set.


-short int secret + Contains the channel key.


+char binarymodes - Nonzero if the mode +s is set.


-short int c_private + Contains a bitmask of the CM_* builtin (RFC) binary mode symbols.


+BanList bans - Nonzero if the mode +p is set.


-BanList bans - - The list of all bans set on the channel.


+ The list of all bans set on the channel.



Detailed Description

Holds all relevent information for a channel. @@ -110,8 +86,8 @@ This class represents a channel, and contains its name, modes, time created, top

-Definition at line 94 of file channels.h.


Constructor & Destructor Documentation

-

+Definition at line 101 of file channels.h.


Constructor & Destructor Documentation

+

@@ -142,7 +118,7 @@ Creates a channel record and initialises it with default values.

Definition at line 113 of file channels.cpp.

-References c_private, created, custom_modes, internal_userlist, inviteonly, key, limit, moderated, name, noexternal, secret, setby, topic, topiclock, topicset, and users. +References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset.

00114 {
 00115         strcpy(name,"");
@@ -150,14 +126,14 @@ References c_private, "");
 00118         strcpy(setby,"");
 00119         strcpy(key,"");
-00120         created = topicset = limit = users = 0;
-00121         topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
-00122         internal_userlist.clear();
+00120         created = topicset = limit = 0;
+00121         binarymodes = 0;
+00122         internal_userlist.clear();
 00123 }
 
-

+

@@ -184,14 +160,14 @@ References c_private,

-Definition at line 240 of file channels.h. +Definition at line 205 of file channels.h.

-

00240 { /* stub */ }
+
00205 { /* stub */ }
 


Member Function Documentation

-

+

- -
@@ -221,54 +197,18 @@ Add a user pointer to the internal reference list The data inserted into the ref

-Definition at line 215 of file channels.cpp. -

-References DEBUG, and internal_userlist. -

-

00216 {
-00217         internal_userlist.push_back(castuser);
-00218         log(DEBUG,"Added casted user to channel's internal list");
-00219 }
-
-

- - - - -
- - - - - - - - - -
void chanrec::DecUserCounter  ) 
-
- - - -
-   - - -

-Decrement the channel "user counter" The channel user counter is a reference counter which holds the number of users on the channel. +Definition at line 207 of file channels.cpp.

-If it decremented to 0 then the channel is removed from the system. Modules may alter the reference count to hold channels open which have no users and would normally be deleted once empty. +References DEBUG, and internal_userlist.

-Definition at line 206 of file channels.cpp. -

-

00207 {
-00208 }
+
00208 {
+00209         internal_userlist.push_back(castuser);
+00210         log(DEBUG,"Added casted user to channel's internal list");
+00211 }
 
-

+

@@ -298,22 +238,22 @@ Delete a user pointer to the internal reference list The data removed from the r

-Definition at line 221 of file channels.cpp. +Definition at line 213 of file channels.cpp.

-References DEBUG, internal_userlist, and name. +References DEBUG, internal_userlist, and name.

-

00222 {
-00223         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
-00224         {
-00225                 if (*a == castuser)
-00226                 {
-00227                         log(DEBUG,"Removed casted user from channel's internal list");
-00228                         internal_userlist.erase(a);
-00229                         return;
-00230                 }
-00231         }
-00232         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
-00233 }
+
00214 {
+00215         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+00216         {
+00217                 if (*a == castuser)
+00218                 {
+00219                         log(DEBUG,"Removed casted user from channel's internal list");
+00220                         internal_userlist.erase(a);
+00221                         return;
+00222                 }
+00223         }
+00224         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
+00225 }
 
@@ -367,7 +307,7 @@ References custom_mode_par -

+

@@ -396,17 +336,17 @@ Obtain the channel "user counter" This returns the channel reference counter, wh

-Definition at line 210 of file channels.cpp. +Definition at line 202 of file channels.cpp.

-References internal_userlist. +References internal_userlist.

-

00211 {
-00212         return (this->internal_userlist.size());
-00213 }
+
00203 {
+00204         return (this->internal_userlist.size());
+00205 }
 
-

+

- -
@@ -435,51 +375,15 @@ Obrain the internal reference list The internal reference list contains a list o

These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.

-Definition at line 235 of file channels.cpp. -

-References internal_userlist. -

-Referenced by Server::GetUsers(). -

-

00236 {
-00237         return &internal_userlist;
-00238 }
-
-

- - - - -
- - - - - - - - - -
void chanrec::IncUserCounter  ) 
-
- - - -
-   - - -

-Increment the channel "user counter" The channel user counter is a reference counter which holds the number of users on the channel. +Definition at line 227 of file channels.cpp.

-If it decremented to 0 then the channel is removed from the system. +References internal_userlist.

-Definition at line 202 of file channels.cpp. +Referenced by Server::GetUsers().

-

00203 {
-00204 }
+
00228 {
+00229         return &internal_userlist;
+00230 }
 
@@ -565,7 +469,7 @@ Sets or unsets a custom mode in the channels info.

Definition at line 125 of file channels.cpp.

-References custom_modes, DEBUG, and SetCustomModeParam(). +References custom_modes, DEBUG, and SetCustomModeParam().

00126 {
 00127         if (mode_on) {
@@ -639,7 +543,7 @@ Sets or unsets the parameters for a custom mode in a channels info.
 

Definition at line 150 of file channels.cpp.

-References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter. +References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter.

Referenced by SetCustomMode().

@@ -676,13 +580,13 @@ Referenced by SetCustomMod


Member Data Documentation

-

+

@@ -699,16 +603,16 @@ The list of all bans set on the channel.

-Definition at line 168 of file channels.h. +Definition at line 149 of file channels.h.

-
BanList chanrec::bans + BanList chanrec::bans
-

+

@@ -721,22 +625,22 @@ Definition at line 168 o
-
short int chanrec::c_private + char chanrec::binarymodes

-Nonzero if the mode +p is set. +Contains a bitmask of the CM_* builtin (RFC) binary mode symbols.

-This value cannot be set at the same time as chanrec::secret +

-Definition at line 164 of file channels.h. +Definition at line 145 of file channels.h.

Referenced by chanrec().

-

+

@@ -753,7 +657,7 @@ Creation time.

-Definition at line 120 of file channels.h. +Definition at line 123 of file channels.h.

Referenced by chanrec(). @@ -781,18 +685,18 @@ Custom modes for the channel.

Plugins may use this field in any way they see fit.

-Definition at line 103 of file channels.h. +Definition at line 110 of file channels.h.

Referenced by chanrec(), and SetCustomMode().

-
time_t chanrec::created + time_t chanrec::created
-

+

@@ -809,46 +713,18 @@ User list (casted to char*'s to stop forward declaration stuff) (chicken and egg

-Definition at line 112 of file channels.h. -

-Referenced by AddUser(), chanrec(), DelUser(), GetUserCounter(), and GetUsers(). - -

-
std::vector<char*> chanrec::internal_userlist + std::vector<char*> chanrec::internal_userlist
-

- - - - -
- - -
short int chanrec::inviteonly -
-
- - - - +Referenced by AddUser(), chanrec(), DelUser(), GetUserCounter(), and GetUsers().
-   - - -

-Nonzero if the mode +i is set. -

- -

-Definition at line 150 of file channels.h. +Definition at line 115 of file channels.h.

-Referenced by chanrec().

-

+

@@ -865,18 +741,18 @@ Contains the channel key.

If this value is an empty string, there is no channel key in place.

-Definition at line 138 of file channels.h. +Definition at line 141 of file channels.h.

Referenced by chanrec().

-
char chanrec::key[32] + char chanrec::key[32]
-

+

@@ -893,35 +769,7 @@ Contains the channel user limit.

If this value is zero, there is no limit in place.

-Definition at line 133 of file channels.h. -

-Referenced by chanrec(). - -

-
long chanrec::limit + short int chanrec::limit
-

- - - - -
- - -
short int chanrec::moderated -
-
- - - - @@ -949,74 +797,18 @@ The channels name.

-Definition at line 99 of file channels.h. -

-Referenced by chanrec(), DelUser(), and Server::PseudoToUser(). - -

-   - - -

-Nonzero if the mode +m is set. -

- -

-Definition at line 154 of file channels.h. +Definition at line 136 of file channels.h.

Referenced by chanrec().

-

- - - - -
- - -
short int chanrec::noexternal -
-
- - - - - -
-   - - -

-Nonzero if the mode +n is set. -

- -

-Definition at line 146 of file channels.h. -

-Referenced by chanrec().

-

- - - - -
- - -
short int chanrec::secret -
-
- - - - +Referenced by chanrec(), DelUser(), and Server::PseudoToUser().
-   - - -

-Nonzero if the mode +s is set. -

-This value cannot be set at the same time as chanrec::c_private -

-Definition at line 159 of file channels.h. +Definition at line 106 of file channels.h.

-Referenced by chanrec().

-

+

@@ -1033,18 +825,18 @@ The last user to set the topic.

If this member is an empty string, no topic was ever set.

-Definition at line 128 of file channels.h. +Definition at line 131 of file channels.h.

-Referenced by chanrec(), and Server::PseudoToUser(). +Referenced by chanrec(), and Server::PseudoToUser().

-
char chanrec::setby[NICKMAX] + char chanrec::setby[NICKMAX]
-

+

@@ -1061,46 +853,18 @@ Channel topic.

If this is an empty string, no channel topic is set.

-Definition at line 117 of file channels.h. -

-Referenced by chanrec(), and Server::PseudoToUser(). - -

-
char chanrec::topic[MAXBUF] + char chanrec::topic[MAXBUF]
-

- - - - -
- - -
short int chanrec::topiclock -
-
- - - - +Referenced by chanrec(), and Server::PseudoToUser().
-   - - -

-Nonzero if the mode +t is set. -

- -

-Definition at line 142 of file channels.h. +Definition at line 120 of file channels.h.

-Referenced by chanrec().

-

+

@@ -1115,44 +879,16 @@ Referenced by chanrec() Time topic was set.

-If no topic was ever set, this will be equal to chanrec::created +If no topic was ever set, this will be equal to chanrec::created

-Definition at line 124 of file channels.h. +Definition at line 127 of file channels.h.

-Referenced by chanrec(), and Server::PseudoToUser(). - -

-
time_t chanrec::topicset + time_t chanrec::topicset
-

- - - - -
- - -
long chanrec::users -
-
- - - - +Referenced by chanrec(), and Server::PseudoToUser().
-   - - -

-Count of users on the channel used for fast user counting. -

- -

-Definition at line 107 of file channels.h. -

-Referenced by chanrec().


The documentation for this class was generated from the following files: -
Generated on Thu May 12 02:25:18 2005 for InspIRCd by +
Generated on Thu May 12 22:59:01 2005 for InspIRCd by doxygen 1.3.3
-- cgit v1.2.3