<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csVfsCacheManager Class Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>csVfsCacheManager Class Reference</h1><!-- doxytag: class="csVfsCacheManager" --><!-- doxytag: inherits="scfImplementation1< csVfsCacheManager, iCacheManager >" -->This is a general cache that can cache data on VFS. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="vfscache_8h-source.html">csutil/vfscache.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for csVfsCacheManager:</div> <div class="dynsection"> <p><center><img src="classcsVfsCacheManager__inherit__graph.png" border="0" usemap="#csVfsCacheManager__inherit__map" alt="Inheritance graph"></center> <map name="csVfsCacheManager__inherit__map"> <area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\< csVfsCacheManager, iCacheManager \>" alt="" coords="65,161,487,188"><area shape="rect" href="classscfImplementation.html" title="scfImplementation\< csVfsCacheManager \>" alt="" coords="5,84,309,111"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="329,7,385,33"><area shape="rect" href="structiCacheManager.html" title="A generic cache system." alt="" coords="333,84,456,111"><area shape="rect" href="classCS_1_1Memory_1_1CustomAllocated.html" title="Class that overrides operator new/operator delete/etc." alt="" coords="47,7,268,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classcsVfsCacheManager-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#af49b7621a0622b7f90515ac5576e5c5">CacheData</a> (const void *data, size_t size, const char *type, const char *scope, <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Cache some data. <a href="#af49b7621a0622b7f90515ac5576e5c5"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#0597d546bad71dc58dfebad402079c0e">ClearCache</a> (const char *type=0, const char *scope=0, const <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> *id=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear items from the cache. <a href="#0597d546bad71dc58dfebad402079c0e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#2f806f36a79e4da8dba69de7440174de">csVfsCacheManager</a> (<a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *object_reg, const char *vfsdir)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct the cache manager with the given directory. <a href="#2f806f36a79e4da8dba69de7440174de"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#f71878aec7fe758379ad56998ff22c55">Flush</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Flush VFS. <a href="#f71878aec7fe758379ad56998ff22c55"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#d2aee76ef0d1e381fc473bf810991648">GetCurrentScope</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get current scope or 0 if none set. <a href="#d2aee76ef0d1e381fc473bf810991648"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#beaf915c611af5992efb6c65d11a6f8d">GetCurrentType</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get current type or 0 if none set. <a href="#beaf915c611af5992efb6c65d11a6f8d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#4024c7cfb5a6b10275538943f1d45c28">IsReadOnly</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Is the cache manager read-only? <a href="#4024c7cfb5a6b10275538943f1d45c28"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br> < <a class="el" href="structiDataBuffer.html">iDataBuffer</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#09efd63ae7ac4313f6c6c07409d50d8b">ReadCache</a> (const char *type, const char *scope, <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve some data from the cache. <a href="#09efd63ae7ac4313f6c6c07409d50d8b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#c66d9b7c679fdda2722c4d92f68daccc">SetCurrentScope</a> (const char *scope)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set current scope. <a href="#c66d9b7c679fdda2722c4d92f68daccc"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#f313ceafd06b7a528b7d4925181994b0">SetCurrentType</a> (const char *type)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set current type. <a href="#f313ceafd06b7a528b7d4925181994b0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsVfsCacheManager.html#37027ad3efed70589a378920b6c808ef">SetReadOnly</a> (bool ro)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Force the cache manager to be read-only. <a href="#37027ad3efed70589a378920b6c808ef"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This is a general cache that can cache data on VFS. <p>Definition at line <a class="el" href="vfscache_8h-source.html#l00036">36</a> of file <a class="el" href="vfscache_8h-source.html">vfscache.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="2f806f36a79e4da8dba69de7440174de"></a><!-- doxytag: member="csVfsCacheManager::csVfsCacheManager" ref="2f806f36a79e4da8dba69de7440174de" args="(iObjectRegistry *object_reg, const char *vfsdir)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csVfsCacheManager::csVfsCacheManager </td> <td>(</td> <td class="paramtype"><a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> * </td> <td class="paramname"> <em>object_reg</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>vfsdir</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Construct the cache manager with the given directory. <p> All cached data will be put somewhere in that directory. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="af49b7621a0622b7f90515ac5576e5c5"></a><!-- doxytag: member="csVfsCacheManager::CacheData" ref="af49b7621a0622b7f90515ac5576e5c5" args="(const void *data, size_t size, const char *type, const char *scope, uint32 id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool csVfsCacheManager::CacheData </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>scope</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Cache some data. <p> Returns true if this succeeded. <p>Implements <a class="el" href="structiCacheManager.html#2aedafde9aa1abfd45423fa2b509a487">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="0597d546bad71dc58dfebad402079c0e"></a><!-- doxytag: member="csVfsCacheManager::ClearCache" ref="0597d546bad71dc58dfebad402079c0e" args="(const char *type=0, const char *scope=0, const uint32 *id=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool csVfsCacheManager::ClearCache </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>type</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>scope</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> * </td> <td class="paramname"> <em>id</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Clear items from the cache. <p> <p>Implements <a class="el" href="structiCacheManager.html#026bda3760ef474ba81032e849bd40b8">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="f71878aec7fe758379ad56998ff22c55"></a><!-- doxytag: member="csVfsCacheManager::Flush" ref="f71878aec7fe758379ad56998ff22c55" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csVfsCacheManager::Flush </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Flush VFS. <p> <p>Implements <a class="el" href="structiCacheManager.html#6f55692170b6a800973260d3efe9dd98">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="d2aee76ef0d1e381fc473bf810991648"></a><!-- doxytag: member="csVfsCacheManager::GetCurrentScope" ref="d2aee76ef0d1e381fc473bf810991648" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* csVfsCacheManager::GetCurrentScope </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get current scope or 0 if none set. <p> <p>Implements <a class="el" href="structiCacheManager.html#6c368f02fd33a11c9758daa968e0e6ae">iCacheManager</a>.</p> <p>Definition at line <a class="el" href="vfscache_8h-source.html#l00080">80</a> of file <a class="el" href="vfscache_8h-source.html">vfscache.h</a>.</p> </div> </div><p> <a class="anchor" name="beaf915c611af5992efb6c65d11a6f8d"></a><!-- doxytag: member="csVfsCacheManager::GetCurrentType" ref="beaf915c611af5992efb6c65d11a6f8d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* csVfsCacheManager::GetCurrentType </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get current type or 0 if none set. <p> <p>Implements <a class="el" href="structiCacheManager.html#757fe6fbfa9de749269ee522106ac508">iCacheManager</a>.</p> <p>Definition at line <a class="el" href="vfscache_8h-source.html#l00072">72</a> of file <a class="el" href="vfscache_8h-source.html">vfscache.h</a>.</p> </div> </div><p> <a class="anchor" name="4024c7cfb5a6b10275538943f1d45c28"></a><!-- doxytag: member="csVfsCacheManager::IsReadOnly" ref="4024c7cfb5a6b10275538943f1d45c28" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool csVfsCacheManager::IsReadOnly </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Is the cache manager read-only? <p> <p>Implements <a class="el" href="structiCacheManager.html#5354f443c37597e6f91c65aa435910c8">iCacheManager</a>.</p> <p>Definition at line <a class="el" href="vfscache_8h-source.html#l00063">63</a> of file <a class="el" href="vfscache_8h-source.html">vfscache.h</a>.</p> </div> </div><p> <a class="anchor" name="09efd63ae7ac4313f6c6c07409d50d8b"></a><!-- doxytag: member="csVfsCacheManager::ReadCache" ref="09efd63ae7ac4313f6c6c07409d50d8b" args="(const char *type, const char *scope, uint32 id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a><<a class="el" href="structiDataBuffer.html">iDataBuffer</a>> csVfsCacheManager::ReadCache </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>scope</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> </td> <td class="paramname"> <em>id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrieve some data from the cache. <p> Returns 0 if the data could not be found in the cache. <p>Implements <a class="el" href="structiCacheManager.html#8720145834e76d05d858b7b4bac6b8b1">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="c66d9b7c679fdda2722c4d92f68daccc"></a><!-- doxytag: member="csVfsCacheManager::SetCurrentScope" ref="c66d9b7c679fdda2722c4d92f68daccc" args="(const char *scope)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csVfsCacheManager::SetCurrentScope </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>scope</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set current scope. <p> <p>Implements <a class="el" href="structiCacheManager.html#9467a5d21d2f805217fe3017d3475349">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="f313ceafd06b7a528b7d4925181994b0"></a><!-- doxytag: member="csVfsCacheManager::SetCurrentType" ref="f313ceafd06b7a528b7d4925181994b0" args="(const char *type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csVfsCacheManager::SetCurrentType </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>type</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set current type. <p> <p>Implements <a class="el" href="structiCacheManager.html#368ec9b2fdcf57ef7e74a90f60189646">iCacheManager</a>.</p> </div> </div><p> <a class="anchor" name="37027ad3efed70589a378920b6c808ef"></a><!-- doxytag: member="csVfsCacheManager::SetReadOnly" ref="37027ad3efed70589a378920b6c808ef" args="(bool ro)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csVfsCacheManager::SetReadOnly </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>ro</em> </td> <td> ) </td> <td width="100%"><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Force the cache manager to be read-only. <p> This will prevent updates of the cache but <a class="el" href="classcsVfsCacheManager.html#af49b7621a0622b7f90515ac5576e5c5" title="Cache some data.">CacheData()</a> will still return true to indicate success. <p>Implements <a class="el" href="structiCacheManager.html#013f35481ea7adb2edd11c3c556b6cf4">iCacheManager</a>.</p> <p>Definition at line <a class="el" href="vfscache_8h-source.html#l00062">62</a> of file <a class="el" href="vfscache_8h-source.html">vfscache.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csutil/<a class="el" href="vfscache_8h-source.html">vfscache.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>