]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classExtensible.html
Re-added the dot graphs again
[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>InspIRCd: Extensible class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
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">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Extensible Class Reference</h1>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="8,157,77,184" alt="">
16 <area href="classcommand__t.html" shape="rect" coords="101,157,192,184" alt="">
17 <area href="classconnection.html" shape="rect" coords="216,157,301,184" alt="">
18 <area href="classircd__connector.html" shape="rect" coords="325,157,434,184" alt="">
19 <area href="classclassbase.html" shape="rect" coords="162,8,242,34" alt="">
20 <area href="classserverrec.html" shape="rect" coords="172,232,249,258" alt="">
21 <area href="classuserrec.html" shape="rect" coords="273,232,340,258" alt="">
22 </map>
23 <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>
24 <map name="Extensible__coll__map">
25 <area href="classclassbase.html" shape="rect" coords="7,98,87,125" alt="">
26 </map>
27 <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>
28 <tr><td></td></tr>
29 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classExtensible.html#a0">Extend</a> (std::string key, char *p)</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extend an Extensible class. </em> <a href="#a0"></a><em><br><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classExtensible.html#a1">Shrink</a> (std::string key)</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shrink an Extensible class. </em> <a href="#a1"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classExtensible.html#a2">GetExt</a> (std::string key)</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an extension item. </em> <a href="#a2"></a><em><br><br></td></tr>
39 <tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
40 <tr><td class="memItemLeft" nowrap align=right valign=top>std::map&lt; std::string, char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classExtensible.html#r0">Extension_Items</a></td></tr>
41
42 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Private data store. </em> <a href="#r0"></a><em><br><br></td></tr>
43 </table>
44 <hr><a name="_details"></a><h2>Detailed Description</h2>
45 class Extensible is the parent class of many classes such as userrec and chanrec. 
46 <p>
47 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). 
48 <p>
49
50 <p>
51 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>
52 <a name="a0" doxytag="Extensible::Extend"></a><p>
53 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
54   <tr>
55     <td class="mdRow">
56       <table cellpadding="0" cellspacing="0" border="0">
57         <tr>
58           <td class="md" nowrap valign="top"> bool Extensible::Extend </td>
59           <td class="md" valign="top">(&nbsp;</td>
60           <td class="md" nowrap valign="top">std::string&nbsp;</td>
61           <td class="mdname" nowrap> <em>key</em>, </td>
62         </tr>
63         <tr>
64           <td></td>
65           <td></td>
66           <td class="md" nowrap>char *&nbsp;</td>
67           <td class="mdname" nowrap> <em>p</em></td>
68         </tr>
69         <tr>
70           <td></td>
71           <td class="md">)&nbsp;</td>
72           <td class="md" colspan="2"></td>
73         </tr>
74
75       </table>
76     </td>
77   </tr>
78 </table>
79 <table cellspacing=5 cellpadding=0 border=0>
80   <tr>
81     <td>
82       &nbsp;
83     </td>
84     <td>
85
86 <p>
87 Extend an Extensible class. 
88 <p>
89 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>
90   </tr>
91 </table>
92 <a name="a2" doxytag="Extensible::GetExt"></a><p>
93 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
94   <tr>
95     <td class="mdRow">
96       <table cellpadding="0" cellspacing="0" border="0">
97         <tr>
98           <td class="md" nowrap valign="top"> char* Extensible::GetExt </td>
99           <td class="md" valign="top">(&nbsp;</td>
100           <td class="md" nowrap valign="top">std::string&nbsp;</td>
101           <td class="mdname1" valign="top" nowrap> <em>key</em>          </td>
102           <td class="md" valign="top">&nbsp;)&nbsp;</td>
103           <td class="md" nowrap></td>
104         </tr>
105
106       </table>
107     </td>
108   </tr>
109 </table>
110 <table cellspacing=5 cellpadding=0 border=0>
111   <tr>
112     <td>
113       &nbsp;
114     </td>
115     <td>
116
117 <p>
118 Get an extension item. 
119 <p>
120 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>
121   </tr>
122 </table>
123 <a name="a1" doxytag="Extensible::Shrink"></a><p>
124 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
125   <tr>
126     <td class="mdRow">
127       <table cellpadding="0" cellspacing="0" border="0">
128         <tr>
129           <td class="md" nowrap valign="top"> bool Extensible::Shrink </td>
130           <td class="md" valign="top">(&nbsp;</td>
131           <td class="md" nowrap valign="top">std::string&nbsp;</td>
132           <td class="mdname1" valign="top" nowrap> <em>key</em>          </td>
133           <td class="md" valign="top">&nbsp;)&nbsp;</td>
134           <td class="md" nowrap></td>
135         </tr>
136
137       </table>
138     </td>
139   </tr>
140 </table>
141 <table cellspacing=5 cellpadding=0 border=0>
142   <tr>
143     <td>
144       &nbsp;
145     </td>
146     <td>
147
148 <p>
149 Shrink an Extensible class. 
150 <p>
151 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>
152   </tr>
153 </table>
154 <hr><h2>Member Data Documentation</h2>
155 <a name="r0" doxytag="Extensible::Extension_Items"></a><p>
156 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
157   <tr>
158     <td class="mdRow">
159       <table cellpadding="0" cellspacing="0" border="0">
160         <tr>
161           <td class="md" nowrap valign="top"> std::map&lt;std::string,char*&gt; <a class="el" href="classExtensible.html#r0">Extensible::Extension_Items</a><code> [private]</code>
162       </table>
163     </td>
164   </tr>
165 </table>
166 <table cellspacing=5 cellpadding=0 border=0>
167   <tr>
168     <td>
169       &nbsp;
170     </td>
171     <td>
172
173 <p>
174 Private data store. 
175 <p>
176
177 <p>
178 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>
179   </tr>
180 </table>
181 <hr>The documentation for this class was generated from the following file:<ul>
182 <li><a class="el" href="base_8h-source.html">base.h</a></ul>
183 <hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:41 2005 for InspIRCd by
184 <a href="http://www.doxygen.org/index.html">
185 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
186 </a>1.3.3 </small></address>
187 </body>
188 </html>