From 341193eec647afae129f400b14ec9af0daf2ba18 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 28 Jan 2013 23:28:14 +0800 Subject: [PATCH] Updating comments for CCFileUtils. --- cocos2dx/platform/CCFileUtils.h | 39 +++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/cocos2dx/platform/CCFileUtils.h b/cocos2dx/platform/CCFileUtils.h index 2c90a03035..ea518dca45 100644 --- a/cocos2dx/platform/CCFileUtils.h +++ b/cocos2dx/platform/CCFileUtils.h @@ -155,15 +155,24 @@ public: */ void loadFilenameLookupDictionaryFromFile(const char* filename); - /** Loads the filenameLookup dictionary from the contents of a filename. - - @since v2.1 + /** + * Sets the filenameLookup dictionary. + * + * @param pFilenameLookupDict The dictionary for replacing filename. + * @since v2.1 */ void setFilenameLookupDictionary(CCDictionary* pFilenameLookupDict); - /// @cond + /** + * Gets full path from a file name and the path of the reletive file. + * @param pszFilename The file name. + * @param pszRelativeFile The path of the relative file. + * @return The full path. + * e.g. pszFilename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist + * Return: /User/path1/path2/hello.pvr (If there are a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) + * + */ const char* fullPathFromRelativeFile(const char *pszFilename, const char *pszRelativeFile); - /// @endcond /** @brief Set the resource directory; we will find resources relative to this directory. @@ -173,24 +182,36 @@ public: CC_DEPRECATED_ATTRIBUTE void setResourceDirectory(const char *pszDirectoryName); /** - * Sets the array that contains the search order of the resources based for the device. + * Sets the array that contains the search order of the resources. * + * @param searchResolutionsOrder The source array that contains the search order of the resources. * @see getSearchResolutionsOrder(). * @since v2.1 */ void setSearchResolutionsOrder(const std::vector& searchResolutionsOrder); + + /** + * Gets the array that contains the search order of the resources. + * + * @see setSearchResolutionsOrder(). + * @since v2.1 + */ const std::vector& getSearchResolutionsOrder(); /** * Sets the array of search paths. * You can use this array to modify the search path of the resources. * If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array. - * - * By default it is an array with only the "" (empty string) element. - * + * + * @param searchPaths * @since v2.1 */ void setSearchPath(const std::vector& searchPaths); + + /** + * Gets the array of search paths. + * + */ const std::vector& getSearchPath(); /**