From: <re...@us...> - 2008-10-22 01:10:24
|
Revision: 31465 http://crystal.svn.sourceforge.net/crystal/?rev=31465&view=rev Author: res2002 Date: 2008-10-22 01:10:18 +0000 (Wed, 22 Oct 2008) Log Message: ----------- Docs; the top cache of a rooted cache is the top cache of the wrapped cache (not just the wrapped cache) Modified Paths: -------------- CS/trunk/include/csutil/rootedhiercache.h Modified: CS/trunk/include/csutil/rootedhiercache.h =================================================================== --- CS/trunk/include/csutil/rootedhiercache.h 2008-10-22 01:02:31 UTC (rev 31464) +++ CS/trunk/include/csutil/rootedhiercache.h 2008-10-22 01:10:18 UTC (rev 31465) @@ -32,6 +32,13 @@ { namespace Utility { + /** + * iHierarchicalCache providing a 'view' into a path of another cache. + * This cache takes a 'wrapped' cache and a cache path which serves as + * the root path of all accesses to this cache. In other words, the + * given cache path is prepended before passing all cache requests to + * the 'wrapped' cache. + */ class CS_CRYSTALSPACE_EXPORT RootedHierarchicalCache : public scfImplementation1<RootedHierarchicalCache, iHierarchicalCache> { @@ -41,6 +48,11 @@ csString AdjustPath (const char* org); public: + /** + * Construct. + * \param cache The cache to wrap. + * \param root The root directory in \a cache for this cache. + */ RootedHierarchicalCache (iHierarchicalCache* cache, const char* root) : scfImplementationType (this), wrappedCache (cache), rootdir (root) {} @@ -61,7 +73,7 @@ virtual csPtr<iStringArray> GetSubItems (const char* path) { return wrappedCache->GetSubItems (AdjustPath (path)); } virtual iHierarchicalCache* GetTopCache() - { return wrappedCache; } + { return wrappedCache->GetTopCache(); } /** @} */ }; } // namespace Utility This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |