![]() |
Public API Reference |
iHierarchicalCache implementation storing everything in a MicroArchive. More...
#include <csplugincommon/shader/shadercachehelper.h>
Public Member Functions | |
| MicroArchiveCache (iHierarchicalCache *parentCache, const char *cacheItem) | |
| Construct. | |
iHierarchicalCache implementation | |
| virtual bool | CacheData (const void *data, size_t size, const char *path) |
| Cache some data. | |
| virtual csPtr< iDataBuffer > | ReadCache (const char *path) |
| Retrieve some data from the cache. | |
| virtual bool | ClearCache (const char *path) |
| Clear items from the cache. | |
| virtual void | Flush () |
| Ensure that the cached data is written on whatever medium is behind the cache. | |
| virtual csPtr< iHierarchicalCache > | GetRootedCache (const char *base) |
| Create a new hierarchical cache which is a view of this cache with the items root at base. | |
| virtual csPtr< iStringArray > | GetSubItems (const char *path) |
| Get cache items directly under path. | |
| virtual iHierarchicalCache * | GetTopCache () |
| Get the cache which is the ultimate hierarchical ancestor of a cache. | |
| virtual bool | IsCacheWriteable () const |
| Query if cache can be written to (as some caches may be static/read-only) | |
iHierarchicalCache implementation storing everything in a MicroArchive.
Definition at line 195 of file shadercachehelper.h.
| CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::MicroArchiveCache | ( | iHierarchicalCache * | parentCache, |
| const char * | cacheItem | ||
| ) |
Construct.
| parentCache | The cache in which the archive will be stored |
| cacheItem | The path of the cache item for the archive |
| virtual bool CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::CacheData | ( | const void * | data, |
| size_t | size, | ||
| const char * | path | ||
| ) | [virtual] |
Cache some data.
Returns true if this succeeded. path needs to be absolute.
Implements iHierarchicalCache.
| virtual bool CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::ClearCache | ( | const char * | path | ) | [virtual] |
Clear items from the cache.
Clears all items below the given path. path needs to be absolute.
Implements iHierarchicalCache.
| virtual void CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::Flush | ( | ) | [virtual] |
Ensure that the cached data is written on whatever medium is behind the cache.
Implements iHierarchicalCache.
| virtual csPtr<iHierarchicalCache> CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::GetRootedCache | ( | const char * | base | ) | [virtual] |
Create a new hierarchical cache which is a view of this cache with the items root at base.
You can imagine the returned cache prepending base to all item requests or storage.
Implements iHierarchicalCache.
| virtual csPtr<iStringArray> CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::GetSubItems | ( | const char * | path | ) | [virtual] |
Get cache items directly under path.
Implements iHierarchicalCache.
| virtual iHierarchicalCache* CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::GetTopCache | ( | ) | [virtual] |
Get the cache which is the ultimate hierarchical ancestor of a cache.
Implements iHierarchicalCache.
| virtual bool CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::IsCacheWriteable | ( | ) | const [inline, virtual] |
Query if cache can be written to (as some caches may be static/read-only)
Implements iHierarchicalCache.
Definition at line 221 of file shadercachehelper.h.
| virtual csPtr<iDataBuffer> CS::PluginCommon::ShaderCacheHelper::MicroArchiveCache::ReadCache | ( | const char * | path | ) | [virtual] |
Retrieve some data from the cache.
Returns 0 if the data could not be found in the cache. path needs to be absolute.
Implements iHierarchicalCache.