MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / findLoadedModule

Method findLoadedModule

engine/source/module/moduleManager.cc:1010–1029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008//-----------------------------------------------------------------------------
1009
1010ModuleDefinition* 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

Callers

nothing calls this directly

Calls 4

getModuleIdMethod · 0.80
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected