AssetManager

consoledoc.h

More...

Public Attributes

bool
EchoInfo [552]

Whether the asset manager echos extra information to the console or not.

bool

Whether the asset manager should ignore unloading of auto-unload assets or not.

Public Functions

String
acquireAsset(string assetId, bool asPrivate)

Acquire the specified asset Id.

bool
addDeclaredAsset(string moduleDefinition, string assetFilePath)

Add the specified asset against the specified module definition.

bool
addModuleDeclaredAssets(string moduleDefinition)

Add any the declared assets specified by the module definition.

String
addPrivateAsset(string assetObject)

Adds a private asset object.

bool
compileReferencedAssets(string moduleDefinition)

Compile the referenced assets determined by the specified module definition.

bool
deleteAsset(string assetId, bool deleteLooseFiles, bool deleteDependencies)

Deletes the specified asset Id and optionally its loose files and asset dependencies.

void

Dumps a breakdown of all declared assets.

int
findAllAssets(string assetQuery, bool ignoreInternal, bool ignorePrivate)

Performs an asset query searching for all assets optionally ignoring internal assets.

int
findAssetAutoUnload(string assetQuery, bool assetAutoUnload, bool assetQueryAsSource)

Performs an asset query searching for the specified asset auto-unload flag.

int
findAssetCategory(string assetQuery, string assetCategory, bool assetQueryAsSource)

Performs an asset query searching for the specified asset category.

int
findAssetDependsOn(string assetQuery, string assetId)

Performs an asset query searching for asset Ids that the specified asset Id depends on.

int
findAssetInternal(string assetQuery, bool assetInternal, bool assetQueryAsSource)

Performs an asset query searching for the specified asset internal flag.

int
findAssetIsDependedOn(string assetQuery, string assetId)

Performs an asset query searching for asset Ids that depend on the specified asset Id.

int
findAssetLooseFile(string assetQuery, string assetLooseFile, bool assetQueryAsSource)

Performs an asset query searching for the specified loose file.

int
findAssetName(string assetQuery, string assetName, bool partialName)

Performs an asset query searching for the specified asset name.

int
findAssetPrivate(string assetQuery, bool assetPrivate, bool assetQueryAsSource)

Performs an asset query searching for the specified asset private flag.

int
findAssetType(string assetQuery, string assetType, bool assetQueryAsSource)

Performs an asset query searching for the specified asset type.

int
findInvalidAssetReferences(string assetQuery)

Performs an asset query searching for invalid asset references.

int
findTaggedAssets(string assetQuery, string assetTagNames, bool assetQueryAsSource)

Performs an asset query searching for the specified asset tag name(s).

String
getAssetCategory(string assetId)

Gets the asset category from the specified asset Id.

String
getAssetDescription(string assetId)

Gets the asset description from the specified asset Id.

String
getAssetFilePath(string assetId)

Gets the asset file-path from the specified asset Id.

String
getAssetModule(string assetId)

Gets the module definition where the the specified asset Id is located.

String
getAssetName(string assetId)

Gets the asset name from the specified asset Id.

String
getAssetPath(string assetId)

Gets the asset path (not including the asset file) from the specified asset Id.

int

Gets the currently loaded asset tags manifest.

String
getAssetType(string assetId)

Gets the asset type from the specified asset Id.

bool

Gets the number of declared assets.

bool

Gets the number of loaded external assets.

bool

Gets the number of loaded internal assets.

bool

Gets the maximum number of loaded external assets.

bool

Gets the maximum number of loaded internal assets.

bool

Gets the number of asset referenced.

bool
isAssetAutoUnload(string assetId)

Check whether the specified asset Id is auto - unload or not.

bool
isAssetInternal(string assetId)

Check whether the specified asset Id is internal or not.

bool
isAssetLoaded(string assetId)

Check whether the specified asset Id is loaded or not.

bool
isAssetPrivate(string assetId)

Check whether the specified asset Id is private or not.

bool
isDeclaredAsset(string assetId)

Check whether the specified asset Id is declared or not.

bool
isReferencedAsset(string assetId)

Check whether the specified asset Id is referenced or not.

void

Purge all assets that are not referenced even if they are set to not auto-unload.

void
refreshAllAssets(bool includeUnloaded)

Refresh all declared assets.

void
refreshAsset(string assetId)

Refresh the specified asset Id.

bool
releaseAsset(string assetId)

Release the specified asset Id.

bool
removeDeclaredAsset(string assetId)

Remove the specified declared asset Id.

bool
removeDeclaredAssets(string moduleDefinition)

Remove any the declared assets specified by the module definition.

bool
renameDeclaredAsset(string assetIdFrom, string assetIdTo)

Rename declared asset Id.

