]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classExtensible.html
Fixed 'fake direction' messages being put out by user->registered = 7 being set too...
[user/henk/code/inspircd.git] / docs / module-doc / classExtensible.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Extensible Class Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Extensible Class Reference</h1><!-- doxytag: class="Extensible" --><!-- doxytag: inherits="classbase" -->class Extensible is the parent class of many classes such as userrec and chanrec.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="base_8h-source.html">base.h</a>&gt;</code>
12 <p>
13 Inheritance diagram for Extensible:<p><center><img src="classExtensible__inherit__graph.gif" border="0" usemap="#Extensible__inherit__map" alt="Inheritance graph"></center>
14 <map name="Extensible__inherit__map">
15 <area href="classchanrec.html" shape="rect" coords="7,156,76,183" alt="">
16 <area href="classcommand__t.html" shape="rect" coords="100,156,191,183" alt="">
17 <area href="classconnection.html" shape="rect" coords="215,156,300,183" alt="">
18 <area href="classclassbase.html" shape="rect" coords="106,7,186,33" alt="">
19 <area href="classuserrec.html" shape="rect" coords="224,231,291,257" alt="">
20 </map>
21 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Extensible:<p><center><img src="classExtensible__coll__graph.gif" border="0" usemap="#Extensible__coll__map" alt="Collaboration graph"></center>
22 <map name="Extensible__coll__map">
23 <area href="classclassbase.html" shape="rect" coords="7,97,87,124" alt="">
24 </map>
25 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classExtensible-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
26 <tr><td></td></tr>
27 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
28 <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExtensible.html#Extend_28std_3A_3Astring_20key_2C_20char_20_2Ap_29">Extend</a> (<a class="el" href="namespaceirc.html#string">std::string</a> key, char *p)</td></tr>
29
30 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extend an Extensible class.  <a href="#Extend_28std_3A_3Astring_20key_2C_20char_20_2Ap_29"></a><br></td></tr>
31 <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExtensible.html#Shrink_28std_3A_3Astring_20key_29">Shrink</a> (<a class="el" href="namespaceirc.html#string">std::string</a> key)</td></tr>
32
33 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shrink an Extensible class.  <a href="#Shrink_28std_3A_3Astring_20key_29"></a><br></td></tr>
34 <tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExtensible.html#GetExt_28std_3A_3Astring_20key_29">GetExt</a> (<a class="el" href="namespaceirc.html#string">std::string</a> key)</td></tr>
35
36 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an extension item.  <a href="#GetExt_28std_3A_3Astring_20key_29"></a><br></td></tr>
37 <tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
38 <tr><td class="memItemLeft" nowrap align="right" valign="top">std::map&lt; <a class="el" href="namespaceirc.html#string">std::string</a>, char * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classExtensible.html#Extension_5FItems">Extension_Items</a></td></tr>
39
40 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Private data store.  <a href="#Extension_5FItems"></a><br></td></tr>
41 </table>
42 <hr><a name="_details"></a><h2>Detailed Description</h2>
43 class Extensible is the parent class of many classes such as userrec and chanrec. 
44 <p>
45 class Extensible implements a system which allows modules to 'extend' the class by attaching data within a map associated with the object. In this way modules can store their own custom information within user objects, channel objects and server objects, without breaking other modules (this is more sensible than using a flags variable, and each module defining bits within the flag as 'theirs' as it is less prone to conflict and supports arbitary data storage).
46 <p>
47
48 <p>
49 Definition at line <a class="el" href="base_8h-source.html#l00050">50</a> of file <a class="el" href="base_8h-source.html">base.h</a>.<hr><h2>Member Function Documentation</h2>
50 <a class="anchor" name="Extend_28std_3A_3Astring_20key_2C_20char_20_2Ap_29"></a><!-- doxytag: member="Extensible::Extend" ref="Extend_28std_3A_3Astring_20key_2C_20char_20_2Ap_29" args="(std::string key, char *p)" --><p>
51 <table class="mdTable" cellpadding="2" cellspacing="0">
52   <tr>
53     <td class="mdRow">
54       <table cellpadding="0" cellspacing="0" border="0">
55         <tr>
56           <td class="md" nowrap valign="top">bool Extensible::Extend           </td>
57           <td class="md" valign="top">(&nbsp;</td>
58           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
59           <td class="mdname" nowrap> <em>key</em>, </td>
60         </tr>
61         <tr>
62           <td class="md" nowrap align="right"></td>
63           <td class="md"></td>
64           <td class="md" nowrap>char *&nbsp;</td>
65           <td class="mdname" nowrap> <em>p</em></td>
66         </tr>
67         <tr>
68           <td class="md"></td>
69           <td class="md">)&nbsp;</td>
70           <td class="md" colspan="2"></td>
71         </tr>
72       </table>
73     </td>
74   </tr>
75 </table>
76 <table cellspacing="5" cellpadding="0" border="0">
77   <tr>
78     <td>
79       &nbsp;
80     </td>
81     <td>
82
83 <p>
84 Extend an Extensible class. 
85 <p>
86 <dl compact><dt><b>Parameters:</b></dt><dd>
87   <table border="0" cellspacing="2" cellpadding="0">
88     <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key parameter is an arbitary string which identifies the extension data </td></tr>
89     <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>This parameter is a pointer to any data you wish to associate with the object</td></tr>
90   </table>
91 </dl>
92 You must provide a key to store the data as, and a void* to the data (typedef VoidPointer) The data will be inserted into the map. If the data already exists, you may not insert it twice, <a class="el" href="classExtensible.html#Extend_28std_3A_3Astring_20key_2C_20char_20_2Ap_29">Extensible::Extend</a> will return false in this case.<p>
93 <dl compact><dt><b>Returns:</b></dt><dd>Returns true on success, false if otherwise</dd></dl>
94     </td>
95   </tr>
96 </table>
97 <a class="anchor" name="GetExt_28std_3A_3Astring_20key_29"></a><!-- doxytag: member="Extensible::GetExt" ref="GetExt_28std_3A_3Astring_20key_29" args="(std::string key)" --><p>
98 <table class="mdTable" cellpadding="2" cellspacing="0">
99   <tr>
100     <td class="mdRow">
101       <table cellpadding="0" cellspacing="0" border="0">
102         <tr>
103           <td class="md" nowrap valign="top">char* Extensible::GetExt           </td>
104           <td class="md" valign="top">(&nbsp;</td>
105           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
106           <td class="mdname1" valign="top" nowrap> <em>key</em>          </td>
107           <td class="md" valign="top">&nbsp;)&nbsp;</td>
108           <td class="md" nowrap></td>
109         </tr>
110       </table>
111     </td>
112   </tr>
113 </table>
114 <table cellspacing="5" cellpadding="0" border="0">
115   <tr>
116     <td>
117       &nbsp;
118     </td>
119     <td>
120
121 <p>
122 Get an extension item. 
123 <p>
124 <dl compact><dt><b>Parameters:</b></dt><dd>
125   <table border="0" cellspacing="2" cellpadding="0">
126     <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key parameter is an arbitary string which identifies the extension data</td></tr>
127   </table>
128 </dl>
129 <dl compact><dt><b>Returns:</b></dt><dd>If you provide a non-existent key name, the function returns NULL, otherwise a pointer to the item referenced by the key is returned.</dd></dl>
130     </td>
131   </tr>
132 </table>
133 <a class="anchor" name="Shrink_28std_3A_3Astring_20key_29"></a><!-- doxytag: member="Extensible::Shrink" ref="Shrink_28std_3A_3Astring_20key_29" args="(std::string key)" --><p>
134 <table class="mdTable" cellpadding="2" cellspacing="0">
135   <tr>
136     <td class="mdRow">
137       <table cellpadding="0" cellspacing="0" border="0">
138         <tr>
139           <td class="md" nowrap valign="top">bool Extensible::Shrink           </td>
140           <td class="md" valign="top">(&nbsp;</td>
141           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
142           <td class="mdname1" valign="top" nowrap> <em>key</em>          </td>
143           <td class="md" valign="top">&nbsp;)&nbsp;</td>
144           <td class="md" nowrap></td>
145         </tr>
146       </table>
147     </td>
148   </tr>
149 </table>
150 <table cellspacing="5" cellpadding="0" border="0">
151   <tr>
152     <td>
153       &nbsp;
154     </td>
155     <td>
156
157 <p>
158 Shrink an Extensible class. 
159 <p>
160 <dl compact><dt><b>Parameters:</b></dt><dd>
161   <table border="0" cellspacing="2" cellpadding="0">
162     <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>The key parameter is an arbitary string which identifies the extension data</td></tr>
163   </table>
164 </dl>
165 You must provide a key name. The given key name will be removed from the classes data. If you provide a nonexistent key (case is important) then the function will return false.<p>
166 <dl compact><dt><b>Returns:</b></dt><dd>Returns true on success.</dd></dl>
167     </td>
168   </tr>
169 </table>
170 <hr><h2>Member Data Documentation</h2>
171 <a class="anchor" name="Extension_5FItems"></a><!-- doxytag: member="Extensible::Extension_Items" ref="Extension_5FItems" args="" --><p>
172 <table class="mdTable" cellpadding="2" cellspacing="0">
173   <tr>
174     <td class="mdRow">
175       <table cellpadding="0" cellspacing="0" border="0">
176         <tr>
177           <td class="md" nowrap valign="top">std::map&lt;<a class="el" href="namespaceirc.html#string">std::string</a>,char*&gt; <a class="el" href="classExtensible.html#Extension_5FItems">Extensible::Extension_Items</a><code> [private]</code>          </td>
178         </tr>
179       </table>
180     </td>
181   </tr>
182 </table>
183 <table cellspacing="5" cellpadding="0" border="0">
184   <tr>
185     <td>
186       &nbsp;
187     </td>
188     <td>
189
190 <p>
191 Private data store. 
192 <p>
193
194 <p>
195 Definition at line <a class="el" href="base_8h-source.html#l00054">54</a> of file <a class="el" href="base_8h-source.html">base.h</a>.    </td>
196   </tr>
197 </table>
198 <hr>The documentation for this class was generated from the following file:<ul>
199 <li><a class="el" href="base_8h-source.html">base.h</a></ul>
200 <hr size="1"><address style="align: right;"><small>Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by&nbsp;
201 <a href="http://www.doxygen.org/index.html">
202 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
203 </body>
204 </html>