]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classExtensible.html
Added Module::OnAccessCheck
[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="classucrec.html" shape="rect" coords="404,155,449,176" alt="">
21 <area href="classclassbase.html" shape="rect" coords="192,16,259,38" alt="">
22 <area href="classserverrec.html" shape="rect" coords="149,224,216,246" alt="">
23 <area href="classuserrec.html" shape="rect" coords="240,224,296,246" alt="">
24 </map>
25 <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>
26 <map name="Extensible__coll__map">
27 <area href="classclassbase.html" shape="rect" coords="7,107,73,128" alt="">
28 </map>
29 <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>
30 <tr><td></td></tr>
31 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
32 <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>
33 <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>
34 <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>
35 <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>
36 <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>
37 <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>
38 <tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
39 <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>
40 <tr><td>&nbsp;</td><td><font size=-1><em>Private data store.</em> <a href="#o0"></a><em></em></font><br><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#l00038">38</a> of file <a class="el" href="base_8h-source.html">base.h</a>.<hr><h2>Member Function Documentation</h2>
50 <a name="a0" doxytag="Extensible::Extend"></a><p>
51 <table width="100%" cellpadding="2" cellspacing="0" border="0">
52   <tr>
53     <td class="md">
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">std::string&nbsp;</td>
59           <td class="mdname" nowrap>&nbsp; <em>key</em>, </td>
60         </tr>
61         <tr>
62           <td></td>
63           <td></td>
64           <td class="md" nowrap>char *&nbsp;</td>
65           <td class="mdname" nowrap>&nbsp; <em>p</em></td>
66         </tr>
67         <tr>
68           <td></td>
69           <td class="md">)&nbsp;</td>
70           <td class="md" colspan="2"></td>
71         </tr>
72
73       </table>
74     </td>
75   </tr>
76 </table>
77 <table cellspacing=5 cellpadding=0 border=0>
78   <tr>
79     <td>
80       &nbsp;
81     </td>
82     <td>
83
84 <p>
85 Extend an Extensible class.
86 <p>
87 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>
88   </tr>
89 </table>
90 <a name="a2" doxytag="Extensible::GetExt"></a><p>
91 <table width="100%" cellpadding="2" cellspacing="0" border="0">
92   <tr>
93     <td class="md">
94       <table cellpadding="0" cellspacing="0" border="0">
95         <tr>
96           <td class="md" nowrap valign="top"> char* Extensible::GetExt </td>
97           <td class="md" valign="top">(&nbsp;</td>
98           <td class="md" nowrap valign="top">std::string&nbsp;</td>
99           <td class="mdname1" valign="top" nowrap>&nbsp; <em>key</em>          </td>
100           <td class="md" valign="top">)&nbsp;</td>
101           <td class="md" nowrap></td>
102         </tr>
103
104       </table>
105     </td>
106   </tr>
107 </table>
108 <table cellspacing=5 cellpadding=0 border=0>
109   <tr>
110     <td>
111       &nbsp;
112     </td>
113     <td>
114
115 <p>
116 Get an extension item.
117 <p>
118 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>
119   </tr>
120 </table>
121 <a name="a1" doxytag="Extensible::Shrink"></a><p>
122 <table width="100%" cellpadding="2" cellspacing="0" border="0">
123   <tr>
124     <td class="md">
125       <table cellpadding="0" cellspacing="0" border="0">
126         <tr>
127           <td class="md" nowrap valign="top"> bool Extensible::Shrink </td>
128           <td class="md" valign="top">(&nbsp;</td>
129           <td class="md" nowrap valign="top">std::string&nbsp;</td>
130           <td class="mdname1" valign="top" nowrap>&nbsp; <em>key</em>          </td>
131           <td class="md" valign="top">)&nbsp;</td>
132           <td class="md" nowrap></td>
133         </tr>
134
135       </table>
136     </td>
137   </tr>
138 </table>
139 <table cellspacing=5 cellpadding=0 border=0>
140   <tr>
141     <td>
142       &nbsp;
143     </td>
144     <td>
145
146 <p>
147 Shrink an Extensible class.
148 <p>
149 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>
150   </tr>
151 </table>
152 <hr><h2>Member Data Documentation</h2>
153 <a name="o0" doxytag="Extensible::Extension_Items"></a><p>
154 <table width="100%" cellpadding="2" cellspacing="0" border="0">
155   <tr>
156     <td class="md">
157       <table cellpadding="0" cellspacing="0" border="0">
158         <tr>
159           <td class="md" nowrap valign="top"> std::map&lt;std::string,char*&gt; Extensible::Extension_Items<code> [private]</code>
160       </table>
161     </td>
162   </tr>
163 </table>
164 <table cellspacing=5 cellpadding=0 border=0>
165   <tr>
166     <td>
167       &nbsp;
168     </td>
169     <td>
170
171 <p>
172 Private data store.
173 <p>
174
175 <p>
176 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>
177   </tr>
178 </table>
179 <hr>The documentation for this class was generated from the following file:<ul>
180 <li><a class="el" href="base_8h-source.html">base.h</a></ul>
181 <hr><address style="align: right;"><small>Generated on Sat May 1 13:39:16 2004 for InspIRCd by
182 <a href="http://www.doxygen.org/index.html">
183 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
184 width=110 height=53></a>1.3-rc3 </small></address>
185 </body>
186 </html>