diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-01-18 10:40:33 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-01-18 10:40:33 +0100 |
commit | 4fc2f7199e964ba5112ecdb2613c6fd5c2eee638 (patch) | |
tree | bf2469f00fd4dfeaa07c0ab431a9663952cf17b7 /src/base.cpp | |
parent | 4b6f7d789333dd9fd3b08f8742a68c0f9c6c2254 (diff) |
Specify which Extensible subclass an ExtensionItem is valid for
Diffstat (limited to 'src/base.cpp')
-rw-r--r-- | src/base.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/base.cpp b/src/base.cpp index c131f4dae..0441217d1 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -89,7 +89,9 @@ ServiceProvider::~ServiceProvider() { } -ExtensionItem::ExtensionItem(const std::string& Key, Module* mod) : ServiceProvider(mod, Key, SERVICE_METADATA) +ExtensionItem::ExtensionItem(const std::string& Key, ExtensibleType exttype, Module* mod) + : ServiceProvider(mod, Key, SERVICE_METADATA) + , type(exttype) { } @@ -201,7 +203,8 @@ Extensible::~Extensible() ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Extensible destructor called without cull @%p", (void*)this); } -LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod) +LocalExtItem::LocalExtItem(const std::string& Key, ExtensibleType exttype, Module* mod) + : ExtensionItem(Key, exttype, mod) { } @@ -218,8 +221,10 @@ void LocalExtItem::unserialize(SerializeFormat format, Extensible* container, co { } -LocalStringExt::LocalStringExt(const std::string& Key, Module* Owner) - : SimpleExtItem<std::string>(Key, Owner) { } +LocalStringExt::LocalStringExt(const std::string& Key, ExtensibleType exttype, Module* Owner) + : SimpleExtItem<std::string>(Key, exttype, Owner) +{ +} LocalStringExt::~LocalStringExt() { @@ -232,7 +237,8 @@ std::string LocalStringExt::serialize(SerializeFormat format, const Extensible* return ""; } -LocalIntExt::LocalIntExt(const std::string& Key, Module* mod) : LocalExtItem(Key, mod) +LocalIntExt::LocalIntExt(const std::string& Key, ExtensibleType exttype, Module* mod) + : LocalExtItem(Key, exttype, mod) { } @@ -264,7 +270,8 @@ void LocalIntExt::free(void*) { } -StringExtItem::StringExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod) +StringExtItem::StringExtItem(const std::string& Key, ExtensibleType exttype, Module* mod) + : ExtensionItem(Key, exttype, mod) { } |