summaryrefslogtreecommitdiff
path: root/include/hashcomp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r--include/hashcomp.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 11a491d62..4a5dd72ad 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -358,6 +358,26 @@ namespace irc
long GetToken();
};
+ typedef std::pair<size_t, unsigned char> bitfield;
+
+ class dynamicbitmask : public classbase
+ {
+ private:
+ unsigned char* bits;
+ unsigned char* freebits;
+ size_t bits_size;
+ public:
+ dynamicbitmask();
+
+ ~dynamicbitmask();
+
+ bitfield Allocate();
+
+ bool Deallocate(bitfield &pos);
+
+ void Toggle(bitfield &pos, bool state);
+ };
+
/** The irc_char_traits class is used for RFC-style comparison of strings.
* This class is used to implement irc::string, a case-insensitive, RFC-
* comparing string class.