]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classExtensible.html
Added extra docs to cover OnUserSync etc
[user/henk/code/inspircd.git] / docs / module-doc / classExtensible.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>Extensible class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc3 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9 <hr><h1>Extensible Class Reference</h1>class Extensible is the parent class of many classes such as userrec and chanrec. 
10 <a href="#_details">More...</a>
11 <p>
12 <code>#include &lt;<a class="el" href="base_8h-source.html">base.h</a>&gt;</code>
13 <p>
14 Inheritance diagram for Extensible:<p><center><img src="classExtensible__inherit__graph.gif" border="0" usemap="#Extensible__inherit__map" alt="Inheritance graph"></center>
15 <map name="Extensible__inherit__map">
16 <area href="classchanrec.html" shape="rect" coords="7,155,65,176" alt="">
17 <area href="classcommand__t.html" shape="rect" coords="89,155,167,176" alt="">
18 <area href="classconnection.html" shape="rect" coords="191,155,260,176" alt="">
19 <area href="classircd__connector.html" shape="rect" coords="284,155,380,176" alt="">
20 <area href="classclassbase.html" shape="rect" coords="143,16,209,38" alt="">
21 <area href="classserverrec.html" shape="rect" coords="149,224,216,246" alt="">
22 <area href="classuserrec.html" shape="rect" coords="240,224,296,246" alt="">
23 </map>
24 <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>
25 <map name="Extensible__coll__map">
26 <area href="classclassbase.html" shape="rect" coords="7,107,73,128" alt="">
27 </map>
28 <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>
29 <tr><td></td></tr>
30 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
31 <tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classExtensible.html#a0">Extend</a> (std::string key, char *p)</td></tr>
32 <tr><td>&nbsp;</td><td><font size=-1><em>Extend an Extensible class.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
33 <tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classExtensible.html#a1">Shrink</a> (std::string key)</td></tr>
34 <tr><td>&nbsp;</td><td><font size=-1><em>Shrink an Extensible class.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
35 <tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="classExtensible.html#a2">GetExt</a> (std::string key)</td></tr>
36 <tr><td>&nbsp;</td><td><font size=-1><em>Get an extension item.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
37 <tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
38 <tr><td nowrap align=right valign=top>std::map&lt; std::string, char * &gt;&nbsp;</td><td valign=bottom><a class="el" href="classExtensible.html#o0">Extension_Items</a></td></tr>
39 <tr><td>&nbsp;</td><td><font size=-1><em>Private data store.</em> <a href="#o0"></a><em></em></font><br><br></td></tr>
40 </table>
41 <hr><a name="_details"></a><h2>Detailed Description</h2>
42 class Extensible is the parent class of many classes such as userrec and chanrec.
43 <p>
44 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). 
45 <p>
46
47 <p>
48 Definition at line <a class="el" href="base_8h-source.html#l00038">38</a> of file <a class="el" href="base_8h-source.html">base.h</a>.<hr><h2>Member Function Documentation</h2>
49 <a name="a0" doxytag="Extensible::Extend"></a><p>
50 <table width="100%" cellpadding="2" cellspacing="0" border="0">
51   <tr>
52     <td class="md">
53       <table cellpadding="0" cellspacing="0" border="0">
54         <tr>
55           <td class="md" nowrap valign="top"> bool Extensible::Extend </td>
56           <td class="md" valign="top">(&nbsp;</td>
57           <td class="md" nowrap valign="top">std::string&nbsp;</td>
58           <td class="mdname" nowrap>&nbsp; <em>key</em>, </td>
59         </tr>
60         <tr>
61           <td></td>
62           <td></td>
63           <td class="md" nowrap>char *&nbsp;</td>
64           <td class="mdname" nowrap>&nbsp; <em>p</em></td>
65         </tr>
66         <tr>
67           <td></td>
68           <td class="md">)&nbsp;</td>
69           <td class="md" colspan="2"></td>
70         </tr>
71
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 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#a0">Extensible::Extend</a> will return false in this case. On successful extension, Extend returns true.    </td>
87   </tr>
88 </table>
89 <a name="a2" doxytag="Extensible::GetExt"></a><p>
90 <table width="100%" cellpadding="2" cellspacing="0" border="0">
91   <tr>
92     <td class="md">
93       <table cellpadding="0" cellspacing="0" border="0">
94         <tr>
95           <td class="md" nowrap valign="top"> char* Extensible::GetExt </td>
96           <td class="md" valign="top">(&nbsp;</td>
97           <td class="md" nowrap valign="top">std::string&nbsp;</td>
98           <td class="mdname1" valign="top" nowrap>&nbsp; <em>key</em>          </td>
99           <td class="md" valign="top">)&nbsp;</td>
100           <td class="md" nowrap></td>
101         </tr>
102
103       </table>
104     </td>
105   </tr>
106 </table>
107 <table cellspacing=5 cellpadding=0 border=0>
108   <tr>
109     <td>
110       &nbsp;
111     </td>
112     <td>
113
114 <p>
115 Get an extension item.
116 <p>
117 You must provide a key name, which is case sensitive. If you provide a non-existent key name, the function returns NULL, otherwise a pointer to the item referenced by the key is returned.    </td>
118   </tr>
119 </table>
120 <a name="a1" doxytag="Extensible::Shrink"></a><p>
121 <table width="100%" cellpadding="2" cellspacing="0" border="0">
122   <tr>
123     <td class="md">
124       <table cellpadding="0" cellspacing="0" border="0">
125         <tr>
126           <td class="md" nowrap valign="top"> bool Extensible::Shrink </td>
127           <td class="md" valign="top">(&nbsp;</td>
128           <td class="md" nowrap valign="top">std::string&nbsp;</td>
129           <td class="mdname1" valign="top" nowrap>&nbsp; <em>key</em>          </td>
130           <td class="md" valign="top">)&nbsp;</td>
131           <td class="md" nowrap></td>
132         </tr>
133
134       </table>
135     </td>
136   </tr>
137 </table>
138 <table cellspacing=5 cellpadding=0 border=0>
139   <tr>
140     <td>
141       &nbsp;
142     </td>
143     <td>
144
145 <p>
146 Shrink an Extensible class.
147 <p>
148 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. Returns true on success.    </td>
149   </tr>
150 </table>
151 <hr><h2>Member Data Documentation</h2>
152 <a name="o0" doxytag="Extensible::Extension_Items"></a><p>
153 <table width="100%" cellpadding="2" cellspacing="0" border="0">
154   <tr>
155     <td class="md">
156       <table cellpadding="0" cellspacing="0" border="0">
157         <tr>
158           <td class="md" nowrap valign="top"> std::map&lt;std::string,char*&gt; Extensible::Extension_Items<code> [private]</code>
159       </table>
160     </td>
161   </tr>
162 </table>
163 <table cellspacing=5 cellpadding=0 border=0>
164   <tr>
165     <td>
166       &nbsp;
167     </td>
168     <td>
169
170 <p>
171 Private data store.
172 <p>
173
174 <p>
175 Definition at line <a class="el" href="base_8h-source.html#l00042">42</a> of file <a class="el" href="base_8h-source.html">base.h</a>.    </td>
176   </tr>
177 </table>
178 <hr>The documentation for this class was generated from the following file:<ul>
179 <li><a class="el" href="base_8h-source.html">base.h</a></ul>
180 <hr><address style="align: right;"><small>Generated on Sat May 1 17:50:25 2004 for InspIRCd by
181 <a href="http://www.doxygen.org/index.html">
182 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
183 width=110 height=53></a>1.3-rc3 </small></address>
184 </body>
185 </html>