From 52e0545916d756d558cc2d7ce8baea49216ed1cb Mon Sep 17 00:00:00 2001 From: huangjie Date: Fri, 25 Mar 2022 18:01:53 +0800 Subject: [PATCH] =?UTF-8?q?L1=E7=BC=96=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangjie --- frameworks/resmgr_lite/include/hap_manager.h | 10 ++-- frameworks/resmgr_lite/include/hap_parser.h | 6 +-- frameworks/resmgr_lite/include/hap_resource.h | 6 +-- .../resmgr_lite/include/res_config_impl.h | 8 +-- .../include/resource_manager_impl.h | 52 +++++++++---------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/frameworks/resmgr_lite/include/hap_manager.h b/frameworks/resmgr_lite/include/hap_manager.h index 721b6c6..1c3da3e 100644 --- a/frameworks/resmgr_lite/include/hap_manager.h +++ b/frameworks/resmgr_lite/include/hap_manager.h @@ -42,7 +42,7 @@ public: /** * Update the resConfig * @param resConfig the resource config - * @return the resConfig after update + * @return SUCCESS if the resConfig updated success, else HAP_INIT_FAILED */ RState UpdateResConfig(ResConfig &resConfig); @@ -62,7 +62,7 @@ public: /** * Find resource by resource id * @param id the resource id - * @return the resources corresponding resource id + * @return the resources related to resource id */ const IdItem *FindResourceById(uint32_t id); @@ -70,7 +70,7 @@ public: * Find resource by resource name * @param name the resource name * @param resType the resource type - * @return the resources corresponding resource name + * @return the resources related to resource name */ const IdItem *FindResourceByName(const char *name, const ResType resType); @@ -90,9 +90,9 @@ public: const HapResource::ValueUnderQualifierDir *FindQualifierValueByName(const char *name, const ResType resType); /** - * Get the language pluralRule corresponding to quantity + * Get the language pluralRule related to quantity * @param quantity the language quantity - * @return the language pluralRule corresponding to quantity + * @return the language pluralRule related to quantity */ std::string GetPluralRulesAndSelect(int quantity); diff --git a/frameworks/resmgr_lite/include/hap_parser.h b/frameworks/resmgr_lite/include/hap_parser.h index ec7f31e..900149f 100644 --- a/frameworks/resmgr_lite/include/hap_parser.h +++ b/frameworks/resmgr_lite/include/hap_parser.h @@ -65,7 +65,7 @@ public: /** * Create resource config from KeyParams * @param keyParams the keyParams contain type and value - * @return the resource config corresponding the keyParams + * @return the resource config related to the keyParams */ static ResConfigImpl *CreateResConfigFromKeyParams(const std::vector &keyParams); @@ -79,14 +79,14 @@ public: /** * Get screen density * @param value the type of screen density - * @return the screen density corresponding the value + * @return the screen density related to the value */ static ScreenDensity GetScreenDensity(uint32_t value); /** * Get device type * @param value the type of device - * @return the device type corresponding the value + * @return the device type related to the value */ static DeviceType GetDeviceType(uint32_t value); diff --git a/frameworks/resmgr_lite/include/hap_resource.h b/frameworks/resmgr_lite/include/hap_resource.h index 1334210..59397a1 100644 --- a/frameworks/resmgr_lite/include/hap_resource.h +++ b/frameworks/resmgr_lite/include/hap_resource.h @@ -145,7 +145,7 @@ public: /** * Get the resource value by resource id * @param id the resource id - * @return the rsource value corresponding id + * @return the resource value related to id */ const IdValues *GetIdValues(const uint32_t id) const; @@ -153,7 +153,7 @@ public: * Get the resource value by resource name * @param name the resource name * @param resType the resource type - * @return the rsource value corresponding resource name + * @return the resource value related to resource name */ const IdValues *GetIdValuesByName(const std::string name, const ResType resType) const; @@ -161,7 +161,7 @@ public: * Get the resource id by resource name * @param name the resource name * @param resType the resource type - * @return the resource id corresponding resource name + * @return the resource id related to resource name */ int GetIdByName(const char *name, const ResType resType) const; diff --git a/frameworks/resmgr_lite/include/res_config_impl.h b/frameworks/resmgr_lite/include/res_config_impl.h index 49639f7..7cf6671 100644 --- a/frameworks/resmgr_lite/include/res_config_impl.h +++ b/frameworks/resmgr_lite/include/res_config_impl.h @@ -30,7 +30,7 @@ public: ResConfigImpl(); /** - * Whether the this resConfig more match request resConfig + * Whether this resConfig more match request resConfig * @param other the other resConfig * @param request the request resConfig * @return true if this resConfig more match request resConfig than other resConfig, else false @@ -89,7 +89,7 @@ public: bool Match(const ResConfigImpl *other) const; /** - * Copy this resConfig match other resConfig + * Copy other resConfig to this resConfig * @param other the other resConfig * @return true if copy other resConfig to this resConfig success, else false */ @@ -101,8 +101,8 @@ public: void CompleteScript(); /** - * Whether the script completed - * @return true if copy other resConfig to this resConfig success, else false + * Whether this resLocal script completed + * @return true if resLocal script completed, else false */ bool IsCompletedScript() const; diff --git a/frameworks/resmgr_lite/include/resource_manager_impl.h b/frameworks/resmgr_lite/include/resource_manager_impl.h index d39f8c4..3fba09b 100644 --- a/frameworks/resmgr_lite/include/resource_manager_impl.h +++ b/frameworks/resmgr_lite/include/resource_manager_impl.h @@ -53,8 +53,8 @@ public: virtual void GetResConfig(ResConfig &resConfig); /** - * Get string resource by Id - * @param id the resource Id + * Get string resource by id + * @param id the resource id * @param outValue the string resource write to * @return SUCCESS if resource exist, else NOT_FOUND */ @@ -85,7 +85,7 @@ public: virtual RState GetStringFormatByName(std::string &outValue, const char *name, ...); /** - * Get the ResType is STRINGARRAY resource by resource id + * Get the STRINGARRAY resource by resource id * @param id the resource id * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -93,7 +93,7 @@ public: virtual RState GetStringArrayById(uint32_t id, std::vector &outValue); /** - * Get the ResType is STRINGARRAY resource by resource name + * Get the STRINGARRAY resource by resource name * @param name the resource name * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -101,7 +101,7 @@ public: virtual RState GetStringArrayByName(const char *name, std::vector &outValue); /** - * Get the ResType is PATTERN resource by resource id + * Get the PATTERN resource by resource id * @param id the resource id * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -109,7 +109,7 @@ public: virtual RState GetPatternById(uint32_t id, std::map &outValue); /** - * Get the ResType is PATTERN resource by resource name + * Get the PATTERN resource by resource name * @param name the resource name * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -153,7 +153,7 @@ public: virtual RState GetPluralStringByNameFormat(std::string &outValue, const char *name, int quantity, ...); /** - * Get the ResType is THEME resource by resource id + * Get the THEME resource by resource id * @param id the resource id * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -161,7 +161,7 @@ public: virtual RState GetThemeById(uint32_t id, std::map &outValue); /** - * Get the ResType is THEME resource by resource name + * Get the THEME resource by resource name * @param name the resource name * @param outValue the resource write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -169,7 +169,7 @@ public: virtual RState GetThemeByName(const char *name, std::map &outValue); /** - * Get the ResType is BOOLEAN resource by resource id + * Get the BOOLEAN resource by resource id * @param id the resource id * @param outValue the obtain boolean value write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -177,7 +177,7 @@ public: virtual RState GetBooleanById(uint32_t id, bool &outValue); /** - * Get the ResType is BOOLEAN resource by resource name + * Get the BOOLEAN resource by resource name * @param name the resource name * @param outValue the obtain boolean value write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -185,7 +185,7 @@ public: virtual RState GetBooleanByName(const char *name, bool &outValue); /** - * Get the ResType is INTEGER resource by resource id + * Get the INTEGER resource by resource id * @param id the resource id * @param outValue the obtain Integer value write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -193,7 +193,7 @@ public: virtual RState GetIntegerById(uint32_t id, int &outValue); /** - * Get the ResType is INTEGER resource by resource name + * Get the INTEGER resource by resource name * @param name the resource name * @param outValue the obtain Integer value write to * @return SUCCESS if resource path exist, else NOT_FOUND @@ -201,7 +201,7 @@ public: virtual RState GetIntegerByName(const char *name, int &outValue); /** - * Get the ResType is FLOAT resource by resource id + * Get the FLOAT resource by resource id * @param id the resource id * @param outValue the obtain float value write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -209,7 +209,7 @@ public: virtual RState GetFloatById(uint32_t id, float &outValue); /** - * Get the ResType is FLOAT resource by resource name + * Get the FLOAT resource by resource name * @param name the resource name * @param outValue the obtain float value write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -217,7 +217,7 @@ public: virtual RState GetFloatByName(const char *name, float &outValue); /** - * Get the ResType is INTARRAY resource by resource id + * Get the INTARRAY resource by resource id * @param id the resource id * @param outValue the obtain resource value convert to vector write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -225,7 +225,7 @@ public: virtual RState GetIntArrayById(uint32_t id, std::vector &outValue); /** - * Get the ResType is INTARRAY resource by resource name + * Get the NTARRAY resource by resource name * @param name the resource name * @param outValue the obtain resource value convert to vector write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -233,7 +233,7 @@ public: virtual RState GetIntArrayByName(const char *name, std::vector &outValue); /** - * Get the ResType is COLOR resource by resource id + * Get the COLOR resource by resource id * @param id the resource id * @param outValue the obtain resource value convert to uint32_t write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -241,7 +241,7 @@ public: virtual RState GetColorById(uint32_t id, uint32_t &outValue); /** - * Get the ResType is COLOR resource by resource name + * Get the COLOR resource by resource name * @param name the resource name * @param outValue the obtain resource value convert to uint32_t write to * @return SUCCESS if resource exist, else NOT_FOUND @@ -249,34 +249,34 @@ public: virtual RState GetColorByName(const char *name, uint32_t &outValue); /** - * Get the ResType is PROF resource by resource id + * Get the PROF resource by resource id * @param id the resource id * @param outValue the obtain resource path write to - * @return SUCCESS if resource path exist, else NOT_FOUND + * @return SUCCESS if resource exist, else NOT_FOUND */ virtual RState GetProfileById(uint32_t id, std::string &outValue); /** - * Get the ResType is PROF resource by resource name + * Get the PROF resource by resource name * @param name the resource name * @param outValue the obtain resource path write to - * @return SUCCESS if resource path exist, else NOT_FOUND + * @return SUCCESS if resource exist, else NOT_FOUND */ virtual RState GetProfileByName(const char *name, std::string &outValue); /** - * Get the ResType is MEDIA resource by resource id + * Get the MEDIA resource by resource id * @param id the resource id * @param outValue the obtain resource path write to - * @return SUCCESS if resource path exist, else NOT_FOUND + * @return SUCCESS if resource exist, else NOT_FOUND */ virtual RState GetMediaById(uint32_t id, std::string &outValue); /** - * Get the ResType is PROF resource by resource name + * Get the MEDIA resource by resource name * @param name the resource name * @param outValue the obtain resource path write to - * @return SUCCESS if resource path exist, else NOT_FOUND + * @return SUCCESS if resource exist, else NOT_FOUND */ virtual RState GetMediaByName(const char *name, std::string &outValue); -- Gitee