]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/Extensible.3
Re-added the dot graphs again
[user/henk/code/inspircd.git] / docs / man / man3 / Extensible.3
1 .TH "Extensible" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Extensible \- class Extensible is the parent class of many classes such as userrec and chanrec.  
6
7 .PP
8 .SH SYNOPSIS
9 .br
10 .PP
11 \fC#include <base.h>\fP
12 .PP
13 Inherits \fBclassbase\fP.
14 .PP
15 Inherited by \fBchanrec\fP, \fBcommand_t\fP, \fBconnection\fP, and \fBircd_connector\fP.
16 .PP
17 .SS "Public Member Functions"
18
19 .in +1c
20 .ti -1c
21 .RI "bool \fBExtend\fP (std::string key, char *p)"
22 .br
23 .RI "\fIExtend an Extensible class. \fP"
24 .ti -1c
25 .RI "bool \fBShrink\fP (std::string key)"
26 .br
27 .RI "\fIShrink an Extensible class. \fP"
28 .ti -1c
29 .RI "char * \fBGetExt\fP (std::string key)"
30 .br
31 .RI "\fIGet an extension item. \fP"
32 .in -1c
33 .SS "Private Attributes"
34
35 .in +1c
36 .ti -1c
37 .RI "std::map< std::string, char * > \fBExtension_Items\fP"
38 .br
39 .RI "\fIPrivate data store. \fP"
40 .in -1c
41 .SH "Detailed Description"
42 .PP 
43 class Extensible is the parent class of many classes such as userrec and chanrec. 
44
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 .PP
47 Definition at line 50 of file base.h.
48 .SH "Member Function Documentation"
49 .PP 
50 .SS "bool Extensible::Extend (std::string key, char * p)"
51 .PP
52 Extend an Extensible class. 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, \fBExtensible::Extend\fP will return false in this case. On successful extension, Extend returns true.
53 .SS "char* Extensible::GetExt (std::string key)"
54 .PP
55 Get an extension item. 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.
56 .SS "bool Extensible::Shrink (std::string key)"
57 .PP
58 Shrink an Extensible class. 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.
59 .SH "Member Data Documentation"
60 .PP 
61 .SS "std::map<std::string,char*> \fBExtensible::Extension_Items\fP\fC [private]\fP"
62 .PP
63 Private data store. Definition at line 54 of file base.h.
64
65 .SH "Author"
66 .PP 
67 Generated automatically by Doxygen for InspIRCd from the source code.