From 8cf8c755198fec6b3614e030cd1eaedb344d983e Mon Sep 17 00:00:00 2001 From: li_juntao Date: Mon, 4 Jul 2022 20:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li_juntao --- .../subsystems/subsys-data-storage-guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zh-cn/device-dev/subsystems/subsys-data-storage-guide.md b/zh-cn/device-dev/subsystems/subsys-data-storage-guide.md index 7a52784b11..1d66e15739 100755 --- a/zh-cn/device-dev/subsystems/subsys-data-storage-guide.md +++ b/zh-cn/device-dev/subsystems/subsys-data-storage-guide.md @@ -42,17 +42,17 @@ | 类名 | 方法名 | 描述 | | --- | ----- | ----| -| Preferences | bool GetInt(const std::string &key, bool defValue); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | +| Preferences | int GetInt(const std::string &key, int defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | | Preferences | std::string GetString(const std::string &key, const std::string &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | -| Preferences | bool GetBool(const std::string &key, const bool &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | -| Preferences | float GetFloat(const std::string &key, const float &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | -| Preferences | double GetDouble(const std::string &key, const double &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | -| Preferences | int64_t GetLong(const std::string &key, const int64_t &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | +| Preferences | bool GetBool(const std::string &key, bool defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | +| Preferences | float GetFloat(const std::string &key, float defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | +| Preferences | double GetDouble(const std::string &key, double defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | +| Preferences | int64_t GetLong(const std::string &key, int64_t defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | | Preferences | std::set\ GetStringSet(const std::string &key, const std::set\ &defValue = {}); | key:要获取的存储key名称,不能为空。
defValue:若获取失败或value不存在返回此默认值。
返回值:value。 | **数据持久化** -通过执行flush或者flushSync方法,应用可以将缓存的数据再次写回文本文件中进行持久化存储。 +通过执行Flush()或者FlushSync()方法,应用可以将缓存的数据再次写回文本文件中进行持久化存储。 **表 5** 轻量级数据数据持久化接口 -- GitLab