diff options
author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
tree | e145e04fa3d041cf92ce46da4ac790b63231059c /include/extensible.h | |
parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) |
Reworked live SQL support yet again
Diffstat (limited to 'include/extensible.h')
-rw-r--r-- | include/extensible.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/extensible.h b/include/extensible.h index 1416e1983..e0281c197 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -17,12 +17,6 @@ class CoreExport ExtensibleItem virtual void OnDelete(); }; -class ExtensibleString : public Anope::string, public ExtensibleItem -{ - public: - ExtensibleString(const Anope::string &s) : Anope::string(s), ExtensibleItem() { } -}; - class CoreExport Extensible { private: @@ -92,9 +86,9 @@ class CoreExport Extensible * @param key The key parameter is an arbitary string which identifies the extension data * @return The item found */ - template<typename T> T GetExt(const Anope::string &key) + template<typename T> T GetExt(const Anope::string &key) const { - extensible_map::iterator it = this->extension_items.find(key); + extensible_map::const_iterator it = this->extension_items.find(key); if (it != this->extension_items.end()) return debug_cast<T>(it->second); @@ -106,7 +100,7 @@ class CoreExport Extensible * @param key The key parameter is an arbitary string which identifies the extension data * @return True if the item was found. */ - bool HasExt(const Anope::string &key) + bool HasExt(const Anope::string &key) const { return this->extension_items.count(key) > 0; } @@ -116,9 +110,9 @@ class CoreExport Extensible * @return This function writes a list of all extension items stored * in this object by name into the given deque and returns void. */ - void GetExtList(std::deque<Anope::string> &list) + void GetExtList(std::deque<Anope::string> &list) const { - for (extensible_map::iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it) + for (extensible_map::const_iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it) list.push_back(it->first); } }; |