CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csVfsCacheManager Class Reference

This is a general cache that can cache data on VFS. More...

#include <vfscache.h>

Inheritance diagram for csVfsCacheManager:

iCacheManager iBase List of all members.

Public Methods

 csVfsCacheManager (iObjectRegistry *object_reg, const char *vfsdir)
 Construct the cache manager with the given directory. More...

virtual void SetCurrentType (const char *type)
 Set current type. More...

virtual const char * GetCurrentType () const
 Get current type or NULL if none set. More...

virtual void SetCurrentScope (const char *scope)
 Set current scope. More...

virtual const char * GetCurrentScope () const
 Get current scope or NULL if none set. More...

virtual bool CacheData (void *data, uint32 size, const char *type, const char *scope, uint32 id)
 Cache some data. More...

virtual csPtr< iDataBufferReadCache (const char *type, const char *scope, uint32 id)
 Retrieve some data from the cache. More...

virtual bool ClearCache (const char *type=NULL, const char *scope=NULL, const uint32 *id=NULL)
 Clear items from the cache. More...


Detailed Description

This is a general cache that can cache data on VFS.

Definition at line 33 of file vfscache.h.


Constructor & Destructor Documentation

csVfsCacheManager::csVfsCacheManager iObjectRegistry   object_reg,
const char *    vfsdir
 

Construct the cache manager with the given directory.

All cached data will be put somewhere in that directory.


Member Function Documentation

virtual bool csVfsCacheManager::CacheData void *    data,
uint32    size,
const char *    type,
const char *    scope,
uint32    id
[virtual]
 

Cache some data.

Returns true if this succeeded.

Implements iCacheManager.

virtual bool csVfsCacheManager::ClearCache const char *    type = NULL,
const char *    scope = NULL,
const uint32   id = NULL
[virtual]
 

Clear items from the cache.

Implements iCacheManager.

virtual const char* csVfsCacheManager::GetCurrentScope   const [inline, virtual]
 

Get current scope or NULL if none set.

Implements iCacheManager.

Definition at line 73 of file vfscache.h.

virtual const char* csVfsCacheManager::GetCurrentType   const [inline, virtual]
 

Get current type or NULL if none set.

Implements iCacheManager.

Definition at line 65 of file vfscache.h.

virtual csPtr<iDataBuffer> csVfsCacheManager::ReadCache const char *    type,
const char *    scope,
uint32    id
[virtual]
 

Retrieve some data from the cache.

Returns NULL if the data could not be found in the cache.

Implements iCacheManager.

virtual void csVfsCacheManager::SetCurrentScope const char *    scope [virtual]
 

Set current scope.

Implements iCacheManager.

virtual void csVfsCacheManager::SetCurrentType const char *    type [virtual]
 

Set current type.

Implements iCacheManager.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14