From ad9950c7e5252e994984bc4d00079e48c3bed685 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Jun 2007 14:10:34 +0000 Subject: Extra comments git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7368 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/base.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'include/base.h') diff --git a/include/base.h b/include/base.h index 2259953b8..ba8184c3c 100644 --- a/include/base.h +++ b/include/base.h @@ -20,12 +20,19 @@ #include #include +/** Do we use this? -- Brain */ typedef void* VoidPointer; + +/** A private data store for an Extensible class */ typedef std::map ExtensibleStore; +/** Needed */ class InspIRCd; -/** The base class for all inspircd classes +/** The base class for all inspircd classes. + * Wherever possible, all classes you create should inherit from this, + * giving them the ability to be passed to various core functions + * as 'anonymous' classes. */ class CoreExport classbase { @@ -34,10 +41,14 @@ class CoreExport classbase */ time_t age; - /** Constructor, + /** Constructor. * Sets the object's time */ classbase(); + + /** Destructor. + * Does sweet FA. + */ ~classbase() { } }; @@ -50,7 +61,8 @@ class CoreExport classbase */ class CoreExport Extensible : public classbase { - /** Private data store + /** Private data store. + * Holds all extensible metadata for the class. */ ExtensibleStore Extension_Items; @@ -115,15 +127,15 @@ public: */ template bool GetExt(const std::string &key, T* &p) { - ExtensibleStore::iterator iter = this->Extension_Items.find(key); + ExtensibleStore::iterator iter = this->Extension_Items.find(key); /* Find the item */ if(iter != this->Extension_Items.end()) { - p = (T*)iter->second; + p = (T*)iter->second; /* Item found */ return true; } else { - p = NULL; + p = NULL; /* Item not found */ return false; } } @@ -155,6 +167,7 @@ public: */ class CoreExport BoolSet : public classbase { + /** Actual bit values */ char bits; public: @@ -212,3 +225,4 @@ class CoreExport BoolSet : public classbase #endif + -- cgit v1.2.3