]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Allow confpath to be a file name in the current directory
[user/henk/code/inspircd.git] / src / base.cpp
index 27eb4af23be1b517f56ba995570005ea5bfaeb33..9307928540639b721cda966221dac65cdd06cb27 100644 (file)
@@ -26,60 +26,33 @@ classbase::classbase()
 {
 }
 
-void BoolSet::Set(int number)
+bool classbase::cull()
 {
-       this->bits |= bitfields[number];
-}
-
-void BoolSet::Unset(int number)
-{
-       this->bits &= inverted_bitfields[number];
-}
-
-void BoolSet::Invert(int number)
-{
-       this->bits ^= bitfields[number];
-}
-
-bool BoolSet::Get(int number)
-{
-       return ((this->bits | bitfields[number]) > 0);
-}
-
-bool BoolSet::operator==(BoolSet other)
-{
-       return (this->bits == other.bits);
+       return true;
 }
 
-BoolSet BoolSet::operator|(BoolSet other)
+classbase::~classbase()
 {
-       BoolSet x(this->bits | other.bits);
-       return x;
 }
 
-BoolSet BoolSet::operator&(BoolSet other)
+refcountbase::refcountbase() : refcount(0)
 {
-       BoolSet x(this->bits & other.bits);
-       return x;
 }
 
-BoolSet::BoolSet()
+bool refcountbase::cull()
 {
-       this->bits = 0;
+       return (refcount == 0);
 }
 
-BoolSet::BoolSet(char bitmask)
+refcountbase::~refcountbase()
 {
-       this->bits = bitmask;
 }
 
-bool BoolSet::operator=(BoolSet other)
+ExtensionItem::ExtensionItem(const std::string& Key, Module* mod) : key(Key), owner(mod)
 {
-       this->bits = other.bits;
-       return true;
 }
 
-ExtensionItem::ExtensionItem(const std::string& Key, Module* mod) : key(Key), owner(mod)
+ExtensionItem::~ExtensionItem()
 {
 }
 
@@ -167,6 +140,10 @@ LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(
 {
 }
 
+LocalExtItem::~LocalExtItem()
+{
+}
+
 std::string LocalExtItem::serialize(SerializeFormat format, const Extensible* container, void* item)
 {
        return "";
@@ -179,6 +156,10 @@ void LocalExtItem::unserialize(SerializeFormat format, Extensible* container, co
 LocalStringExt::LocalStringExt(const std::string& Key, Module* Owner)
        : SimpleExtItem<std::string>(Key, Owner) { }
 
+LocalStringExt::~LocalStringExt()
+{
+}
+
 std::string LocalStringExt::serialize(SerializeFormat format, const Extensible* container, void* item)
 {
        if (item && format == FORMAT_USER)
@@ -190,6 +171,10 @@ LocalIntExt::LocalIntExt(const std::string& Key, Module* mod) : LocalExtItem(Key
 {
 }
 
+LocalIntExt::~LocalIntExt()
+{
+}
+
 std::string LocalIntExt::serialize(SerializeFormat format, const Extensible* container, void* item)
 {
        if (format != FORMAT_USER)
@@ -218,6 +203,10 @@ StringExtItem::StringExtItem(const std::string& Key, Module* mod) : ExtensionIte
 {
 }
 
+StringExtItem::~StringExtItem()
+{
+}
+
 std::string* StringExtItem::get(const Extensible* container)
 {
        return static_cast<std::string*>(get_raw(container));