bool
renameReferencedAsset(string assetIdFrom, string assetIdTo)

Rename referenced asset Id.

bool

Restore the currently loaded asset tags manifest from disk (replace anything in memory).

bool

Save the currently loaded asset tags manifest.

Detailed Description

UNDOCUMENTED!

Public Attributes

bool EchoInfo [552]

Whether the asset manager echos extra information to the console or not.

bool IgnoreAutoUnload [553]

Whether the asset manager should ignore unloading of auto-unload assets or not.

Public Functions

acquireAsset(string assetId, bool asPrivate)

Acquire the specified asset Id.

You must release the asset once you're finish with it using 'releaseAsset'. Parameters:

assetId

The selected asset Id.

asPrivate

Whether to acquire the asset Id as a private asset.

return:

The acquired asset or NULL if not acquired.

addDeclaredAsset(string moduleDefinition, string assetFilePath)

Add the specified asset against the specified module definition.

Parameters:

moduleDefinition

The module definition that may contain declared assets.

return:

Whether adding declared assets was successful or not.

addModuleDeclaredAssets(string moduleDefinition)

Add any the declared assets specified by the module definition.

Parameters:

moduleDefinition

The module definition specifies the asset manifest.

return:

Whether adding declared assets was successful or not.

addPrivateAsset(string assetObject)

Adds a private asset object.

Parameters:

assetObject

The asset object to add as a private asset.

return:

The allocated private asset Id.

compileReferencedAssets(string moduleDefinition)

Compile the referenced assets determined by the specified module definition.

Parameters:

moduleDefinition

The module definition specifies the asset manifest.

return:

Whether the compilation was successful or not.

deleteAsset(string assetId, bool deleteLooseFiles, bool deleteDependencies)

Deletes the specified asset Id and optionally its loose files and asset dependencies.

Parameters:

assetId

The selected asset Id.

deleteLooseFiles

Whether to delete an assets loose files or not.

deleteDependencies

Whether to delete assets that depend on this asset or not.

return:

Whether the asset deletion was successful or not. A failure only indicates that the specified asset was not deleted but dependent assets and their loose files may have being deleted.

dumpDeclaredAssets()

Dumps a breakdown of all declared assets.

return:

No return value.

findAllAssets(string assetQuery, bool ignoreInternal, bool ignorePrivate)

Performs an asset query searching for all assets optionally ignoring internal assets.

Parameters:

assetQuery

The asset query object that will be populated with the results.

ignoreInternal

Whether to ignore internal assets or not. Optional: Defaults to true.

ignorePrivate

Whether to ignore private assets or not. Optional: Defaults to true.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetAutoUnload(string assetQuery, bool assetAutoUnload, bool assetQueryAsSource)

Performs an asset query searching for the specified asset auto-unload flag.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetInternal

The asset internal flag to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetCategory(string assetQuery, string assetCategory, bool assetQueryAsSource)

Performs an asset query searching for the specified asset category.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetCategory

The asset category to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetDependsOn(string assetQuery, string assetId)

Performs an asset query searching for asset Ids that the specified asset Id depends on.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetId

The asset Id to query for any asset Ids that it depends on.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetInternal(string assetQuery, bool assetInternal, bool assetQueryAsSource)

Performs an asset query searching for the specified asset internal flag.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetInternal

The asset internal flag to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetIsDependedOn(string assetQuery, string assetId)

Performs an asset query searching for asset Ids that depend on the specified asset Id.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetId

The asset Id to query for any asset Ids that may depend on it.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetLooseFile(string assetQuery, string assetLooseFile, bool assetQueryAsSource)

Performs an asset query searching for the specified loose file.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetLooseFile

The loose-file used by the asset to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetName(string assetQuery, string assetName, bool partialName)

Performs an asset query searching for the specified asset name.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetName

The asset name to search for. This may be a partial name if 'partialName' is true.

partialName

Whether the asset name is to be used as a partial name or not. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetPrivate(string assetQuery, bool assetPrivate, bool assetQueryAsSource)

Performs an asset query searching for the specified asset private flag.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetPrivate

The asset private flag to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findAssetType(string assetQuery, string assetType, bool assetQueryAsSource)

Performs an asset query searching for the specified asset type.

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetType

The asset type to search for.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

findInvalidAssetReferences(string assetQuery)

Performs an asset query searching for invalid asset references.

Parameters:

assetQuery

The asset query object that will be populated with the results.

return:

The number of asset Ids found that are invalid or (-1) if an error occurred.

findTaggedAssets(string assetQuery, string assetTagNames, bool assetQueryAsSource)

Performs an asset query searching for the specified asset tag name(s).

Parameters:

assetQuery

