Annchienta::CacheManager Class Reference
List of all members.
Detailed Description
This describes a class which is used to create an engine cache, so certain data objects can be loaded quicker.
Constructor & Destructor Documentation
Annchienta::CacheManager::CacheManager |
( |
|
) |
|
Annchienta::CacheManager::~CacheManager |
( |
|
) |
|
Member Function Documentation
void Annchienta::CacheManager::clear |
( |
|
) |
|
Clears the cache. All objects are removed from the cache.
Fetches a Cacheable from the cache. It is better to use the getSurface(), getSound(), getMask()... functions when possible.
- Parameters:
-
| fileName | Filename of the sought cacheable. |
| cacheableType | CacheableType of the sought cacheable. |
- Returns:
- The sought Cacheable.
Mask* Annchienta::CacheManager::getMask |
( |
const char * |
fileName |
) |
|
Fetches a Mask from the cache. The Mask is loaded if it isn't found in the cache.
- Parameters:
-
| fileName | File to be loaded. |
- Returns:
- The desired Mask.
Sound* Annchienta::CacheManager::getSound |
( |
const char * |
fileName |
) |
|
Fetches a Sound from the cache. The Sound is loaded if it isn't found in the cache.
- Parameters:
-
| fileName | File to be loaded. |
- Returns:
- The desired Sound.
Surface* Annchienta::CacheManager::getSurface |
( |
const char * |
fileName |
) |
|
Fetches a Surface from the cache. The Surface is loaded if it isn't found in the cache.
- Parameters:
-
| fileName | File to be loaded. |
- Returns:
- The desired Surface.
Member Data Documentation