MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / dumpDeclaredAssets

Method dumpDeclaredAssets

Engine/source/assets/assetManager.cpp:1581–1624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579//-----------------------------------------------------------------------------
1580
1581void AssetManager::dumpDeclaredAssets( void ) const
1582{
1583 Vector<const AssetDefinition*> assetDefinitions;
1584
1585 // Iterate asset definitions.
1586 for( typeDeclaredAssetsHash::const_iterator assetItr = mDeclaredAssets.begin(); assetItr != mDeclaredAssets.end(); ++assetItr )
1587 {
1588 assetDefinitions.push_back( assetItr->value );
1589 }
1590
1591 // Sort asset definitions.
1592 dQsort( assetDefinitions.address(), assetDefinitions.size(), sizeof(const AssetDefinition*), descendingAssetDefinitionLoadCount );
1593
1594 // Info.
1595 Con::printSeparator();
1596 Con::printf( "Asset Manager: %d declared asset(s) dump as follows:", mDeclaredAssets.size() );
1597 Con::printBlankLine();
1598
1599 // Iterate sorted asset definitions.
1600 for ( Vector<const AssetDefinition*>::iterator assetItr = assetDefinitions.begin(); assetItr != assetDefinitions.end(); ++assetItr )
1601 {
1602 // Fetch asset definition.
1603 const AssetDefinition* pAssetDefinition = *assetItr;
1604
1605 // Info.
1606 Con::printf( "AssetId:'%s', RefCount:%d, LoadCount:%d, UnloadCount:%d, AutoUnload:%d, Loaded:%d, Internal:%d, Private: %d, Type:'%s', Module/Version:'%s'/'%d', File:'%s'",
1607 pAssetDefinition->mAssetId,
1608 pAssetDefinition->mpAssetBase == NULL ? 0 : pAssetDefinition->mpAssetBase->getAcquiredReferenceCount(),
1609 pAssetDefinition->mAssetLoadedCount,
1610 pAssetDefinition->mAssetUnloadedCount,
1611 pAssetDefinition->mAssetAutoUnload,
1612 pAssetDefinition->mpAssetBase != NULL,
1613 pAssetDefinition->mAssetInternal,
1614 pAssetDefinition->mAssetPrivate,
1615 pAssetDefinition->mAssetType,
1616 pAssetDefinition->mpModuleDefinition->getModuleId(),
1617 pAssetDefinition->mpModuleDefinition->getVersionId(),
1618 pAssetDefinition->mAssetBaseFilePath );
1619 }
1620
1621 // Info.
1622 Con::printSeparator();
1623 Con::printBlankLine();
1624}
1625
1626//-----------------------------------------------------------------------------
1627

Callers 1

Calls 12

dQsortFunction · 0.85
printSeparatorFunction · 0.85
printfFunction · 0.85
printBlankLineFunction · 0.85
getModuleIdMethod · 0.80
getVersionIdMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
addressMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected