Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

base.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
00006  *                       E-mail:
00007  *                <brain@chatspike.net>
00008  *                <Craig@chatspike.net>
00009  *     
00010  * Written by Craig Edwards, Craig McLure, and others.
00011  * This program is free but copyrighted software; see
00012  *            the file COPYING for details.
00013  *
00014  * ---------------------------------------------------
00015  */
00016 
00017 #ifndef __BASE_H__ 
00018 #define __BASE_H__ 
00019 
00020 #include "inspircd_config.h" 
00021 #include <time.h>
00022 #include <map>
00023 #include <deque>
00024 #include <string>
00025 
00026 typedef void* VoidPointer;
00027  
00030 class classbase
00031 {
00032  public:
00035         time_t age;
00036 
00040         classbase() { age = time(NULL); }
00041         ~classbase() { }
00042 };
00043 
00051 class Extensible : public classbase
00052 {
00055         std::map<std::string,char*> Extension_Items;
00056         
00057 public:
00058 
00070         bool Extend(std::string key, char* p);
00071 
00081         bool Shrink(std::string key);
00082         
00089         char* GetExt(std::string key);
00090 
00097         void GetExtList(std::deque<std::string> &list);
00098 };
00099 
00104 class BoolSet
00105 {
00106         char bits;
00107 
00108  public:
00109 
00112         BoolSet();
00113 
00116         BoolSet(char bitmask);
00117 
00122         void Set(int number);
00123 
00130         bool Get(int number);
00131 
00136         void Unset(int number);
00137 
00142         void Invert(int number);
00143 
00146         bool operator==(BoolSet other);
00147 
00150         BoolSet operator|(BoolSet other);
00151         
00154         BoolSet operator&(BoolSet other);
00155 
00158         bool operator=(BoolSet other);
00159 };
00160 
00161 
00162 #endif
00163 

Generated on Wed Dec 14 15:55:46 2005 for InspIRCd by  doxygen 1.4.4-20050815