AssetManager
Engine/source/assets/assetManager.h
Private Types
Parent
Public Types
typeAssetDependsOnHash
typeAssetId
typeAssetIsDependedOnHash
typeAssetName
HashMap< AssetPtrBase *, AssetPtrCallback * >
typeAssetPtrRefreshHash
typeDeclaredAssetsHash
typeReferencedAssetsHash
typeReferenceFilePath
Private Attributes
Asset dependencies.
Asset pointer refresh notifications.
Asset tags.
Declared assets.
bool
Miscellaneous.
bool
Referenced assets.
Public Functions
Total acquired asset references.
T *
acquireAsPrivateAsset(const char * pAssetId)
Private asset acquisition.
T *
acquireAsset(const char * pAssetId)
Public asset acquisition.
bool
addDeclaredAsset(ModuleDefinition * pModuleDefinition, const char * pAssetFilePath)
bool
addModuleDeclaredAssets(ModuleDefinition * pModuleDefinition)
Declared assets.
addPrivateAsset(AssetBase * pAssetBase)
bool
compileReferencedAssets(ModuleDefinition * pModuleDefinition)
Referenced assets.
Declare Console Object.
bool
deleteAsset(const char * pAssetId, const bool deleteLooseFiles, const bool deleteDependencies)
Asset deletion.
bool
doesAssetDependOn(const char * pAssetId, const char * pDependsOnAssetId)
findAllAssets(AssetQuery * pAssetQuery, const bool ignoreInternal, const bool ignorePrivate)
Asset queries.
findAssetAutoUnload(AssetQuery * pAssetQuery, const bool assetAutoUnload, const bool assetQueryAsSource)
findAssetCategory(AssetQuery * pAssetQuery, const char * pAssetCategory, const bool assetQueryAsSource)
findAssetDependsOn(AssetQuery * pAssetQuery, const char * pAssetId)
findAssetInternal(AssetQuery * pAssetQuery, const bool assetInternal, const bool assetQueryAsSource)
findAssetIsDependedOn(AssetQuery * pAssetQuery, const char * pAssetId)
findAssetLooseFile(AssetQuery * pAssetQuery, const char * pLooseFile, const bool assetQueryAsSource)
findAssetName(AssetQuery * pAssetQuery, const char * pAssetName, const bool partialName)
findAssetPrivate(AssetQuery * pAssetQuery, const bool assetPrivate, const bool assetQueryAsSource)
findAssetType(AssetQuery * pAssetQuery, const char * pAssetType, const bool assetQueryAsSource)
findInvalidAssetReferences(AssetQuery * pAssetQuery)
findTaggedAssets(AssetQuery * pAssetQuery, const char * pAssetTagNames, const bool assetQueryAsSource)
getAssetCategory(const char * pAssetId)
getAssetDescription(const char * pAssetId)
getAssetFilePath(const char * pAssetId)
getAssetModuleDefinition(const char * pAssetId)
getAssetName(const char * pAssetId)
getAssetPath(const char * pAssetId)
getAssetType(const char * pAssetId)
Info.
bool
isAssetAutoUnload(const char * pAssetId)
bool
isAssetDependedOn(const char * pAssetId, const char * pDependedOnByAssetId)
bool
isAssetInternal(const char * pAssetId)
bool
isAssetLoaded(const char * pAssetId)
bool
isAssetPrivate(const char * pAssetId)
bool
isDeclaredAsset(const char * pAssetId)
bool
isReferencedAsset(const char * pAssetId)
bool
loadAssetTags(ModuleDefinition * pModuleDefinition)
Asset tags.
bool
loadModuleAutoLoadAssets(ModuleDefinition * pModuleDefinition)
refreshAllAssets(const bool includeUnloaded)
bool
refreshAsset(const char * pAssetId)
registerAssetPtrRefreshNotify(AssetPtrBase * pAssetPtrBase, AssetPtrCallback * pCallback)
bool
releaseAsset(const char * pAssetId)
bool
removeDeclaredAsset(const char * pAssetId)
bool
removeDeclaredAssets(ModuleDefinition * pModuleDefinition)
bool
renameDeclaredAsset(const char * pAssetIdFrom, const char * pAssetIdTo)
bool
renameReferencedAsset(const char * pAssetIdFrom, const char * pAssetIdTo)
bool
bool
unregisterAssetPtrRefreshNotify(AssetPtrBase * pAssetPtrBase)
Public Static Functions
Private Functions
addReferencedAsset(StringTableEntry assetId, StringTableEntry referenceFilePath)
onModulePostUnload(ModuleDefinition * pModuleDefinition)
onModulePreLoad(ModuleDefinition * pModuleDefinition)
Module callbacks.
onModulePreUnload(ModuleDefinition * pModuleDefinition)
removeAssetDependencies(const char * pAssetId)
removeAssetLooseFiles(const char * pAssetId)
removeAssetReferences(StringTableEntry assetId)
renameAssetDependencies(StringTableEntry assetIdFrom, StringTableEntry assetIdTo)
renameAssetReferences(StringTableEntry assetIdFrom, StringTableEntry assetIdTo)
bool
scanDeclaredAssets(const char * pPath, const char * pExtension, const bool recurse, ModuleDefinition * pModuleDefinition)
bool
scanReferencedAssets(const char * pPath, const char * pExtension, const bool recurse)
unloadAsset(AssetDefinition * pAssetDefinition)
Detailed Description
Private Types
typedef SimObject Parent
Public Types
typedef HashTable< typeAssetId, typeAssetId > typeAssetDependsOnHash
typedef StringTableEntry typeAssetId
typedef HashTable< typeAssetId, typeAssetId > typeAssetIsDependedOnHash
typedef StringTableEntry typeAssetName
typedef HashMap< AssetPtrBase *, AssetPtrCallback * > typeAssetPtrRefreshHash
typedef HashMap< typeAssetId, AssetDefinition * > typeDeclaredAssetsHash
typedef HashTable< typeAssetId, typeReferenceFilePath > typeReferencedAssetsHash
typedef StringTableEntry typeReferenceFilePath
Private Attributes
U32 mAcquiredReferenceCount
typeAssetDependsOnHash mAssetDependsOn
Asset dependencies.
typeAssetIsDependedOnHash mAssetIsDependedOn
typeAssetPtrRefreshHash mAssetPtrRefreshNotifications
Asset pointer refresh notifications.
SimObjectPtr< AssetTagsManifest > mAssetTagsManifest
Asset tags.
SimObjectPtr< ModuleDefinition > mAssetTagsModuleDefinition
typeDeclaredAssetsHash mDeclaredAssets
Declared assets.
bool mEchoInfo
Miscellaneous.
bool mIgnoreAutoUnload
U32 mLoadedExternalAssetsCount
U32 mLoadedInternalAssetsCount
U32 mLoadedPrivateAssetsCount
U32 mMaxLoadedExternalAssetsCount
U32 mMaxLoadedInternalAssetsCount
U32 mMaxLoadedPrivateAssetsCount
typeReferencedAssetsHash mReferencedAssets
Referenced assets.
Taml mTaml
Public Functions
AssetManager()
~AssetManager()
acquireAcquiredReferenceCount(void )
Total acquired asset references.
acquireAsPrivateAsset(const char * pAssetId)
Private asset acquisition.
acquireAsset(const char * pAssetId)
Public asset acquisition.
addDeclaredAsset(ModuleDefinition * pModuleDefinition, const char * pAssetFilePath)
addModuleDeclaredAssets(ModuleDefinition * pModuleDefinition)
Declared assets.
addPrivateAsset(AssetBase * pAssetBase)
compileReferencedAssets(ModuleDefinition * pModuleDefinition)
Referenced assets.
DECLARE_CONOBJECT(AssetManager )
Declare Console Object.
deleteAsset(const char * pAssetId, const bool deleteLooseFiles, const bool deleteDependencies)
Asset deletion.
doesAssetDependOn(const char * pAssetId, const char * pDependsOnAssetId)
dumpDeclaredAssets(void )
findAllAssets(AssetQuery * pAssetQuery, const bool ignoreInternal, const bool ignorePrivate)
Asset queries.
findAssetAutoUnload(AssetQuery * pAssetQuery, const bool assetAutoUnload, const bool assetQueryAsSource)
findAssetCategory(AssetQuery * pAssetQuery, const char * pAssetCategory, const bool assetQueryAsSource)
findAssetDependsOn(AssetQuery * pAssetQuery, const char * pAssetId)
findAssetInternal(AssetQuery * pAssetQuery, const bool assetInternal, const bool assetQueryAsSource)
findAssetIsDependedOn(AssetQuery * pAssetQuery, const char * pAssetId)
findAssetLooseFile(AssetQuery * pAssetQuery, const char * pLooseFile, const bool assetQueryAsSource)
findAssetName(AssetQuery * pAssetQuery, const char * pAssetName, const bool partialName)
findAssetPrivate(AssetQuery * pAssetQuery, const bool assetPrivate, const bool assetQueryAsSource)
findAssetType(AssetQuery * pAssetQuery, const char * pAssetType, const bool assetQueryAsSource)
findInvalidAssetReferences(AssetQuery * pAssetQuery)
findTaggedAssets(AssetQuery * pAssetQuery, const char * pAssetTagNames, const bool assetQueryAsSource)
getAcquiredReferenceCount(void )
getAssetCategory(const char * pAssetId)
getAssetDescription(const char * pAssetId)
getAssetFilePath(const char * pAssetId)
getAssetModuleDefinition(const char * pAssetId)
getAssetName(const char * pAssetId)
getAssetPath(const char * pAssetId)
getAssetTags(void )
getAssetType(const char * pAssetId)
getDeclaredAssetCount(void )
Info.
getDependedOnAssets()
getLoadedExternalAssetCount(void )
getLoadedInternalAssetCount(void )
getLoadedPrivateAssetCount(void )
getMaxLoadedExternalAssetCount(void )
getMaxLoadedInternalAssetCount(void )
getMaxLoadedPrivateAssetCount(void )
getReferencedAssetCount(void )
isAssetAutoUnload(const char * pAssetId)
isAssetDependedOn(const char * pAssetId, const char * pDependedOnByAssetId)
isAssetInternal(const char * pAssetId)
isAssetLoaded(const char * pAssetId)
isAssetPrivate(const char * pAssetId)
isDeclaredAsset(const char * pAssetId)
isReferencedAsset(const char * pAssetId)
loadAssetTags(ModuleDefinition * pModuleDefinition)
Asset tags.
loadModuleAutoLoadAssets(ModuleDefinition * pModuleDefinition)
onAdd()
Reimplemented from: SimObject
onRemove()
Reimplemented from: SimObject
purgeAssets(void )
refreshAllAssets(const bool includeUnloaded)
refreshAsset(const char * pAssetId)
registerAssetPtrRefreshNotify(AssetPtrBase * pAssetPtrBase, AssetPtrCallback * pCallback)
releaseAcquiredReferenceCount(void )
releaseAsset(const char * pAssetId)
removeDeclaredAsset(const char * pAssetId)
removeDeclaredAssets(ModuleDefinition * pModuleDefinition)
renameDeclaredAsset(const char * pAssetIdFrom, const char * pAssetIdTo)
renameReferencedAsset(const char * pAssetIdFrom, const char * pAssetIdTo)
restoreAssetTags(void )
saveAssetTags(void )
unregisterAssetPtrRefreshNotify(AssetPtrBase * pAssetPtrBase)
Public Static Functions
initPersistFields()
Private Functions
addReferencedAsset(StringTableEntry assetId, StringTableEntry referenceFilePath)
findAsset(const char * pAssetId)
onModulePostUnload(ModuleDefinition * pModuleDefinition)
Reimplemented from: ModuleCallbacks
onModulePreLoad(ModuleDefinition * pModuleDefinition)
Reimplemented from: ModuleCallbacks
onModulePreUnload(ModuleDefinition * pModuleDefinition)
Reimplemented from: ModuleCallbacks
removeAssetDependencies(const char * pAssetId)
removeAssetLooseFiles(const char * pAssetId)
removeAssetReferences(StringTableEntry assetId)
renameAssetDependencies(StringTableEntry assetIdFrom, StringTableEntry assetIdTo)
renameAssetReferences(StringTableEntry assetIdFrom, StringTableEntry assetIdTo)
scanDeclaredAssets(const char * pPath, const char * pExtension, const bool recurse, ModuleDefinition * pModuleDefinition)
scanReferencedAssets(const char * pPath, const char * pExtension, const bool recurse)
unloadAsset(AssetDefinition * pAssetDefinition)