OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Package Functions | List of all members
OmegaEngine.Assets.CacheManager Class Reference

Keeps a cache of Assets that have been loaded and provides type-safe access to them. More...

Inheritance diagram for OmegaEngine.Assets.CacheManager:

Public Member Functions

void Clean ()
 Removes all Assets from the cache that have no references any more. More...
 
void Dispose ()
 Calls Clean and then checks if any Asset was not released. More...
 

Package Functions

void AddAsset (Asset asset)
 Adds an Asset to the cache. More...
 
GetAsset< T > (string name)
 Tries to retrieve an Asset from cache. More...
 

Detailed Description

Keeps a cache of Assets that have been loaded and provides type-safe access to them.

See Also
Engine.Cache

Member Function Documentation

void OmegaEngine.Assets.CacheManager.AddAsset ( Asset  asset)
inlinepackage

Adds an Asset to the cache.

Parameters
assetThe Asset to add.
void OmegaEngine.Assets.CacheManager.Clean ( )
inline

Removes all Assets from the cache that have no references any more.

void OmegaEngine.Assets.CacheManager.Dispose ( )
inline

Calls Clean and then checks if any Asset was not released.

T OmegaEngine.Assets.CacheManager.GetAsset< T > ( string  name)
inlinepackage

Tries to retrieve an Asset from cache.

Template Parameters
TThe type of Asset to get.
Parameters
nameThe name (full ID) of the Asset to get.
Returns
The Asset if found, null otherwise.
Exceptions
InvalidOperationExceptionA different type of asset with this name was found instead.
Type Constraints
T :Asset 

The documentation for this class was generated from the following file: