diff options
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 25a53fefe..6cc1a3450 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -641,6 +641,19 @@ modulelist* ModuleManager::FindInterface(const std::string &InterfaceName) return &(iter->second.second); } +bool ModuleManager::ModuleHasInterface(Module* mod, const std::string& InterfaceName) +{ + interfacelist::iterator iter = Interfaces.find(InterfaceName); + if (iter == Interfaces.end()) + return false; + else + { + modulelist& ml = iter->second.second; + modulelist::iterator mi = std::find(ml.begin(), ml.end(), mod); + return (mi != ml.end()); + } +} + void ModuleManager::UseInterface(const std::string &InterfaceName) { interfacelist::iterator iter = Interfaces.find(InterfaceName); |