diff options
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/base.h b/include/base.h index b0e264bac..dbe4588e9 100644 --- a/include/base.h +++ b/include/base.h @@ -1,15 +1,17 @@ /* - - +Defines the base classes used by InspIRCd */ -#include "inspircd_config.h" -#include <time.h> - #ifndef __BASE_H__ #define __BASE_H__ +#include "inspircd_config.h" +#include <time.h> +#include <map> +#include <string> +typedef void* VoidPointer; + /** The base class for all inspircd classes */ class classbase @@ -26,5 +28,19 @@ class classbase ~classbase() { } }; +/** class Extensible is the parent class of many classes such as userrec and chanrec. + * 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). + */ +class Extensible : public classbase +{ + /** Private data store + */ + std::map<std::string,VoidPointer> Extension_Items; +}; + #endif |