The asset query object that will be populated with the results.

assetTagNames

The asset tag name or names to search for. Multiple names can be specified using comma, space, tab or newline separation. Tags use an OR operation i.e. only assets tagged with ANY of the specified tags will be returned.

assetQueryAsSource

Whether to use the asset query as the data-source rather than the asset managers database or not. Doing this effectively filters the asset query. Optional: Defaults to false.

return:

The number of asset Ids found or (-1) if an error occurred.

getAssetCategory(string assetId)

Gets the asset category from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset category from the specified asset Id.

getAssetDescription(string assetId)

Gets the asset description from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset description from the specified asset Id.

getAssetFilePath(string assetId)

Gets the asset file-path from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset file - path from the specified asset Id.

getAssetModule(string assetId)

Gets the module definition where the the specified asset Id is located.

Parameters:

assetId

The selected asset Id.

return:

The module definition where the the specified asset Id is located.

getAssetName(string assetId)

Gets the asset name from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset name from the specified asset Id.

getAssetPath(string assetId)

Gets the asset path (not including the asset file) from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset path(not including the asset file) from the specified asset Id.

getAssetTags()

Gets the currently loaded asset tags manifest.

return:

The currently loaded asset tags manifest or zero if not loaded.

getAssetType(string assetId)

Gets the asset type from the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

The asset type from the specified asset Id.

getDeclaredAssetCount()

Gets the number of declared assets.

return:

Returns the number of declared assets.

getLoadedExternalAssetCount()

Gets the number of loaded external assets.

return:

Returns the number of loaded external assets.

getLoadedInternalAssetCount()

Gets the number of loaded internal assets.

return:

Returns the number of loaded internal assets.

getMaxLoadedExternalAssetCount()

Gets the maximum number of loaded external assets.

return:

Returns the maximum number of loaded external assets.

getMaxLoadedInternalAssetCount()

Gets the maximum number of loaded internal assets.

return:

Returns the maximum number of loaded internal assets.

getReferencedAssetCount()

Gets the number of asset referenced.

return:

Returns the number of asset references.

isAssetAutoUnload(string assetId)

Check whether the specified asset Id is auto - unload or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is auto-unload or not.

isAssetInternal(string assetId)

Check whether the specified asset Id is internal or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is internal or not.

isAssetLoaded(string assetId)

Check whether the specified asset Id is loaded or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is loaded or not.

isAssetPrivate(string assetId)

Check whether the specified asset Id is private or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is private or not.

isDeclaredAsset(string assetId)

Check whether the specified asset Id is declared or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is declared or not.

isReferencedAsset(string assetId)

Check whether the specified asset Id is referenced or not.

Parameters:

assetId

The selected asset Id.

return:

Whether the specified asset Id is referenced or not.

purgeAssets()

Purge all assets that are not referenced even if they are set to not auto-unload.

Assets can be in this state because they are either set to not auto-unload or the asset manager has/is disabling auto-unload.

return:

No return value.

refreshAllAssets(bool includeUnloaded)

Refresh all declared assets.

Parameters:

Whether

to include currently unloaded assets in the refresh or not. Optional: Defaults to false. Refreshing all assets can be an expensive (time-consuming) operation to perform.

return:

No return value.

refreshAsset(string assetId)

Refresh the specified asset Id.

Parameters:

assetId

The selected asset Id.

return:

No return value.

releaseAsset(string assetId)

Release the specified asset Id.

The asset should have been acquired using 'acquireAsset'. Parameters:

assetId

The selected asset Id.

return:

Whether the asset was released or not.

removeDeclaredAsset(string assetId)

Remove the specified declared asset Id.

Parameters:

assetId

The selected asset Id.

return:

Whether removing the declared asset was successful or not.

removeDeclaredAssets(string moduleDefinition)

Remove any the declared assets specified by the module definition.

Parameters:

moduleDefinition

The module definition that may contain declared assets.

return:

Whether removing declared assets was successful or not.

renameDeclaredAsset(string assetIdFrom, string assetIdTo)

Rename declared asset Id.

Parameters:

assetIdFrom

The selected asset Id to rename from.

assetIdFrom

The selected asset Id to rename to.

return:

Whether the rename was successful or not.

renameReferencedAsset(string assetIdFrom, string assetIdTo)

Rename referenced asset Id.

Parameters:

assetIdFrom

The selected asset Id to rename from.

assetIdFrom

The selected asset Id to rename to.

return:

Whether the rename was successful or not.

restoreAssetTags()

Restore the currently loaded asset tags manifest from disk (replace anything in memory).

return:

Whether the restore was successful or not.

saveAssetTags()

Save the currently loaded asset tags manifest.

return:

Whether the save was successful or not.