| 1008 | //----------------------------------------------------------------------------- |
| 1009 | |
| 1010 | ModuleDefinition* ModuleManager::findLoadedModule( const char* pModuleId ) |
| 1011 | { |
| 1012 | // Sanity! |
| 1013 | AssertFatal( pModuleId != NULL, "Cannot find module with NULL module Id." ); |
| 1014 | |
| 1015 | // Fetch module Id. |
| 1016 | StringTableEntry moduleId = StringTable->insert( pModuleId ); |
| 1017 | |
| 1018 | // Iterate loaded modules. |
| 1019 | for ( typeModuleLoadEntryVector::iterator loadedModuleItr = mModulesLoaded.begin(); loadedModuleItr != mModulesLoaded.end(); ++loadedModuleItr ) |
| 1020 | { |
| 1021 | // Skip if not the module. |
| 1022 | if ( loadedModuleItr->mpModuleDefinition->getModuleId() != moduleId ) |
| 1023 | continue; |
| 1024 | |
| 1025 | return loadedModuleItr->mpModuleDefinition; |
| 1026 | } |
| 1027 | |
| 1028 | return NULL; |
| 1029 | } |
| 1030 | |
| 1031 | //----------------------------------------------------------------------------- |
| 1032 |
nothing calls this directly
no test coverage detected